00001 #ifndef DCHAIN_DCFILLABLECHARGEDLIST_H
00002 #define DCHAIN_DCFILLABLECHARGEDLIST_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/DCChargedVisibleList.h"
00058
00059
00060
00061 template < class Charged >
00062 class DCFillableChargedList : public DCChargedVisibleList< Charged , typename Charged::CandidateClass >
00063 {
00064
00065
00066 public:
00067
00068
00069
00070 DCFillableChargedList( bool ( * pFunction )( Charged& ) = 0 ) ;
00071 template <class WitnessIterator>
00072 DCFillableChargedList(WitnessIterator first, WitnessIterator last,
00073 bool ( * pFunction )( Charged& ) = 0 ) :
00074 DCChargedVisibleList<Charged, typename Charged::CandidateClass>(pFunction){
00075 fill(first, last); }
00076
00077
00078
00079
00080
00081 template<class WitnessIterator>
00082 DCFillableChargedList(WitnessIterator first, WitnessIterator last,
00083 DCSelectionFunction< Charged >& aFunctionalObject )
00084 : DCChargedVisibleList<Charged, typename Charged::CandidateClass>(aFunctionalObject) {
00085 fill(first, last); }
00086
00087
00088
00089
00090
00091
00092 DCFillableChargedList( const DCFillableChargedList< Charged >& aOtherList
00093 , bool ( * pFunction )( Charged& ) = 0 ) ;
00094 DCFillableChargedList( DCSelectionFunction< Charged >& aFunctionalObject ) ;
00095 DCFillableChargedList( const DCFillableChargedList< Charged >& aOtherList
00096 , DCSelectionFunction< Charged >& aFunctionalObject ) ;
00097 virtual ~DCFillableChargedList() ;
00098
00099
00100 const DCFillableChargedList< Charged >& operator=( const DCFillableChargedList< Charged >& aOtherList ) ;
00101
00102 template<class Witness>
00103 const DCFillableChargedList<Charged>& operator=(const Witness& aWitnessList) {
00104 this->eraseContents();
00105 fill(aWitnessList.begin(), aWitnessList.end());
00106 return ( *this ) ;
00107 }
00108
00109
00110 template<class WitnessIterator>
00111 void fill(WitnessIterator first, WitnessIterator last) {
00112 DCChargedVisibleList<Charged, typename Charged::CandidateClass>::fill(first,
00113 last);
00114 }
00115
00116
00117
00118
00119
00120 protected:
00121
00122
00123
00124
00125 private:
00126
00127
00128
00129
00130 void fill(
00131 const dchain::LabeledParticleList< Charged ,
00132 typename Charged::CandidateClass >& aList ) {
00133 DCChargedVisibleList< Charged ,
00134 typename Charged::CandidateClass >::fill( aList ) ;
00135 }
00136
00137
00138
00139
00140
00141
00142
00143 };
00144
00145
00146
00147
00148 # include "DecayChain/List/Template/DCFillableChargedList.cc"
00149
00150 template<class Charged, class WitnessIterator>
00151 inline
00152 void dc_fill(DCFillableChargedList<Charged>& aFillableList,
00153 WitnessIterator first,
00154 WitnessIterator last)
00155 {
00156 aFillableList.fill(first,last);
00157 }
00158
00159 #endif