#include <NeutralNCVisibleList.h>
Inheritance diagram for dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >:
Public Types | |
typedef dchain::WholeItr< NeutralNC > | const_iterator |
typedef dchain::WholeItr< NeutralNC > | const_iterator |
typedef dchain::PartialItr< NeutralNC > | const_partial_iterator |
typedef dchain::PartialItr< NeutralNC > | const_partial_iterator |
typedef dchain::MuteWholeItr< NeutralNC > | iterator |
typedef dchain::MuteWholeItr< NeutralNC > | iterator |
typedef NeutralNCVisibleList< NeutralNC, CandidateClass > | self_type |
typedef NeutralNCVisibleList< NeutralNC, CandidateClass > | self_type |
typedef NeutralNC | value_type |
typedef NeutralNC | value_type |
Public Member Functions | |
template<class THolder, class TSelect> | |
bool | attempt_insert (THolder &pPossible, const TSelect &aSelect) |
template<class THolder, class TSelect> | |
bool | attempt_insert (THolder &pPossible, const TSelect &aSelect) |
ChosenConjugateList< NeutralNC, CandidateClass > & | bar () |
ChosenConjugateList< NeutralNC, CandidateClass > & | bar () |
virtual const_iterator | begin () const |
virtual iterator | begin () |
virtual const_iterator | begin () const |
virtual iterator | begin () |
virtual bool | empty () const |
virtual bool | empty () const |
virtual const_iterator | end () const |
virtual iterator | end () |
virtual const_iterator | end () const |
virtual iterator | end () |
void | erase () |
void | erase () |
void | eraseContents () |
void | eraseContents () |
template<class Iterator, class TMaker, class TSelector> | |
void | fill (Iterator first, Iterator last, const TMaker &aMaker, const TSelector &aSel=SelectAll< NeutralNC >()) |
template<class TMaker, class TSelector> | |
void | fill (const LabeledParticleList< NeutralNC, CandidateClass > &aList, const TMaker &aMaker, const TSelector &aSel) |
template<class Iterator, class TMaker, class TSelector> | |
void | fill (Iterator first, Iterator last, const TMaker &aMaker, const TSelector &aSel=SelectAll< NeutralNC >()) |
template<class TMaker, class TSelector> | |
void | fill (const LabeledParticleList< NeutralNC, CandidateClass > &aList, const TMaker &aMaker, const TSelector &aSel) |
template<class THolder> | |
void | insert (THolder &pPossible) |
template<class THolder> | |
void | insert (THolder &pPossible) |
template<class TAnalyzer> | |
void | iterate (const TAnalyzer &analyze) const |
template<class TAnalyze> | |
void | iterate (TAnalyze &analyze) const |
template<class TAnalyze> | |
void | iterate (const TAnalyze &analyze) const |
template<class TAnalyze> | |
void | iterate (TAnalyze &analyze) const |
template<class TAnalyze> | |
void | iterate (const TAnalyze &analyze) const |
template<class TSelector> | |
NeutralNCVisibleList (const self_type &aOtherList, const TSelector &aSel) | |
NeutralNCVisibleList (const self_type &aOtherList) | |
NeutralNCVisibleList () | |
template<class TSelector> | |
NeutralNCVisibleList (const self_type &aOtherList, const TSelector &aSel) | |
NeutralNCVisibleList (const self_type &aOtherList) | |
NeutralNCVisibleList () | |
ChosenConjugateList< NeutralNC, CandidateClass > & | operator() () |
ChosenConjugateList< NeutralNC, CandidateClass > & | operator() () |
template<class Witness> | |
const self_type & | operator= (const Witness &aWitnessList) |
template<class Witness> | |
const self_type & | operator= (const Witness &aWitnessList) |
template<class TSelector> | |
FillListWithSelection< self_type, TSelector > | operator[] (const TSelector &iSel) |
template<class TSelector> | |
FillListWithSelection< self_type, TSelector > | operator[] (const TSelector &iSel) |
const_iterator | particle_begin () const |
iterator | particle_begin () |
const_iterator | particle_begin () const |
iterator | particle_begin () |
const_iterator | particle_end () const |
iterator | particle_end () |
const_iterator | particle_end () const |
iterator | particle_end () |
template<class TSelect> | |
SelectiveInserter< self_type, TSelect > | selectiveInserter (const TSelect &iSelect) |
creates an insert iterator that filters based on iSelect | |
template<class TSelect> | |
SelectiveInserter< self_type, TSelect > | selectiveInserter (const TSelect &iSelect) |
creates an insert iterator that filters based on iSelect | |
virtual int | size () const |
virtual int | size () const |
virtual | ~NeutralNCVisibleList () |
virtual | ~NeutralNCVisibleList () |
Protected Member Functions | |
virtual const dchain::LabeledParticleList< NeutralNC, CandidateClass > & | labeledCandidateList () const |
virtual dchain::LabeledParticleList< NeutralNC, CandidateClass > & | labeledCandidateList () |
virtual const dchain::LabeledParticleList< NeutralNC, CandidateClass > & | labeledCandidateList () const |
virtual dchain::LabeledParticleList< NeutralNC, CandidateClass > & | labeledCandidateList () |
Private Member Functions | |
const NeutralNCVisibleList< NeutralNC, CandidateClass > & | operator= (const NeutralNCVisibleList< NeutralNC, CandidateClass > &aOtherList) |
const NeutralNCVisibleList< NeutralNC, CandidateClass > & | operator= (const NeutralNCVisibleList< NeutralNC, CandidateClass > &aOtherList) |
Private Attributes | |
ChosenConjugateList< NeutralNC, CandidateClass > * | m_isBarList |
ChosenConjugateList< NeutralNC, CandidateClass > * | m_isBarList |
MutableReferenceHolder< dchain::LabeledParticleList< NeutralNC, CandidateClass > > | m_list |
MutableReferenceHolder< dchain::LabeledParticleList< NeutralNC, CandidateClass > > | m_list |
ChosenConjugateList< NeutralNC, CandidateClass > * | m_ntBarList |
ChosenConjugateList< NeutralNC, CandidateClass > * | m_ntBarList |
Static Private Attributes | |
const dchain::conjugation::Label | kIsBar = dchain::conjugation::kTails |
const dchain::conjugation::Label | kIsntBar = dchain::conjugation::kHeads |
|
|
|
|
|
|
|
|
|
|
|
|
|
00061 : 00062 m_list( (new dchain::LabeledParticleList< NeutralNC , CandidateClass >) ), 00063 m_ntBarList(0), 00064 m_isBarList(0) 00065 { 00066 }
|
|
|
|
00098 : 00099 m_list( new LabeledParticleList<NeutralNC,CandidateClass> ), 00100 m_ntBarList(0), 00101 m_isBarList(0) 00102 { 00103 fill(*(aOtherList.m_list), 00104 typename MakerTrait<NeutralNC>::maker_type(), 00105 aSel); 00106 }
|
|
00083 { 00084 delete m_ntBarList; 00085 delete m_isBarList; 00086 }
|
|
|
|
|
|
00098 : 00099 m_list( new LabeledParticleList<NeutralNC,CandidateClass> ), 00100 m_ntBarList(0), 00101 m_isBarList(0) 00102 { 00103 fill(*(aOtherList.m_list), 00104 typename MakerTrait<NeutralNC>::maker_type(), 00105 aSel); 00106 }
|
|
|
|
00169 { 00170 bool returnValue = (aSelect)(*pPossible); 00171 if (returnValue) { 00172 this->insert(pPossible); 00173 } 00174 return returnValue; 00175 }
|
|
00169 { 00170 bool returnValue = (aSelect)(*pPossible); 00171 if (returnValue) { 00172 this->insert(pPossible); 00173 } 00174 return returnValue; 00175 }
|
|
|
|
00135 { 00136 if ( m_isBarList == 0 ) { 00137 m_isBarList = new ChosenConjugateList< NeutralNC, CandidateClass >(*m_list, kIsBar); 00138 } 00139 00140 return (*m_isBarList); 00141 }
|
|
Reimplemented in dchain::CombinatoricList< CandidateClass >, and dchain::CombinatoricList< CandidateClass >. |
|
Reimplemented in dchain::CombinatoricList< CandidateClass >, and dchain::CombinatoricList< CandidateClass >. |
|
Reimplemented in dchain::CombinatoricList< CandidateClass >, and dchain::CombinatoricList< CandidateClass >. 00152 { 00153 // do this casting to make sure const 'begin' function is called 00154 return ( static_cast<const dchain::LabeledCandidateList< CandidateClass >*>(&labeledCandidateList())->begin() ); 00155 }
|
|
Reimplemented in dchain::CombinatoricList< CandidateClass >, and dchain::CombinatoricList< CandidateClass >. 00116 { 00117 return ( labeledCandidateList().begin() ) ; 00118 }
|
|
|
|
00136 { 00137 return ( labeledCandidateList().empty() ) ; 00138 }
|
|
Reimplemented in dchain::CombinatoricList< CandidateClass >, and dchain::CombinatoricList< CandidateClass >. |
|
Reimplemented in dchain::CombinatoricList< CandidateClass >, and dchain::CombinatoricList< CandidateClass >. |
|
Reimplemented in dchain::CombinatoricList< CandidateClass >, and dchain::CombinatoricList< CandidateClass >. 00161 { 00162 // do this casting to make sure const 'end' function is called 00163 return ( static_cast<const dchain::LabeledCandidateList< CandidateClass >*>(&labeledCandidateList())->end() ); 00164 }
|
|
Reimplemented in dchain::CombinatoricList< CandidateClass >, and dchain::CombinatoricList< CandidateClass >. 00124 { 00125 return ( labeledCandidateList().end() ) ; 00126 }
|
|
00190 { 00191 eraseContents(); 00192 }
|
|
00190 { 00191 eraseContents(); 00192 }
|
|
|
|
|
|
00212 { 00213 std::transform(first,last, 00214 selectiveInserter(aSel), 00215 aMaker); 00216 }
|
|
00197 { 00198 00199 for( const_iterator entry(aList.begin()); entry != aList.end(); ++entry){ 00200 //NOTE: even though this is really just calling the copy constructor 00201 //it is best to use the maker since it allows further control 00202 const NeutralNC& from((*entry)()); 00203 typename ResultTypeTrait<TMaker>::type localCopy( aMaker(from) ); 00204 00205 attempt_insert(localCopy,aSel); 00206 } 00207 00208 }
|
|
00212 { 00213 std::transform(first,last, 00214 selectiveInserter(aSel), 00215 aMaker); 00216 }
|
|
00197 { 00198 00199 for( const_iterator entry(aList.begin()); entry != aList.end(); ++entry){ 00200 //NOTE: even though this is really just calling the copy constructor 00201 //it is best to use the maker since it allows further control 00202 const NeutralNC& from((*entry)()); 00203 typename ResultTypeTrait<TMaker>::type localCopy( aMaker(from) ); 00204 00205 attempt_insert(localCopy,aSel); 00206 } 00207 00208 }
|
|
00178 { 00179 if (is_bar(pPossible)) { 00180 m_list->push_back( LabeledParticle< NeutralNC >( pPossible , 00181 kIsBar ) ) ; 00182 } 00183 else { 00184 m_list->push_back( LabeledParticle< NeutralNC >( pPossible , 00185 kIsntBar ) ) ; 00186 } 00187 }
|
|
00178 { 00179 if (is_bar(pPossible)) { 00180 m_list->push_back( LabeledParticle< NeutralNC >( pPossible , 00181 kIsBar ) ) ; 00182 } 00183 else { 00184 m_list->push_back( LabeledParticle< NeutralNC >( pPossible , 00185 kIsntBar ) ) ; 00186 } 00187 }
|
|
Reimplemented in dchain::ChosenChargeList< Charged, CandidateClass >, dchain::ChosenConjugateList< Conjugate, CandidateClass >, dchain::ChosenChargeList< Charged, CandidateClass >, dchain::ChosenConjugateList< Conjugate, CandidateClass >, dchain::ChosenChargeList< Charged, Charged::CandidateClass >, dchain::ChosenChargeList< Charged, Charged::CandidateClass >, dchain::ChosenConjugateList< NeutralNC, NeutralNC::CandidateClass >, dchain::ChosenConjugateList< NeutralNC, NeutralNC::CandidateClass >, dchain::ChosenConjugateList< NeutralNC, CandidateClass >, and dchain::ChosenConjugateList< NeutralNC, CandidateClass >. 00102 { 00103 const_iterator finished ( end() ); 00104 for ( const_iterator entry ( begin() ) ; 00105 entry != finished ; 00106 ++entry ) { 00107 analyze( (*entry)() ) ; 00108 } 00109 }
|
|
00153 { 00154 const_iterator finished ( particle_end() ) ; 00155 for ( const_iterator entry ( particle_begin() ) ; 00156 entry != finished ; 00157 ++entry ) { 00158 analyze( (*entry)() ) ; 00159 } 00160 }
|
|
00143 { 00144 const_iterator finished ( particle_end() ) ; 00145 for ( const_iterator entry ( particle_begin() ) ; 00146 entry != finished ; 00147 ++entry ) { 00148 analyze( (*entry)() ) ; 00149 } 00150 }
|
|
00153 { 00154 const_iterator finished ( particle_end() ) ; 00155 for ( const_iterator entry ( particle_begin() ) ; 00156 entry != finished ; 00157 ++entry ) { 00158 analyze( (*entry)() ) ; 00159 } 00160 }
|
|
00143 { 00144 const_iterator finished ( particle_end() ) ; 00145 for ( const_iterator entry ( particle_begin() ) ; 00146 entry != finished ; 00147 ++entry ) { 00148 analyze( (*entry)() ) ; 00149 } 00150 }
|
|
Implements dchain::CandidateList< CandidateClass >. |
|
Implements dchain::CandidateList< CandidateClass >. |
|
Implements dchain::CandidateList< CandidateClass >. 00182 {
00183 return ( *m_list ) ;
00184 }
|
|
Implements dchain::CandidateList< CandidateClass >. 00146 {
00147 return ( *m_list ) ;
00148 }
|
|
|
|
00124 { 00125 if ( m_ntBarList == 0 ) { 00126 m_ntBarList = new ChosenConjugateList< NeutralNC, CandidateClass >(*m_list, kIsntBar); 00127 } 00128 00129 return (*m_ntBarList); 00130 }
|
|
|
|
Reimplemented in DCFillableNeutralNCList< NeutralNC >, and DCFillableNeutralNCList< NeutralNC >. 00114 { 00115 eraseContents(); 00116 fill(aWitnessList.begin(), aWitnessList.end(), 00117 typename MakerTrait<NeutralNC>::maker_type(), 00118 SelectAll<NeutralNC>() ); 00119 return ( *this ) ; 00120 }
|
|
|
|
Reimplemented in DCFillableNeutralNCList< NeutralNC >, and DCFillableNeutralNCList< NeutralNC >. 00114 { 00115 eraseContents(); 00116 fill(aWitnessList.begin(), aWitnessList.end(), 00117 typename MakerTrait<NeutralNC>::maker_type(), 00118 SelectAll<NeutralNC>() ); 00119 return ( *this ) ; 00120 }
|
|
00124 { 00125 return FillListWithSelection<self_type,TSelector>(*this, iSel); 00126 }
|
|
00124 { 00125 return FillListWithSelection<self_type,TSelector>(*this, iSel); 00126 }
|
|
|
|
|
|
00165 { 00166 // Need to cast to 'const' to get the right function call 00167 return ( (*(const dchain::LabeledParticleList< NeutralNC , CandidateClass >*)(m_list.pointer())).begin() ) ; 00168 }
|
|
00110 { 00111 return ( m_list->begin() ) ; 00112 }
|
|
|
|
|
|
00173 { 00174 // Need to cast to 'const' to get the right function call 00175 return ( (*(const dchain::LabeledParticleList< NeutralNC , CandidateClass >*)(m_list.pointer())).end() ) ; 00176 }
|
|
00117 { 00118 return ( m_list->end() ) ; 00119 }
|
|
creates an insert iterator that filters based on iSelect
00164 { 00165 return SelectiveInserter<self_type,TSelect>(*this,iSelect); }
|
|
creates an insert iterator that filters based on iSelect
00164 { 00165 return SelectiveInserter<self_type,TSelect>(*this,iSelect); }
|
|
|
|
00144 { 00145 return ( labeledCandidateList().size() ) ; 00146 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|