00001 #ifndef DCHAIN_CHOSENCONJUGATELIST_H
00002 #define DCHAIN_CHOSENCONJUGATELIST_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 #include "DecayChain/List/ConjugateList.h"
00032 #include "DecayChain/Element/MutableReferenceHolder.h"
00033
00034
00035 template <class Conjugate, class CandidateClass> class DCNeutralNCVisibleList;
00036
00037 namespace dchain {
00038 template < class DecayClass > class MuteWholeItr ;
00039 template < class DecayClass > class WholeItr ;
00040 template < class DecayClass > class PartialItr ;
00041 template < class DecayClass , class CandidateClass > class LabeledParticleList ;
00042 }
00043
00044 template < class Arg > class DCAnalysisFunction ;
00045
00046 namespace dchain {
00047 template <class Conjugate, class CandidateClass> class NeutralNCVisibleList;
00048
00049 template < class Conjugate , class CandidateClass >
00050 class ChosenConjugateList : public ConjugateList< CandidateClass >
00051 {
00052
00053 friend class DCNeutralNCVisibleList< Conjugate , CandidateClass > ;
00054 friend class NeutralNCVisibleList< Conjugate , CandidateClass > ;
00055
00056 public:
00057
00058 typedef MuteWholeItr< Conjugate > iterator ;
00059 typedef WholeItr< Conjugate > const_iterator ;
00060 typedef PartialItr< Conjugate > const_partial_iterator ;
00061
00062
00063 virtual ~ChosenConjugateList() ;
00064
00065
00066 iterator particle_begin() ;
00067 iterator particle_end() ;
00068
00069
00070 const_iterator particle_begin() const ;
00071 const_iterator particle_end() const ;
00072 const_partial_iterator partial_particle_begin() const ;
00073 const_partial_iterator partial_particle_end() const ;
00074
00075
00076
00077 template < class TAnalyzer >
00078 void iterate( const TAnalyzer& analyzer) const
00079 {
00080 const_iterator finished ( particle_end() ) ;
00081 for ( const_iterator entry ( particle_begin() ) ;
00082 entry != finished ;
00083 ++entry ) {
00084 analyze( (*entry)() ) ;
00085 }
00086 }
00087 template < class TAnalyzer>
00088 void conjugation_iterate( const TAnalyzer& analyzer) const
00089 {
00090 const_iterator finished ( particle_end() ) ;
00091 for ( const_iterator entry ( particle_begin() ) ;
00092 entry != finished ;
00093 ++entry ) {
00094 analyze( (*entry)() , (*entry).label() == this->label() ) ;
00095 }
00096 }
00097
00098 template < class TAnalyzer>
00099 void partial_iterate( const TAnalyzer& analyzer ) const {
00100 const_partial_iterator finished ( partial_particle_end() ) ;
00101 for ( const_partial_iterator entry ( partial_particle_begin() ) ;
00102 entry != finished ;
00103 ++entry ) {
00104 analyze( (*entry)() ) ;
00105 }
00106 }
00107
00108
00109 protected:
00110
00111 ChosenConjugateList( LabeledParticleList< Conjugate , CandidateClass >&
00112 aLabeledParticleList ,
00113 const conjugation::Label aLabel ) ;
00114
00115
00116 virtual LabeledCandidateList<CandidateClass>& labeledCandidateList();
00117
00118
00119 virtual const LabeledCandidateList< CandidateClass >& labeledCandidateList() const ;
00120
00121 private:
00122
00123 ChosenConjugateList() ;
00124 ChosenConjugateList( const ChosenConjugateList< Conjugate , CandidateClass >& aOtherList ) ;
00125
00126
00127 const ChosenConjugateList< Conjugate , CandidateClass >& operator=( const ChosenConjugateList< Conjugate , CandidateClass >& aOtherList ) ;
00128
00129
00130
00131
00132
00133
00134 MutableReferenceHolder<LabeledParticleList< Conjugate , CandidateClass > > m_list ;
00135
00136
00137
00138 };
00139
00140
00141
00142 }
00143
00144
00145 #include "DecayChain/List/Template/ChosenConjugateList.cc"
00146
00147 #endif