#include <DCNeutralNCVisibleList.h>
Inheritance diagram for DCNeutralNCVisibleList< 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 () |
DCNeutralNCVisibleList (const DCNeutralNCVisibleList< NeutralNC, CandidateClass > &aOtherList, DCSelectionFunction< NeutralNC > &aFunctionalObject) | |
DCNeutralNCVisibleList (DCSelectionFunction< NeutralNC > &aFunctionalObject) | |
DCNeutralNCVisibleList (const DCNeutralNCVisibleList< NeutralNC, CandidateClass > &aOtherList, bool(*pFunction)(NeutralNC &)=0) | |
DCNeutralNCVisibleList (bool(*pFunction)(NeutralNC &)=0) | |
DCNeutralNCVisibleList (const DCNeutralNCVisibleList< NeutralNC, CandidateClass > &aOtherList, DCSelectionFunction< NeutralNC > &aFunctionalObject) | |
DCNeutralNCVisibleList (DCSelectionFunction< NeutralNC > &aFunctionalObject) | |
DCNeutralNCVisibleList (const DCNeutralNCVisibleList< NeutralNC, CandidateClass > &aOtherList, bool(*pFunction)(NeutralNC &)=0) | |
DCNeutralNCVisibleList (bool(*pFunction)(NeutralNC &)=0) | |
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 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 |
ChosenConjugateList< NeutralNC, CandidateClass > & | operator() () |
ChosenConjugateList< NeutralNC, CandidateClass > & | operator() () |
const DCNeutralNCVisibleList< NeutralNC, CandidateClass > & | operator= (const DCNeutralNCVisibleList< NeutralNC, CandidateClass > &aOtherList) |
const DCNeutralNCVisibleList< NeutralNC, CandidateClass > & | operator= (const DCNeutralNCVisibleList< NeutralNC, CandidateClass > &aOtherList) |
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 | ~DCNeutralNCVisibleList () |
virtual | ~DCNeutralNCVisibleList () |
Protected Member Functions | |
template<class Iterator> | |
void | fill (Iterator first, Iterator last) |
void | fill (const dchain::LabeledParticleList< NeutralNC, CandidateClass > &aList) |
template<class Iterator> | |
void | fill (Iterator first, Iterator last) |
void | fill (const dchain::LabeledParticleList< NeutralNC, CandidateClass > &aList) |
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 Attributes | |
bool(* | m_function )(NeutralNC &) |
bool(* | m_function )(NeutralNC &) |
dchain::DCUnaryAdapter< DCSelectionFunction< NeutralNC > > | m_functionalObject |
dchain::DCUnaryAdapter< DCSelectionFunction< NeutralNC > > | m_functionalObject |
|
Reimplemented from dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >. |
|
Reimplemented from dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >. |
|
Reimplemented from dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >. |
|
Reimplemented from dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >. |
|
Reimplemented from dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >. |
|
Reimplemented from dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >. |
|
|
|
|
|
Reimplemented from dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >. |
|
Reimplemented from dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >. |
|
00123 : 00124 m_function( pFunction ) , 00125 m_functionalObject( 0 ) 00126 { 00127 }
|
|
00133 : 00134 dchain::NeutralNCVisibleList<NeutralNC,CandidateClass>(aOtherList,pFunction), 00135 m_function( pFunction ) , 00136 m_functionalObject( 0 ) 00137 { 00138 }
|
|
00142 : 00143 m_function( 0 ) , 00144 m_functionalObject( &aFunctionalObject ) 00145 { 00146 }
|
|
00152 : 00153 dchain::NeutralNCVisibleList<NeutralNC,CandidateClass>(aOtherList, aFunctionalObject), 00154 m_function( 0 ) , 00155 m_functionalObject( &aFunctionalObject ) 00156 { 00157 }
|
|
00161 { 00162 }
|
|
|
|
|
|
|
|
|
|
|
|
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 }
|
|
|
|
00153 { 00154 m_list->erase( m_list->begin() , 00155 m_list->end() ) ; 00156 }
|
|
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 }
|
|
00131 { 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 }
|
|
|
|
00131 { 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 }
|
|
00183 { 00184 if ( 0 != m_function ) { 00185 fill(aList, dchain::NewMaker<NeutralNC>(), m_function); 00186 } else if (m_functionalObject) { 00187 fill(aList,dchain::NewMaker<NeutralNC>(), m_functionalObject); 00188 } else { 00189 fill(aList, dchain::NewMaker<NeutralNC>(), dchain::SelectAll<NeutralNC>()); 00190 } 00191 }
|
|
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 }
|
|
|
|
00170 { 00171 this->eraseContents() ; 00172 fill( aOtherList.labeledCandidateList() ) ; 00173 return ( *this ) ; 00174 }
|
|
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 }
|
|
|
|
|
|
|
|
|