00001 #ifndef DCHAIN_DCCHARGEDVISIBLELIST_H
00002 #define DCHAIN_DCCHARGEDVISIBLELIST_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
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078 #include "DecayChain/List/ChargedVisibleList.h"
00079 #include "DecayChain/List/ChosenChargeList.h"
00080 #include "DecayChain/Element/MutableReferenceHolder.h"
00081 #include "DecayChain/Function/DCSelectionFunction.h"
00082 #include "DecayChain/Function/DCUnaryAdapter.h"
00083
00084
00085 template < class DecayClass , class CandidateClass > class LabeledParticleList;
00086 template < class Arg > class DCSelectionFunction ;
00087 template < class Arg > class DCAnalysisFunction ;
00088
00089
00090
00091
00092
00093
00094
00095
00096 template < class Charged , class CandidateClass >
00097 class DCChargedVisibleList : public dchain::ChargedVisibleList< Charged, CandidateClass >
00098 {
00099
00100
00101 public:
00102
00103 typedef dchain::MuteWholeItr< Charged > iterator ;
00104 typedef dchain::WholeItr< Charged > const_iterator ;
00105 typedef dchain::PartialItr< Charged > const_partial_iterator ;
00106
00107 typedef Charged value_type ;
00108
00109
00110 DCChargedVisibleList( bool ( * pFunction )( Charged& ) = 0 ) ;
00111 DCChargedVisibleList( const DCChargedVisibleList< Charged , CandidateClass >& aOtherList ,
00112 bool ( * pFunction )( Charged& ) = 0 ) ;
00113 DCChargedVisibleList( DCSelectionFunction< Charged >& aFunctionalObject ) ;
00114 DCChargedVisibleList( const DCChargedVisibleList< Charged , CandidateClass >& aOtherList ,
00115 DCSelectionFunction< Charged >& aFunctionalObject ) ;
00116 virtual ~DCChargedVisibleList() ;
00117
00118
00119 const DCChargedVisibleList< Charged , CandidateClass >& operator=( const DCChargedVisibleList< Charged , CandidateClass >& aOtherList ) ;
00120
00121
00122
00123
00124 protected:
00125
00126 using dchain::ChargedVisibleList<Charged,CandidateClass>::fill;
00127 void fill( const dchain::LabeledParticleList< Charged , 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<Charged>(), m_function);
00133 } else if (m_functionalObject) {
00134 fill(first,last,dchain::NewMaker<Charged>(),m_functionalObject);
00135 } else {
00136 fill(first,last, dchain::NewMaker<Charged>(), dchain::SelectAll<Charged>());
00137 }
00138 }
00139
00140
00141
00142
00143 private:
00144
00145
00146
00147
00148
00149
00150
00151 bool ( * m_function )( Charged& ) ;
00152 dchain::DCUnaryAdapter<DCSelectionFunction< Charged > > m_functionalObject ;
00153
00154
00155
00156 } ;
00157
00158
00159
00160
00161 #include "DecayChain/List/Template/DCChargedVisibleList.cc"
00162
00163 #endif
00164