#include <DCChargedVisibleList.h>
Inheritance diagram for DCChargedVisibleList< Charged, CandidateClass >:
Public Types | |
typedef dchain::WholeItr< Charged > | const_iterator |
typedef dchain::WholeItr< Charged > | const_iterator |
typedef dchain::PartialItr< Charged > | const_partial_iterator |
typedef dchain::PartialItr< Charged > | const_partial_iterator |
typedef dchain::MuteWholeItr< Charged > | iterator |
typedef dchain::MuteWholeItr< Charged > | iterator |
typedef ChargedVisibleList< Charged, CandidateClass > | self_type |
typedef ChargedVisibleList< Charged, CandidateClass > | self_type |
typedef Charged | value_type |
typedef Charged | 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) |
virtual const_iterator | begin () const |
virtual iterator | begin () |
virtual const_iterator | begin () const |
virtual iterator | begin () |
DCChargedVisibleList (const DCChargedVisibleList< Charged, CandidateClass > &aOtherList, DCSelectionFunction< Charged > &aFunctionalObject) | |
DCChargedVisibleList (DCSelectionFunction< Charged > &aFunctionalObject) | |
DCChargedVisibleList (const DCChargedVisibleList< Charged, CandidateClass > &aOtherList, bool(*pFunction)(Charged &)=0) | |
DCChargedVisibleList (bool(*pFunction)(Charged &)=0) | |
DCChargedVisibleList (const DCChargedVisibleList< Charged, CandidateClass > &aOtherList, DCSelectionFunction< Charged > &aFunctionalObject) | |
DCChargedVisibleList (DCSelectionFunction< Charged > &aFunctionalObject) | |
DCChargedVisibleList (const DCChargedVisibleList< Charged, CandidateClass > &aOtherList, bool(*pFunction)(Charged &)=0) | |
DCChargedVisibleList (bool(*pFunction)(Charged &)=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< Charged >()) |
template<class TMaker, class TSelector> | |
void | fill (const LabeledParticleList< Charged, 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 |
ChosenChargeList< Charged, CandidateClass > & | minus () const |
ChosenChargeList< Charged, CandidateClass > & | minus () const |
const DCChargedVisibleList< Charged, CandidateClass > & | operator= (const DCChargedVisibleList< Charged, CandidateClass > &aOtherList) |
const DCChargedVisibleList< Charged, CandidateClass > & | operator= (const DCChargedVisibleList< Charged, 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 () |
ChosenChargeList< Charged, CandidateClass > & | plus () const |
ChosenChargeList< Charged, CandidateClass > & | plus () const |
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 | ~DCChargedVisibleList () |
virtual | ~DCChargedVisibleList () |
Protected Member Functions | |
template<class Iterator> | |
void | fill (Iterator first, Iterator last) |
void | fill (const dchain::LabeledParticleList< Charged, CandidateClass > &aList) |
template<class Iterator> | |
void | fill (Iterator first, Iterator last) |
void | fill (const dchain::LabeledParticleList< Charged, CandidateClass > &aList) |
virtual const LabeledParticleList< Charged, CandidateClass > & | labeledCandidateList () const |
virtual LabeledParticleList< Charged, CandidateClass > & | labeledCandidateList () |
virtual const LabeledParticleList< Charged, CandidateClass > & | labeledCandidateList () const |
virtual LabeledParticleList< Charged, CandidateClass > & | labeledCandidateList () |
Private Attributes | |
bool(* | m_function )(Charged &) |
bool(* | m_function )(Charged &) |
dchain::DCUnaryAdapter< DCSelectionFunction< Charged > > | m_functionalObject |
dchain::DCUnaryAdapter< DCSelectionFunction< Charged > > | m_functionalObject |
|
Reimplemented from dchain::ChargedVisibleList< Charged, CandidateClass >. |
|
Reimplemented from dchain::ChargedVisibleList< Charged, CandidateClass >. |
|
Reimplemented from dchain::ChargedVisibleList< Charged, CandidateClass >. |
|
Reimplemented from dchain::ChargedVisibleList< Charged, CandidateClass >. |
|
Reimplemented from dchain::ChargedVisibleList< Charged, CandidateClass >. |
|
Reimplemented from dchain::ChargedVisibleList< Charged, CandidateClass >. |
|
|
|
|
|
Reimplemented from dchain::ChargedVisibleList< Charged, CandidateClass >. |
|
Reimplemented from dchain::ChargedVisibleList< Charged, CandidateClass >. |
|
00120 : 00121 m_function( pFunction ) , 00122 m_functionalObject( 0 ) 00123 { 00124 }
|
|
00129 : 00130 dchain::ChargedVisibleList<Charged, CandidateClass>(aOtherList, pFunction), 00131 m_function( pFunction ) , 00132 m_functionalObject( 0 ) 00133 { 00134 }
|
|
00138 : 00139 m_function( 0 ) , 00140 m_functionalObject( &aFunctionalObject ) 00141 { 00142 }
|
|
00147 : 00148 dchain::ChargedVisibleList<Charged,CandidateClass>(aOtherList,aFunctionalObject), 00149 m_function( 0 ) , 00150 m_functionalObject( &aFunctionalObject ) 00151 { 00152 }
|
|
00156 { 00157 }
|
|
|
|
|
|
|
|
|
|
|
|
00244 { 00245 //std::cout << " @ ChargedVisibleList::attempt_insert() " << __LINE__ << std::endl; 00246 bool returnValue = (aSelect)(*pPossible); 00247 if (returnValue) { 00248 this->insert(pPossible); 00249 } 00250 return returnValue; 00251 }
|
|
00244 { 00245 //std::cout << " @ ChargedVisibleList::attempt_insert() " << __LINE__ << std::endl; 00246 bool returnValue = (aSelect)(*pPossible); 00247 if (returnValue) { 00248 this->insert(pPossible); 00249 } 00250 return returnValue; 00251 }
|
|
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 }
|
|
00266 { 00267 eraseContents(); 00268 }
|
|
00266 { 00267 eraseContents(); 00268 }
|
|
|
|
00204 { 00205 m_list->erase( m_list->begin() , 00206 m_list->end() ) ; 00207 }
|
|
00288 { 00289 //std::cout << " @ ChargedVisibleList::fill() " << __LINE__ << std::endl; 00290 //std::cout << "size before transform: " << m_list->size() << std::endl; 00291 std::transform(first,last, 00292 selectiveInserter(aSel), 00293 aMaker); 00294 //std::cout << "size after transform: " << m_list->size() << std::endl; 00295 }
|
|
00273 { 00274 00275 for( const_iterator entry(aList.begin()); entry != aList.end(); ++entry){ 00276 //NOTE: even though this is really just calling the copy constructor 00277 //it is best to use the maker since it allows further control 00278 const Charged& from((*entry)()); 00279 typename ResultTypeTrait<TMaker>::type localCopy( aMaker(from) ); 00280 00281 attempt_insert(localCopy,aSel); 00282 } 00283 00284 }
|
|
00130 { 00131 if ( 0 != m_function ) { 00132 fill(first,last, dchain::NewMaker<Charged>(), m_function); 00133 } else if (m_functionalObject) { 00134 fill(first,last,dchain::NewMaker<Charged>(),m_functionalObject); 00135 } else { 00136 fill(first,last, dchain::NewMaker<Charged>(), dchain::SelectAll<Charged>()); 00137 } 00138 }
|
|
|
|
00130 { 00131 if ( 0 != m_function ) { 00132 fill(first,last, dchain::NewMaker<Charged>(), m_function); 00133 } else if (m_functionalObject) { 00134 fill(first,last,dchain::NewMaker<Charged>(),m_functionalObject); 00135 } else { 00136 fill(first,last, dchain::NewMaker<Charged>(), dchain::SelectAll<Charged>()); 00137 } 00138 }
|
|
00177 { 00178 if ( 0 != m_function ) { 00179 fill(aList, dchain::NewMaker<Charged>(), m_function); 00180 } else if (m_functionalObject) { 00181 fill(aList,dchain::NewMaker<Charged>(), m_functionalObject); 00182 } else { 00183 fill(aList, dchain::NewMaker<Charged>(), dchain::SelectAll<Charged>()); 00184 } 00185 }
|
|
00254 { 00255 if (0 < charge_sign(pPossible)) { 00256 m_list->push_back( LabeledParticle< Charged >( pPossible , 00257 kPlus ) ) ; 00258 } 00259 else { 00260 m_list->push_back( LabeledParticle< Charged >( pPossible , 00261 kMinus ) ) ; 00262 } 00263 }
|
|
00254 { 00255 if (0 < charge_sign(pPossible)) { 00256 m_list->push_back( LabeledParticle< Charged >( pPossible , 00257 kPlus ) ) ; 00258 } 00259 else { 00260 m_list->push_back( LabeledParticle< Charged >( pPossible , 00261 kMinus ) ) ; 00262 } 00263 }
|
|
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 }
|
|
00228 { 00229 const_iterator finished ( particle_end() ) ; 00230 for ( const_iterator entry ( particle_begin() ) ; 00231 entry != finished ; 00232 ++entry ) { 00233 analyze( (*entry)() ) ; 00234 } 00235 }
|
|
00218 { 00219 const_iterator finished ( particle_end() ) ; 00220 for ( const_iterator entry ( particle_begin() ) ; 00221 entry != finished ; 00222 ++entry ) { 00223 analyze( (*entry)() ) ; 00224 } 00225 }
|
|
00228 { 00229 const_iterator finished ( particle_end() ) ; 00230 for ( const_iterator entry ( particle_begin() ) ; 00231 entry != finished ; 00232 ++entry ) { 00233 analyze( (*entry)() ) ; 00234 } 00235 }
|
|
00218 { 00219 const_iterator finished ( particle_end() ) ; 00220 for ( const_iterator entry ( particle_begin() ) ; 00221 entry != finished ; 00222 ++entry ) { 00223 analyze( (*entry)() ) ; 00224 } 00225 }
|
|
Implements dchain::CandidateList< CandidateClass >. |
|
Implements dchain::CandidateList< CandidateClass >. |
|
Implements dchain::CandidateList< CandidateClass >. 00231 {
00232 return ( *m_list ) ;
00233 }
|
|
Implements dchain::CandidateList< CandidateClass >. 00197 {
00198 return ( *m_list ) ;
00199 }
|
|
|
|
00187 { 00188 if ( m_minusList == 0 ) { 00189 m_minusList = new ChosenChargeList< Charged , CandidateClass >( *m_list , kMinus ); 00190 } 00191 return (*m_minusList); 00192 }
|
|
|
|
00165 { 00166 this->eraseContents() ; 00167 fill(aOtherList.labeledCandidateList()) ; 00168 return ( *this ) ; 00169 }
|
|
00202 { 00203 return FillListWithSelection<self_type,TSelector>(*this, iSel); 00204 }
|
|
00202 { 00203 return FillListWithSelection<self_type,TSelector>(*this, iSel); 00204 }
|
|
|
|
|
|
00215 { 00216 // Need to cast to 'const' to get the right function call 00217 return ( (*(const LabeledParticleList< Charged , CandidateClass >*)(m_list.pointer())).begin() ) ; 00218 }
|
|
00163 {
00164 return ( m_list->begin() ) ;
00165 }
|
|
|
|
|
|
00222 { 00223 // Need to cast to 'const' to get the right function call 00224 return ( (*(const LabeledParticleList< Charged , CandidateClass >*)(m_list.pointer())).end() ) ; 00225 }
|
|
00170 {
00171 return ( m_list->end() ) ;
00172 }
|
|
|
|
00177 { 00178 if ( m_plusList == 0 ) { 00179 m_plusList = new ChosenChargeList< Charged, CandidateClass >( *m_list, kPlus ); 00180 } 00181 return (*m_plusList); 00182 }
|
|
creates an insert iterator that filters based on iSelect
00239 { 00240 return SelectiveInserter<self_type,TSelect>(*this,iSelect); }
|
|
creates an insert iterator that filters based on iSelect
00239 { 00240 return SelectiveInserter<self_type,TSelect>(*this,iSelect); }
|
|
|
|
00144 { 00145 return ( labeledCandidateList().size() ) ; 00146 }
|
|
|
|
|
|
|
|
|