00001 #ifndef DCHAIN_DCNEUTRALVISIBLELIST_H 00002 #define DCHAIN_DCNEUTRALVISIBLELIST_H 00003 // -*- C++ -*- 00004 // 00005 // Package: DChain 00006 // Module: NeutralVisibleList 00007 // 00008 // Description: List to hold Candidates generated from observed Tracks. 00009 // 00010 // Usage: 00011 // <usage> 00012 // 00013 // Author: Simon Patton 00014 // Created: Fri Oct 4 11:04:47 EDT 1996 00015 // $Id: DCNeutralVisibleList.h,v 1.1.1.1 2009/03/03 06:06:56 maqm Exp $ 00016 // 00017 // Revision history 00018 // 00019 // $Log: DCNeutralVisibleList.h,v $ 00020 // Revision 1.1.1.1 2009/03/03 06:06:56 maqm 00021 // first import of DecayChain 00022 // 00023 // Revision 1.5 2006/01/11 20:28:27 cdj 00024 // massive class renaming, addition of [] for selection and unit tests 00025 // 00026 // Revision 1.4 2003/05/15 19:56:08 cdj 00027 // revamped memory handling so always use a ReferenceHolder to deal with the reference counting 00028 // 00029 // Revision 1.3 2001/03/28 14:27:58 urner 00030 // added same workaround as for charged because of NonTemplatedMemberFunctionBug 00031 // 00032 // Revision 1.2 2001/03/23 23:07:44 urner 00033 // modification needed to add pi0 eta and Ks decay lists in CleoDChain 00034 // 00035 // Revision 1.1.1.1 2000/12/18 22:16:53 cdj 00036 // imported DChain 00037 // 00038 // Revision 1.11 1998/08/20 19:59:05 sjp 00039 // Modified to use DChainBoolean 00040 // 00041 // Revision 1.10 1998/04/17 19:11:05 sjp 00042 // Modified to use latest types 00043 // 00044 // Revision 1.9 1997/09/17 20:05:29 sjp 00045 // Removed filling to superclass 00046 // 00047 // Revision 1.8 1997/08/28 06:59:56 sjp 00048 // Modified files to handle complete templating 00049 // 00050 // Revision 1.7 1997/08/19 15:55:10 sjp 00051 // Modified list to have no dependence on any other 00052 // structures except its contents, which must have 00053 // certain `typedef' available to use. 00054 // 00055 // Revision 1.6 1997/08/15 21:32:39 sjp 00056 // Updated to use <package>/<file>.h include structure. 00057 // Updated to use bug flags specified in Experiement.h 00058 // 00059 // Revision 1.5 1997/01/31 20:17:14 sjp 00060 // Modified to use the new `bug' include files 00061 // 00062 // Revision 1.4 1997/01/22 16:27:32 sjp 00063 // Fixed error in pre-processor labels 00064 // 00065 // Revision 1.3 1997/01/21 20:34:06 sjp 00066 // Changed CPP flags and include because of library reorganization 00067 // 00068 // Revision 1.2 1996/12/20 21:19:23 sjp 00069 // Extended pathnames for Include files 00070 // 00071 // Revision 1.1 1996/11/04 19:36:11 sjp 00072 // New file for new `List' module 00073 // 00074 00075 // system include files 00076 00077 // user include files 00078 #include "DecayChain/List/NeutralVisibleList.h" // superclass declaration 00079 #include "DecayChain/Function/DCUnaryAdapter.h" 00080 #include "DecayChain/Function/DCSelectionFunction.h" 00081 #include "DecayChain/Function/DCAnalysisFunction.h" 00082 00083 // forward declarations 00084 00085 // 00086 // Note: To avoid a myriad of conpiler flags it is easier to 00087 // have a two parameter template class. The instantiation 00088 // of this class must look like 00089 // 00090 // template class LabeledDecayList< A , A::CandidateClass > ; 00091 00092 template< class Neutral , class CandidateClass > 00093 class DCNeutralVisibleList : public dchain::NeutralVisibleList< Neutral, CandidateClass > 00094 { 00095 // friend classses and functions 00096 00097 public: 00098 // constants, enums and typedefs 00099 /* 00100 typedef dchain::MuteWholeItr< Neutral > iterator ; 00101 typedef dchain::WholeItr< Neutral > const_iterator ; 00102 //typedef dchain::PartialItr< Neutral > const_partial_iterator ; 00103 */ 00104 typedef Neutral value_type ; 00105 00106 // Constructors and destructor 00107 DCNeutralVisibleList( bool ( * pFunction )( Neutral& ) = 0 ) ; 00108 DCNeutralVisibleList( const DCNeutralVisibleList< Neutral , CandidateClass >& aOtherList , 00109 bool ( * pFunction )( Neutral& ) = 0 ) ; 00110 DCNeutralVisibleList( DCSelectionFunction< Neutral >& aFunctionalObject ) ; 00111 DCNeutralVisibleList( const DCNeutralVisibleList< Neutral , CandidateClass >& aOtherList , 00112 DCSelectionFunction< Neutral >& aFunctionalObject ) ; 00113 virtual ~DCNeutralVisibleList() ; 00114 00115 // assignment operator(s) 00116 const DCNeutralVisibleList< Neutral , CandidateClass >& operator=( const DCNeutralVisibleList< Neutral , CandidateClass >& aOtherList ); 00117 00118 // member functions 00119 00120 // const member functions 00121 00122 // static member functions 00123 00124 protected: 00125 // protected member functions 00126 using dchain::NeutralVisibleList<Neutral,CandidateClass>::fill; 00127 void fill( const dchain::LabeledParticleList< Neutral , CandidateClass >& aList ) ; 00128 00129 template<class Iterator> 00130 void fill(Iterator first, Iterator last) { 00131 if ( 0 != m_function ) { 00132 fill(first,last, dchain::NewMaker<Neutral>(), m_function); 00133 } else if (m_functionalObject) { 00134 fill(first,last,dchain::NewMaker<Neutral>(),m_functionalObject); 00135 } else { 00136 fill(first,last, dchain::NewMaker<Neutral>(), dchain::SelectAll<Neutral>()); 00137 } 00138 } 00139 00140 00141 // protected const member functions 00142 00143 private: 00144 // Constructors and destructor 00145 00146 // private member functions 00147 00148 // private const member functions 00149 00150 // data members 00151 bool ( * m_function )( Neutral& ) ; 00152 dchain::DCUnaryAdapter<DCSelectionFunction< Neutral > > m_functionalObject ; 00153 00154 // static data members 00155 00156 } ; 00157 00158 // inline function definitions 00159 00160 // function definitions 00161 #include "DecayChain/List/Template/DCNeutralVisibleList.cc" 00162 00163 #endif /* DCHAIN_DCNEUTRALVISIBLELIST_H */