#include <DCNeutralNCVisibleList.h>
Inheritance diagram for DCNeutralNCVisibleList< NeutralNC, CandidateClass >:
Public Types | |
typedef dchain::MuteWholeItr< NeutralNC > | iterator |
typedef dchain::WholeItr< NeutralNC > | const_iterator |
typedef dchain::PartialItr< NeutralNC > | const_partial_iterator |
typedef NeutralNC | value_type |
typedef NeutralNCVisibleList< NeutralNC, CandidateClass > | self_type |
Public Member Functions | |
DCNeutralNCVisibleList (bool(*pFunction)(NeutralNC &)=0) | |
DCNeutralNCVisibleList (const DCNeutralNCVisibleList< NeutralNC, CandidateClass > &aOtherList, bool(*pFunction)(NeutralNC &)=0) | |
DCNeutralNCVisibleList (DCSelectionFunction< NeutralNC > &aFunctionalObject) | |
DCNeutralNCVisibleList (const DCNeutralNCVisibleList< NeutralNC, CandidateClass > &aOtherList, DCSelectionFunction< NeutralNC > &aFunctionalObject) | |
virtual | ~DCNeutralNCVisibleList () |
const DCNeutralNCVisibleList< NeutralNC, CandidateClass > & | operator= (const DCNeutralNCVisibleList< NeutralNC, CandidateClass > &aOtherList) |
template<class TSelector> | |
FillListWithSelection< self_type, TSelector > | operator[] (const TSelector &iSel) |
iterator | particle_begin () |
const_iterator | particle_begin () const |
iterator | particle_end () |
const_iterator | particle_end () const |
ChosenConjugateList< NeutralNC, CandidateClass > & | bar () |
ChosenConjugateList< NeutralNC, CandidateClass > & | operator() () |
template<class TAnalyze> | |
void | iterate (const TAnalyze &analyze) const |
template<class TAnalyze> | |
void | iterate (TAnalyze &analyze) const |
template<class TAnalyzer> | |
void | iterate (const TAnalyzer &analyze) const |
template<class TSelect> | |
SelectiveInserter< self_type, TSelect > | selectiveInserter (const TSelect &iSelect) |
creates an insert iterator that filters based on iSelect | |
template<class THolder, class TSelect> | |
bool | attempt_insert (THolder &pPossible, const TSelect &aSelect) |
template<class THolder> | |
void | insert (THolder &pPossible) |
void | eraseContents () |
void | erase () |
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 >()) |
virtual iterator | begin () |
virtual const_iterator | begin () const |
virtual iterator | end () |
virtual const_iterator | end () const |
virtual bool | empty () const |
virtual int | size () const |
Protected Member Functions | |
void | fill (const dchain::LabeledParticleList< NeutralNC, CandidateClass > &aList) |
template<class Iterator> | |
void | fill (Iterator first, Iterator last) |
virtual dchain::LabeledParticleList< NeutralNC, CandidateClass > & | labeledCandidateList () |
virtual const dchain::LabeledParticleList< NeutralNC, CandidateClass > & | labeledCandidateList () const |
Private Attributes | |
bool(* | m_function )(NeutralNC &) |
dchain::DCUnaryAdapter< DCSelectionFunction< NeutralNC > > | m_functionalObject |
Definition at line 99 of file DCNeutralNCVisibleList.h.
typedef dchain::WholeItr< NeutralNC > DCNeutralNCVisibleList< NeutralNC, CandidateClass >::const_iterator |
Reimplemented from dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >.
Definition at line 106 of file DCNeutralNCVisibleList.h.
typedef dchain::PartialItr< NeutralNC > DCNeutralNCVisibleList< NeutralNC, CandidateClass >::const_partial_iterator |
Reimplemented from dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >.
Definition at line 107 of file DCNeutralNCVisibleList.h.
typedef dchain::MuteWholeItr< NeutralNC > DCNeutralNCVisibleList< NeutralNC, CandidateClass >::iterator |
Reimplemented from dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >.
Definition at line 105 of file DCNeutralNCVisibleList.h.
typedef NeutralNCVisibleList<NeutralNC, CandidateClass> dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::self_type [inherited] |
Definition at line 91 of file NeutralNCVisibleList.h.
typedef NeutralNC DCNeutralNCVisibleList< NeutralNC, CandidateClass >::value_type |
Reimplemented from dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >.
Definition at line 109 of file DCNeutralNCVisibleList.h.
DCNeutralNCVisibleList< NeutralNC, CandidateClass >::DCNeutralNCVisibleList | ( | bool(*)(NeutralNC &) | pFunction = 0 |
) |
Definition at line 123 of file DCNeutralNCVisibleList.cc.
00123 : 00124 m_function( pFunction ) , 00125 m_functionalObject( 0 ) 00126 { 00127 }
DCNeutralNCVisibleList< NeutralNC, CandidateClass >::DCNeutralNCVisibleList | ( | const DCNeutralNCVisibleList< NeutralNC, CandidateClass > & | aOtherList, | |
bool(*)(NeutralNC &) | pFunction = 0 | |||
) |
Definition at line 131 of file DCNeutralNCVisibleList.cc.
00133 : 00134 dchain::NeutralNCVisibleList<NeutralNC,CandidateClass>(aOtherList,pFunction), 00135 m_function( pFunction ) , 00136 m_functionalObject( 0 ) 00137 { 00138 }
DCNeutralNCVisibleList< NeutralNC, CandidateClass >::DCNeutralNCVisibleList | ( | DCSelectionFunction< NeutralNC > & | aFunctionalObject | ) |
Definition at line 142 of file DCNeutralNCVisibleList.cc.
00142 : 00143 m_function( 0 ) , 00144 m_functionalObject( &aFunctionalObject ) 00145 { 00146 }
DCNeutralNCVisibleList< NeutralNC, CandidateClass >::DCNeutralNCVisibleList | ( | const DCNeutralNCVisibleList< NeutralNC, CandidateClass > & | aOtherList, | |
DCSelectionFunction< NeutralNC > & | aFunctionalObject | |||
) |
Definition at line 150 of file DCNeutralNCVisibleList.cc.
00152 : 00153 dchain::NeutralNCVisibleList<NeutralNC,CandidateClass>(aOtherList, aFunctionalObject), 00154 m_function( 0 ) , 00155 m_functionalObject( &aFunctionalObject ) 00156 { 00157 }
DCNeutralNCVisibleList< NeutralNC, CandidateClass >::~DCNeutralNCVisibleList | ( | ) | [virtual] |
bool dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::attempt_insert | ( | THolder & | pPossible, | |
const TSelect & | aSelect | |||
) | [inline, inherited] |
Definition at line 168 of file NeutralNCVisibleList.h.
Referenced by dchain::NeutralNCVisibleList< NeutralNC, NeutralNC::CandidateClass >::fill().
00169 { 00170 bool returnValue = (aSelect)(*pPossible); 00171 if (returnValue) { 00172 this->insert(pPossible); 00173 } 00174 return returnValue; 00175 }
dchain::ChosenConjugateList< NeutralNC, CandidateClass > & dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::bar | ( | ) | [inherited] |
Definition at line 134 of file NeutralNCVisibleList.cc.
References dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::kIsBar, dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::m_isBarList, and dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::m_list.
00135 { 00136 if ( m_isBarList == 0 ) { 00137 m_isBarList = new ChosenConjugateList< NeutralNC, CandidateClass >(*m_list, kIsBar); 00138 } 00139 00140 return (*m_isBarList); 00141 }
CandidateList< CandidateClass >::const_iterator dchain::CandidateList< CandidateClass >::begin | ( | ) | const [virtual, inherited] |
Reimplemented in dchain::CombinatoricList< CandidateClass >.
Definition at line 151 of file CandidateList.cc.
References dchain::CandidateList< CandidateClass >::begin(), and dchain::CandidateList< CandidateClass >::labeledCandidateList().
00152 { 00153 // do this casting to make sure const 'begin' function is called 00154 return ( static_cast<const dchain::LabeledCandidateList< CandidateClass >*>(&labeledCandidateList())->begin() ); 00155 }
CandidateList< CandidateClass >::iterator dchain::CandidateList< CandidateClass >::begin | ( | ) | [virtual, inherited] |
Reimplemented in dchain::CombinatoricList< CandidateClass >.
Definition at line 115 of file CandidateList.cc.
References dchain::CandidateList< CandidateClass >::labeledCandidateList().
Referenced by dchain::CandidateList< CandidateClass >::begin(), and dchain::CandidateList< NeutralNC::CandidateClass >::iterate().
00116 { 00117 return ( labeledCandidateList().begin() ) ; 00118 }
bool dchain::CandidateList< CandidateClass >::empty | ( | ) | const [virtual, inherited] |
Definition at line 135 of file CandidateList.cc.
References dchain::CandidateList< CandidateClass >::labeledCandidateList().
00136 { 00137 return ( labeledCandidateList().empty() ) ; 00138 }
CandidateList< CandidateClass >::const_iterator dchain::CandidateList< CandidateClass >::end | ( | ) | const [virtual, inherited] |
Reimplemented in dchain::CombinatoricList< CandidateClass >.
Definition at line 160 of file CandidateList.cc.
References dchain::CandidateList< CandidateClass >::end(), and dchain::CandidateList< CandidateClass >::labeledCandidateList().
00161 { 00162 // do this casting to make sure const 'end' function is called 00163 return ( static_cast<const dchain::LabeledCandidateList< CandidateClass >*>(&labeledCandidateList())->end() ); 00164 }
CandidateList< CandidateClass >::iterator dchain::CandidateList< CandidateClass >::end | ( | ) | [virtual, inherited] |
Reimplemented in dchain::CombinatoricList< CandidateClass >.
Definition at line 123 of file CandidateList.cc.
References dchain::CandidateList< CandidateClass >::labeledCandidateList().
Referenced by dchain::CandidateList< CandidateClass >::end(), and dchain::CandidateList< NeutralNC::CandidateClass >::iterate().
00124 { 00125 return ( labeledCandidateList().end() ) ; 00126 }
void dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::erase | ( | ) | [inline, inherited] |
void dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::eraseContents | ( | ) | [inherited] |
Definition at line 152 of file NeutralNCVisibleList.cc.
References dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::m_list.
Referenced by dchain::NeutralNCVisibleList< NeutralNC, NeutralNC::CandidateClass >::erase(), DCNeutralNCVisibleList< NeutralNC, CandidateClass >::operator=(), and dchain::NeutralNCVisibleList< NeutralNC, NeutralNC::CandidateClass >::operator=().
void dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::fill | ( | Iterator | first, | |
Iterator | last, | |||
const TMaker & | aMaker, | |||
const TSelector & | aSel = SelectAll<NeutralNC>() | |||
) | [inline, inherited] |
Definition at line 210 of file NeutralNCVisibleList.h.
00212 { 00213 std::transform(first,last, 00214 selectiveInserter(aSel), 00215 aMaker); 00216 }
void dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::fill | ( | const LabeledParticleList< NeutralNC, CandidateClass > & | aList, | |
const TMaker & | aMaker, | |||
const TSelector & | aSel | |||
) | [inline, inherited] |
Definition at line 195 of file NeutralNCVisibleList.h.
Referenced by dchain::fill_using_selector(), dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::NeutralNCVisibleList(), dchain::NeutralNCVisibleList< NeutralNC, NeutralNC::CandidateClass >::NeutralNCVisibleList(), and dchain::NeutralNCVisibleList< NeutralNC, NeutralNC::CandidateClass >::operator=().
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 }
void DCNeutralNCVisibleList< NeutralNC, CandidateClass >::fill | ( | Iterator | first, | |
Iterator | last | |||
) | [inline, protected] |
Definition at line 131 of file DCNeutralNCVisibleList.h.
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 }
void DCNeutralNCVisibleList< NeutralNC, CandidateClass >::fill | ( | const dchain::LabeledParticleList< NeutralNC, CandidateClass > & | aList | ) | [protected] |
Reimplemented in DCFillableNeutralNCList< NeutralNC >.
Definition at line 181 of file DCNeutralNCVisibleList.cc.
References DCNeutralNCVisibleList< NeutralNC, CandidateClass >::m_function, and DCNeutralNCVisibleList< NeutralNC, CandidateClass >::m_functionalObject.
Referenced by DCNeutralNCVisibleList< NeutralNC, NeutralNC::CandidateClass >::fill(), DCFillableNeutralNCList< NeutralNC >::fill(), and DCNeutralNCVisibleList< NeutralNC, CandidateClass >::operator=().
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 }
void dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::insert | ( | THolder & | pPossible | ) | [inline, inherited] |
Definition at line 178 of file NeutralNCVisibleList.h.
Referenced by dchain::NeutralNCVisibleList< NeutralNC, NeutralNC::CandidateClass >::attempt_insert().
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 }
void dchain::CandidateList< CandidateClass >::iterate | ( | const TAnalyzer & | analyze | ) | const [inline, inherited] |
Reimplemented in dchain::ChosenChargeList< Charged, CandidateClass >, dchain::ChosenConjugateList< Conjugate, CandidateClass >, dchain::ChosenChargeList< Charged, Charged::CandidateClass >, dchain::ChosenConjugateList< NeutralNC, NeutralNC::CandidateClass >, and dchain::ChosenConjugateList< NeutralNC, CandidateClass >.
Definition at line 102 of file CandidateList.h.
00102 { 00103 const_iterator finished ( end() ); 00104 for ( const_iterator entry ( begin() ) ; 00105 entry != finished ; 00106 ++entry ) { 00107 analyze( (*entry)() ) ; 00108 } 00109 }
void dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::iterate | ( | TAnalyze & | analyze | ) | const [inline, inherited] |
Definition at line 153 of file NeutralNCVisibleList.h.
00153 { 00154 const_iterator finished ( particle_end() ) ; 00155 for ( const_iterator entry ( particle_begin() ) ; 00156 entry != finished ; 00157 ++entry ) { 00158 analyze( (*entry)() ) ; 00159 } 00160 }
void dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::iterate | ( | const TAnalyze & | analyze | ) | const [inline, inherited] |
Definition at line 143 of file NeutralNCVisibleList.h.
00143 { 00144 const_iterator finished ( particle_end() ) ; 00145 for ( const_iterator entry ( particle_begin() ) ; 00146 entry != finished ; 00147 ++entry ) { 00148 analyze( (*entry)() ) ; 00149 } 00150 }
const dchain::LabeledParticleList< NeutralNC, CandidateClass > & dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::labeledCandidateList | ( | ) | const [protected, virtual, inherited] |
Implements dchain::CandidateList< CandidateClass >.
Definition at line 181 of file NeutralNCVisibleList.cc.
References dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::m_list.
00182 { 00183 return ( *m_list ) ; 00184 }
dchain::LabeledParticleList< NeutralNC, CandidateClass > & dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::labeledCandidateList | ( | ) | [protected, virtual, inherited] |
Implements dchain::CandidateList< CandidateClass >.
Definition at line 145 of file NeutralNCVisibleList.cc.
References dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::m_list.
Referenced by DCNeutralNCVisibleList< NeutralNC, CandidateClass >::operator=().
00146 { 00147 return ( *m_list ) ; 00148 }
dchain::ChosenConjugateList< NeutralNC, CandidateClass > & dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::operator() | ( | ) | [inherited] |
Definition at line 123 of file NeutralNCVisibleList.cc.
References dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::kIsntBar, dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::m_list, and dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::m_ntBarList.
00124 { 00125 if ( m_ntBarList == 0 ) { 00126 m_ntBarList = new ChosenConjugateList< NeutralNC, CandidateClass >(*m_list, kIsntBar); 00127 } 00128 00129 return (*m_ntBarList); 00130 }
const DCNeutralNCVisibleList< NeutralNC, CandidateClass > & DCNeutralNCVisibleList< NeutralNC, CandidateClass >::operator= | ( | const DCNeutralNCVisibleList< NeutralNC, CandidateClass > & | aOtherList | ) |
Definition at line 169 of file DCNeutralNCVisibleList.cc.
References dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::eraseContents(), DCNeutralNCVisibleList< NeutralNC, CandidateClass >::fill(), and dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::labeledCandidateList().
Referenced by DCFillableNeutralNCList< NeutralNC >::operator=().
00170 { 00171 this->eraseContents() ; 00172 fill( aOtherList.labeledCandidateList() ) ; 00173 return ( *this ) ; 00174 }
FillListWithSelection<self_type, TSelector> dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::operator[] | ( | const TSelector & | iSel | ) | [inline, inherited] |
Definition at line 124 of file NeutralNCVisibleList.h.
00124 { 00125 return FillListWithSelection<self_type,TSelector>(*this, iSel); 00126 }
NeutralNCVisibleList< NeutralNC, CandidateClass >::const_iterator dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::particle_begin | ( | ) | const [inherited] |
Definition at line 164 of file NeutralNCVisibleList.cc.
References dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::m_list, and dchain::ReferenceHolderBase< TPtr, TRef >::pointer().
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 }
NeutralNCVisibleList< NeutralNC, CandidateClass >::iterator dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::particle_begin | ( | ) | [inherited] |
Definition at line 109 of file NeutralNCVisibleList.cc.
References dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::m_list.
Referenced by dchain::NeutralNCVisibleList< NeutralNC, NeutralNC::CandidateClass >::iterate().
00110 { 00111 return ( m_list->begin() ) ; 00112 }
NeutralNCVisibleList< NeutralNC, CandidateClass >::const_iterator dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::particle_end | ( | ) | const [inherited] |
Definition at line 172 of file NeutralNCVisibleList.cc.
References dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::m_list, and dchain::ReferenceHolderBase< TPtr, TRef >::pointer().
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 }
NeutralNCVisibleList< NeutralNC, CandidateClass >::iterator dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::particle_end | ( | ) | [inherited] |
Definition at line 116 of file NeutralNCVisibleList.cc.
References dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::m_list.
Referenced by dchain::NeutralNCVisibleList< NeutralNC, NeutralNC::CandidateClass >::iterate().
00117 { 00118 return ( m_list->end() ) ; 00119 }
SelectiveInserter<self_type,TSelect> dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::selectiveInserter | ( | const TSelect & | iSelect | ) | [inline, inherited] |
creates an insert iterator that filters based on iSelect
Definition at line 164 of file NeutralNCVisibleList.h.
Referenced by dchain::NeutralNCVisibleList< NeutralNC, NeutralNC::CandidateClass >::fill().
00164 { 00165 return SelectiveInserter<self_type,TSelect>(*this,iSelect); }
int dchain::CandidateList< CandidateClass >::size | ( | ) | const [virtual, inherited] |
Definition at line 143 of file CandidateList.cc.
References dchain::CandidateList< CandidateClass >::labeledCandidateList().
Referenced by NeutralDReconstruction::execute(), DsReconstruction::execute(), and ChargedDReconstruction::execute().
00144 { 00145 return ( labeledCandidateList().size() ) ; 00146 }
bool( * DCNeutralNCVisibleList< NeutralNC, CandidateClass >::m_function)(NeutralNC &) [private] |
dchain::DCUnaryAdapter<DCSelectionFunction< NeutralNC > > DCNeutralNCVisibleList< NeutralNC, CandidateClass >::m_functionalObject [private] |
Definition at line 152 of file DCNeutralNCVisibleList.h.
Referenced by DCNeutralNCVisibleList< NeutralNC, CandidateClass >::fill(), and DCNeutralNCVisibleList< NeutralNC, NeutralNC::CandidateClass >::fill().