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