00001 #ifndef DCHAIN_DCNEUTRALNCVISIBLELIST_H
00002 #define DCHAIN_DCNEUTRALNCVISIBLELIST_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/NeutralNCVisibleList.h"
00079 #include "DecayChain/List/ChosenConjugateList.h"
00080 #include "DecayChain/Element/MutableReferenceHolder.h"
00081 #include "DecayChain/List/LabeledParticleList.h"
00082 #include "DecayChain/Function/DCUnaryAdapter.h"
00083
00084 template < class Arg > class DCSelectionFunction ;
00085 template < class Arg > class DCAnalysisFunction ;
00086 namespace dchain {
00087 template < class DecayClass > class MuteWholeItr ;
00088 template < class DecayClass > class WholeItr ;
00089 template < class DecayClass > class PartialItr ;
00090 }
00091
00092
00093
00094
00095
00096
00097
00098 template < class NeutralNC , class CandidateClass >
00099 class DCNeutralNCVisibleList : public dchain::NeutralNCVisibleList<NeutralNC, CandidateClass >
00100 {
00101
00102
00103 public:
00104
00105 typedef dchain::MuteWholeItr< NeutralNC > iterator ;
00106 typedef dchain::WholeItr< NeutralNC > const_iterator ;
00107 typedef dchain::PartialItr< NeutralNC > const_partial_iterator ;
00108
00109 typedef NeutralNC value_type ;
00110
00111
00112 DCNeutralNCVisibleList( bool ( * pFunction )( NeutralNC& ) = 0 ) ;
00113 DCNeutralNCVisibleList( const DCNeutralNCVisibleList< NeutralNC , CandidateClass >& aOtherList ,
00114 bool ( * pFunction )( NeutralNC& ) = 0 ) ;
00115 DCNeutralNCVisibleList( DCSelectionFunction< NeutralNC >& aFunctionalObject ) ;
00116 DCNeutralNCVisibleList( const DCNeutralNCVisibleList< NeutralNC , CandidateClass >& aOtherList ,
00117 DCSelectionFunction< NeutralNC >& aFunctionalObject ) ;
00118 virtual ~DCNeutralNCVisibleList() ;
00119
00120
00121 const DCNeutralNCVisibleList< NeutralNC , CandidateClass >& operator=( const DCNeutralNCVisibleList< NeutralNC , CandidateClass >& aOtherList ) ;
00122
00123
00124
00125 protected:
00126
00127 using dchain::NeutralNCVisibleList<NeutralNC,CandidateClass>::fill;
00128 void fill( const dchain::LabeledParticleList< NeutralNC , CandidateClass >& aList ) ;
00129
00130 template<class Iterator>
00131 void fill(Iterator first, Iterator last) {
00132 if ( 0 != m_function ) {
00133 fill(first,last, dchain::NewMaker<NeutralNC>(), m_function);
00134 } else if (m_functionalObject) {
00135 fill(first,last,dchain::NewMaker<NeutralNC>(),m_functionalObject);
00136 } else {
00137 fill(first,last, dchain::NewMaker<NeutralNC>(), dchain::SelectAll<NeutralNC>());
00138 }
00139 }
00140
00141
00142
00143 private:
00144
00145
00146
00147
00148
00149
00150
00151 bool ( * m_function )( NeutralNC& ) ;
00152 dchain::DCUnaryAdapter<DCSelectionFunction< NeutralNC > > m_functionalObject ;
00153
00154
00155
00156 } ;
00157
00158
00159
00160
00161 #include "DecayChain/List/Template/DCNeutralNCVisibleList.cc"
00162
00163 #endif
00164