/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Event/DecayChain/DecayChain-00-00-03-slc6tag/DecayChain/List/Template/DCNeutralVisibleList.cc

Go to the documentation of this file.
00001 #ifndef DCHAIN_DCNEUTRALVISIBLELIST_CC
00002 #define DCHAIN_DCNEUTRALVISIBLELIST_CC
00003 // -*- C++ -*-
00004 //
00005 // Package:     DChain
00006 // Module:      NeutralVisibleList
00007 // 
00008 // Description: <one line class summary>
00009 //
00010 // Implimentation:
00011 //     <Notes on implimentation>
00012 //
00013 // Author:      Simon Patton
00014 // Created:     Fri Oct  4 11:04:56 EDT 1996
00015 // $Id: DCNeutralVisibleList.cc,v 1.1.1.1 2009/03/03 06:06:56 maqm Exp $
00016 //
00017 // Revision history
00018 //
00019 // $Log: DCNeutralVisibleList.cc,v $
00020 // Revision 1.1.1.1  2009/03/03 06:06:56  maqm
00021 // first import of DecayChain
00022 //
00023 // Revision 1.3  2006/01/11 20:28:39  cdj
00024 // massive class renaming, addition of [] for selection and unit tests
00025 //
00026 // Revision 1.2  2003/05/15 19:56:13  cdj
00027 // revamped memory handling so always use a ReferenceHolder to deal with the reference counting
00028 //
00029 // Revision 1.1.1.1  2000/12/18 22:16:56  cdj
00030 // imported DChain
00031 //
00032 // Revision 1.14  1998/08/20 20:00:14  sjp
00033 // Modified to use DChainBoolean
00034 //
00035 // Revision 1.13  1998/08/19 20:46:26  sjp
00036 // Fixed comments and removed report references
00037 //
00038 // Revision 1.12  1998/04/17 19:14:54  sjp
00039 // Modified to use latest type
00040 //
00041 // Revision 1.11  1997/09/17 20:05:36  sjp
00042 // Removed filling to superclass
00043 //
00044 // Revision 1.10  1997/09/03 14:58:28  sjp
00045 // Use new report.h and TBParticlePoint
00046 //
00047 // Revision 1.9  1997/08/28 07:00:23  sjp
00048 // Modified files to handle complete templating
00049 //
00050 // Revision 1.8  1997/08/19 23:02:39  sjp
00051 // Restructured package to be independent of Rock
00052 //
00053 // Revision 1.7  1997/08/19 15:55:29  sjp
00054 // Modified list to have no dependence on any other
00055 //   structures except its contents, which must have
00056 //   certain `typedef' available to use.
00057 //
00058 // Revision 1.6  1997/08/15 21:33:55  sjp
00059 // Updated to use <package>/<file>.h include structure.
00060 // Updated to use bug flags specified in Experiement.h
00061 //
00062 // Revision 1.5  1997/01/31 20:16:29  sjp
00063 // Modified to use the new `bug' include files
00064 //
00065 // Revision 1.4  1997/01/21 20:31:50  sjp
00066 // Changed CPP flags and include because of library reorganization
00067 //
00068 // Revision 1.3  1996/12/20 21:14:03  sjp
00069 // Changed aPossible to Possible and added dropLink where nec.
00070 //
00071 // Revision 1.2  1996/11/05 19:31:31  sjp
00072 // Added definition for filling for TruthTable.
00073 //
00074 // Revision 1.1  1996/11/04 17:17:22  sjp
00075 // New file for new `List' module
00076 //
00077 
00078 // system include files
00079 #include <stdlib.h>  // required for 'exit'
00080 
00081 // user include files
00082 #include "DecayChain/Function/DCSelectionFunction.h"
00083 #include "DecayChain/Function/DCAnalysisFunction.h"
00084 #include "DecayChain/Element/conjugation.h"
00085 #include "DecayChain/Element/LabeledParticle.h"
00086 #include "DecayChain/Iterator/MuteWholeItr.h"
00087 #include "DecayChain/Iterator/WholeItr.h"
00088 #include "DecayChain/List/LabeledParticleList.h"
00089 
00090 #include "DecayChain/List/DCNeutralVisibleList.h"
00091 
00092 // STL include files
00093 //#include <vector>
00094 
00095 //
00096 // constants, enums and typedefs
00097 //
00098 
00099 //
00100 // static data member definitions
00101 //
00102 
00103 //
00104 // constructors and destructor
00105 //
00106 
00107 template< class Neutral , class CandidateClass >
00108 DCNeutralVisibleList< Neutral , CandidateClass >::
00109 DCNeutralVisibleList( bool ( * pFunction )( Neutral& ) ) :
00110    m_function( pFunction ) ,
00111    m_functionalObject( 0 )
00112 {
00113 }
00114 
00115 template< class Neutral , class CandidateClass >
00116 DCNeutralVisibleList< Neutral , CandidateClass >::
00117 DCNeutralVisibleList( const DCNeutralVisibleList< Neutral , CandidateClass >&  aOtherList ,
00118                     bool ( * pFunction )( Neutral& ) ) :
00119    dchain::NeutralVisibleList< Neutral, CandidateClass >( aOtherList, pFunction ) ,
00120    m_function( pFunction ) ,
00121    m_functionalObject( 0 )
00122 {
00123 }
00124 
00125 template< class Neutral , class CandidateClass >
00126 DCNeutralVisibleList< Neutral , CandidateClass >::
00127 DCNeutralVisibleList( DCSelectionFunction< Neutral >& aFunctionalObject ) :
00128    m_function( 0 ) ,
00129    m_functionalObject( &aFunctionalObject )
00130 {
00131 }
00132 
00133 template< class Neutral , class CandidateClass >
00134 DCNeutralVisibleList< Neutral , CandidateClass >::
00135 DCNeutralVisibleList( const DCNeutralVisibleList< Neutral , CandidateClass >& aOtherList ,
00136                     DCSelectionFunction< Neutral >& aFunctionalObject ) :
00137    dchain::NeutralVisibleList< Neutral,CandidateClass >( aOtherList, aFunctionalObject),
00138    m_function( 0 ) ,
00139    m_functionalObject( &aFunctionalObject )
00140 {
00141 }
00142 
00143 template< class Neutral , class CandidateClass >
00144 DCNeutralVisibleList< Neutral , CandidateClass >::
00145 ~DCNeutralVisibleList()
00146 {
00147 }
00148 
00149 //
00150 // assignment operators
00151 //
00152 
00153 template< class Neutral , class CandidateClass >
00154 const DCNeutralVisibleList< Neutral , CandidateClass >& DCNeutralVisibleList< Neutral , CandidateClass >::operator=( const DCNeutralVisibleList< Neutral , CandidateClass >& aOtherList )
00155 {
00156    this->eraseContents() ;
00157    fill( aOtherList.labeledCandidateList() ) ;
00158    return ( *this ) ;
00159 }
00160 
00161 template < class Neutral , class CandidateClass >
00162 void DCNeutralVisibleList< Neutral , CandidateClass >::fill( const dchain::LabeledParticleList< Neutral , CandidateClass >& aList )
00163 {
00164    if ( 0 != m_function ) {
00165       fill(aList, dchain::NewMaker<Neutral>(), m_function);
00166    } else if (m_functionalObject) {
00167       fill(aList,dchain::NewMaker<Neutral>(), m_functionalObject);
00168    } else {
00169       fill(aList, dchain::NewMaker<Neutral>(), dchain::SelectAll<Neutral>());
00170    }
00171 }
00172 
00173 //
00174 // member functions
00175 //
00176 
00177 //
00178 // static member functions
00179 //
00180 
00181 #endif /* DCHAIN_DCNEUTRALVISIBLELIST_CC */

Generated on Tue Nov 29 22:58:23 2016 for BOSS_7.0.2 by  doxygen 1.4.7