00001 #ifndef DCHAIN_FILLABLENEUTRALNCLIST_H
00002 #define DCHAIN_FILLABLENEUTRALNCLIST_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057 #include "DecayChain/List/DCNeutralNCVisibleList.h"
00058
00059
00060
00061 template < class NeutralNC >
00062 class DCFillableNeutralNCList : public DCNeutralNCVisibleList< NeutralNC , typename NeutralNC::CandidateClass >
00063 {
00064
00065
00066 public:
00067
00068
00069
00070 DCFillableNeutralNCList( bool ( * pFunction )( NeutralNC& ) = 0 ) ;
00071 template <class WitnessIterator>
00072 DCFillableNeutralNCList(WitnessIterator first, WitnessIterator last,
00073 bool ( * pFunction )( NeutralNC& ) = 0 ) :
00074 DCNeutralNCVisibleList<NeutralNC, typename NeutralNC::CandidateClass>(pFunction){
00075 fill(first, last); }
00076
00077
00078
00079
00080
00081 template<class WitnessIterator>
00082 DCFillableNeutralNCList(WitnessIterator first, WitnessIterator last,
00083 DCSelectionFunction< NeutralNC >& aFunctionalObject )
00084 : DCNeutralNCVisibleList<NeutralNC, typename NeutralNC::CandidateClass>(aFunctionalObject) {
00085 fill(first, last); }
00086
00087
00088
00089
00090
00091
00092 DCFillableNeutralNCList( const DCFillableNeutralNCList< NeutralNC >& aOtherList
00093 , bool ( * pFunction )( NeutralNC& ) = 0 ) ;
00094 DCFillableNeutralNCList( DCSelectionFunction< NeutralNC >& aFunctionalObject ) ;
00095 DCFillableNeutralNCList( const DCFillableNeutralNCList< NeutralNC >& aOtherList
00096 , DCSelectionFunction< NeutralNC >& aFunctionalObject ) ;
00097 virtual ~DCFillableNeutralNCList() ;
00098
00099
00100 const DCFillableNeutralNCList< NeutralNC >& operator=( const DCFillableNeutralNCList< NeutralNC >& aOtherList ) ;
00101
00102 template<class Witness>
00103 const DCFillableNeutralNCList<NeutralNC>& operator=(const Witness& aWitnessList) {
00104 this->eraseContents();
00105 fill(aWitnessList.begin(), aWitnessList.end());
00106 return ( *this ) ;
00107 }
00108
00109
00110
00111
00112
00113
00114
00115
00116 protected:
00117
00118
00119
00120
00121 private:
00122
00123
00124
00125
00126 void fill(
00127 const dchain::LabeledParticleList< NeutralNC ,
00128 typename NeutralNC::CandidateClass >& aList ) {
00129 DCNeutralNCVisibleList< NeutralNC ,
00130 typename NeutralNC::CandidateClass >::fill( aList ) ;
00131 }
00132 template<class WitnessIterator>
00133 void fill(WitnessIterator first, WitnessIterator last) {
00134 DCNeutralNCVisibleList<NeutralNC, typename NeutralNC::CandidateClass>::fill(first,
00135 last);
00136 }
00137
00138
00139
00140
00141
00142
00143
00144 };
00145
00146
00147
00148
00149 # include "DecayChain/List/Template/DCFillableNeutralNCList.cc"
00150
00151 template<class NeutralNC, class WitnessIterator>
00152 inline
00153 void dc_fill(DCFillableNeutralNCList<NeutralNC>& aFillableList,
00154 WitnessIterator first,
00155 WitnessIterator last)
00156 {
00157 aFillableList.fill(first,last);
00158 }
00159
00160 #endif