BOSS 7.1.2
BESIII Offline Software System
Loading...
Searching...
No Matches
dchain::NeutralVisibleList< Neutral, CandidateClass > Class Template Reference

#include <NeutralVisibleList.h>

+ Inheritance diagram for dchain::NeutralVisibleList< Neutral, CandidateClass >:

Public Types

typedef dchain::MuteWholeItr< Neutral > iterator
 
typedef dchain::WholeItr< Neutral > const_iterator
 
typedef Neutral value_type
 
typedef NeutralVisibleList< Neutral, CandidateClass > self_type
 
- Public Types inherited from dchain::ConjugateList< typename Neutral::CandidateClass >
typedef dchain::MuteWholeCandidateItr< CandidateClass > iterator
 
typedef dchain::WholeCandidateItr< CandidateClass > const_iterator
 
typedef dchain::PartialCandidateItr< CandidateClass > const_partial_iterator
 
- Public Types inherited from dchain::CandidateList< CandidateClass >
typedef dchain::MuteWholeCandidateItr< CandidateClass > iterator
 
typedef dchain::WholeCandidateItr< CandidateClass > const_iterator
 
typedef dchain::PartialCandidateItr< CandidateClass > const_partial_iterator
 
typedef dchain::LabeledCandidate< CandidateClass > value_type
 

Public Member Functions

 NeutralVisibleList ()
 
 NeutralVisibleList (const self_type &aOtherList)
 
template<class TSelector >
 NeutralVisibleList (const self_type &aOtherList, const TSelector &aSel)
 
template<class WitnessIterator >
 NeutralVisibleList (WitnessIterator first, WitnessIterator last)
 
template<class WitnessIterator , class TSelector >
 NeutralVisibleList (WitnessIterator first, WitnessIterator last, const TSelector &aFunctionalObject)
 
virtual ~NeutralVisibleList ()
 
const self_typeoperator= (const self_type &aOtherList)
 
template<class Witness >
const self_typeoperator= (const Witness &aWitnessList)
 
template<class TSelector >
FillListWithSelection< self_type, TSelector > operator[] (const TSelector &iSel)
 
iterator particle_begin ()
 
iterator particle_end ()
 
const_iterator particle_begin () const
 
const_iterator particle_end () const
 
template<class TAnalyze >
void iterate (const TAnalyze &analyze) const
 
template<class TAnalyze >
void iterate (TAnalyze &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< Neutral, 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< Neutral >())
 
- Public Member Functions inherited from dchain::ConjugateList< typename Neutral::CandidateClass >
 ConjugateList (const conjugation::Label aLabel)
 
virtual ~ConjugateList ()
 
virtual bool isSelfConjugate () const
 
bool isConjugateOf (const ConjugateList< CandidateClass > &aList) const
 
int partial_size () const
 
virtual const_partial_iterator partial_begin () const
 
virtual const_partial_iterator partial_end () const
 
void conjugation_iterate (const TAnalyzer &analyzer) const
 
void partial_iterate (const TAnalyzer &analyze) const
 
const_partial_iterator conjugate_partial_begin () const
 
const_partial_iterator conjugate_partial_end () const
 
virtual conjugation::Label label () const
 
void setLabel (const conjugation::Label aLabel)
 
- Public Member Functions inherited from dchain::CandidateList< CandidateClass >
 CandidateList ()
 
virtual ~CandidateList ()
 
virtual iterator begin ()
 
virtual iterator end ()
 
virtual bool empty () const
 
virtual int size () const
 
virtual const_iterator begin () const
 
virtual const_iterator end () const
 
template<class TAnalyzer >
void iterate (const TAnalyzer &analyze) const
 

Protected Member Functions

virtual dchain::LabeledParticleList< Neutral, CandidateClass > & labeledCandidateList ()
 
virtual const dchain::LabeledParticleList< Neutral, CandidateClass > & labeledCandidateList () const
 
- Protected Member Functions inherited from dchain::CandidateList< CandidateClass >

Detailed Description

template<class Neutral, class CandidateClass = typename Neutral::CandidateClass>
class dchain::NeutralVisibleList< Neutral, CandidateClass >

Definition at line 100 of file NeutralVisibleList.h.

Member Typedef Documentation

◆ const_iterator

template<class Neutral , class CandidateClass = typename Neutral::CandidateClass>
dchain::WholeItr< Neutral > dchain::NeutralVisibleList< Neutral, CandidateClass >::const_iterator

Definition at line 107 of file NeutralVisibleList.h.

◆ iterator

template<class Neutral , class CandidateClass = typename Neutral::CandidateClass>
dchain::MuteWholeItr< Neutral > dchain::NeutralVisibleList< Neutral, CandidateClass >::iterator

Definition at line 106 of file NeutralVisibleList.h.

◆ self_type

template<class Neutral , class CandidateClass = typename Neutral::CandidateClass>
NeutralVisibleList<Neutral,CandidateClass> dchain::NeutralVisibleList< Neutral, CandidateClass >::self_type

Definition at line 112 of file NeutralVisibleList.h.

◆ value_type

template<class Neutral , class CandidateClass = typename Neutral::CandidateClass>
Neutral dchain::NeutralVisibleList< Neutral, CandidateClass >::value_type

Definition at line 110 of file NeutralVisibleList.h.

Constructor & Destructor Documentation

◆ NeutralVisibleList() [1/5]

template<class Neutral , class CandidateClass >
dchain::NeutralVisibleList< Neutral, CandidateClass >::NeutralVisibleList ( )

◆ NeutralVisibleList() [2/5]

template<class Neutral , class CandidateClass >
dchain::NeutralVisibleList< Neutral, CandidateClass >::NeutralVisibleList ( const self_type & aOtherList)

Definition at line 112 of file NeutralVisibleList.cc.

113 :
116{
117 typedef typename MakerTrait<Neutral>::maker_type Maker;
118 fill( *(aOtherList.m_list), Maker(), SelectAll<Neutral>() ) ;
119
120}
void fill(const LabeledParticleList< Neutral, CandidateClass > &aList, const TMaker &aMaker, const TSelector &aSel)

◆ NeutralVisibleList() [3/5]

template<class Neutral , class CandidateClass = typename Neutral::CandidateClass>
template<class TSelector >
dchain::NeutralVisibleList< Neutral, CandidateClass >::NeutralVisibleList ( const self_type & aOtherList,
const TSelector & aSel )
inline

Definition at line 117 of file NeutralVisibleList.h.

118 :
119 ConjugateList< CandidateClass >( dchain::conjugation::kNone ),
121 fill(*(aOtherList.m_list),
123 aSel);
124 }

◆ NeutralVisibleList() [4/5]

template<class Neutral , class CandidateClass = typename Neutral::CandidateClass>
template<class WitnessIterator >
dchain::NeutralVisibleList< Neutral, CandidateClass >::NeutralVisibleList ( WitnessIterator first,
WitnessIterator last )
inline

Definition at line 127 of file NeutralVisibleList.h.

127 :
128 ConjugateList< CandidateClass >( dchain::conjugation::kNone ),
130 fill(first, last, typename MakerTrait<Neutral>::maker_type() ); }

◆ NeutralVisibleList() [5/5]

template<class Neutral , class CandidateClass = typename Neutral::CandidateClass>
template<class WitnessIterator , class TSelector >
dchain::NeutralVisibleList< Neutral, CandidateClass >::NeutralVisibleList ( WitnessIterator first,
WitnessIterator last,
const TSelector & aFunctionalObject )
inline

Definition at line 133 of file NeutralVisibleList.h.

135 :
136 ConjugateList< CandidateClass >( dchain::conjugation::kNone ),
138 {
139 fill(first, last,
140 typename MakerTrait<Neutral>::maker_type(), aFunctionalObject); }

◆ ~NeutralVisibleList()

template<class Neutral , class CandidateClass >
dchain::NeutralVisibleList< Neutral, CandidateClass >::~NeutralVisibleList ( )
virtual

Definition at line 124 of file NeutralVisibleList.cc.

126{
127}

Member Function Documentation

◆ attempt_insert()

template<class Neutral , class CandidateClass = typename Neutral::CandidateClass>
template<class THolder , class TSelect >
bool dchain::NeutralVisibleList< Neutral, CandidateClass >::attempt_insert ( THolder & pPossible,
const TSelect & aSelect )
inline

Definition at line 195 of file NeutralVisibleList.h.

196 {
197 bool returnValue = (aSelect)(*pPossible);
198 if (returnValue) {
199 this->insert(pPossible);
200 }
201 return returnValue;
202 }
void insert(THolder &pPossible)

Referenced by dchain::NeutralVisibleList< Neutral, CandidateClass >::fill().

◆ erase()

template<class Neutral , class CandidateClass = typename Neutral::CandidateClass>
void dchain::NeutralVisibleList< Neutral, CandidateClass >::erase ( )
inline

Definition at line 210 of file NeutralVisibleList.h.

210 {
212 }

◆ eraseContents()

template<class Neutral , class CandidateClass >
void dchain::NeutralVisibleList< Neutral, CandidateClass >::eraseContents ( )

Definition at line 166 of file NeutralVisibleList.cc.

167{
168 m_list->erase( m_list->begin() ,
169 m_list->end() ) ;
170}

Referenced by dchain::NeutralVisibleList< Neutral, CandidateClass >::erase(), and dchain::NeutralVisibleList< Neutral, CandidateClass >::operator=().

◆ fill() [1/2]

template<class Neutral , class CandidateClass = typename Neutral::CandidateClass>
template<class TMaker , class TSelector >
void dchain::NeutralVisibleList< Neutral, CandidateClass >::fill ( const LabeledParticleList< Neutral, CandidateClass > & aList,
const TMaker & aMaker,
const TSelector & aSel )
inline

Definition at line 216 of file NeutralVisibleList.h.

218 {
219
220 for( const_iterator entry(aList.begin()); entry != aList.end(); ++entry){
221 //NOTE: even though this is really just calling the copy constructor
222 //it is best to use the maker since it allows further control
223 const Neutral& from((*entry)());
224 typename ResultTypeTrait<TMaker>::type localCopy( aMaker(from) );
225
226 attempt_insert(localCopy,aSel);
227 }
228
229 }
bool attempt_insert(THolder &pPossible, const TSelect &aSelect)
dchain::WholeItr< Neutral > const_iterator
T::result_type type
Definition MakerTrait.h:55

Referenced by dchain::fill_using_selector(), dchain::NeutralVisibleList< Neutral, CandidateClass >::NeutralVisibleList(), dchain::NeutralVisibleList< Neutral, CandidateClass >::NeutralVisibleList(), dchain::NeutralVisibleList< Neutral, CandidateClass >::NeutralVisibleList(), and dchain::NeutralVisibleList< Neutral, CandidateClass >::operator=().

◆ fill() [2/2]

template<class Neutral , class CandidateClass = typename Neutral::CandidateClass>
template<class Iterator , class TMaker , class TSelector >
void dchain::NeutralVisibleList< Neutral, CandidateClass >::fill ( Iterator first,
Iterator last,
const TMaker & aMaker,
const TSelector & aSel = SelectAll<Neutral>() )
inline

Definition at line 231 of file NeutralVisibleList.h.

233 {
234 std::transform(first,last,
235 selectiveInserter(aSel),
236 aMaker);
237 }
SelectiveInserter< self_type, TSelect > selectiveInserter(const TSelect &iSelect)
creates an insert iterator that filters based on iSelect

◆ insert()

template<class Neutral , class CandidateClass = typename Neutral::CandidateClass>
template<class THolder >
void dchain::NeutralVisibleList< Neutral, CandidateClass >::insert ( THolder & pPossible)
inline

Definition at line 204 of file NeutralVisibleList.h.

204 {
205 m_list->push_back( LabeledParticle< Neutral >( pPossible ,
207 }

Referenced by dchain::NeutralVisibleList< Neutral, CandidateClass >::attempt_insert().

◆ iterate() [1/2]

template<class Neutral , class CandidateClass = typename Neutral::CandidateClass>
template<class TAnalyze >
void dchain::NeutralVisibleList< Neutral, CandidateClass >::iterate ( const TAnalyze & analyze) const
inline

Definition at line 170 of file NeutralVisibleList.h.

170 {
171 const_iterator finished ( particle_end() ) ;
172 for ( const_iterator entry ( particle_begin() ) ;
173 entry != finished ;
174 ++entry ) {
175 analyze( (*entry)() ) ;
176 }
177 }

◆ iterate() [2/2]

template<class Neutral , class CandidateClass = typename Neutral::CandidateClass>
template<class TAnalyze >
void dchain::NeutralVisibleList< Neutral, CandidateClass >::iterate ( TAnalyze & analyze) const
inline

Definition at line 180 of file NeutralVisibleList.h.

180 {
181 const_iterator finished ( particle_end() ) ;
182 for ( const_iterator entry ( particle_begin() ) ;
183 entry != finished ;
184 ++entry ) {
185 analyze( (*entry)() ) ;
186 }
187 }

◆ labeledCandidateList() [1/2]

template<class Neutral , class CandidateClass >
dchain::LabeledParticleList< Neutral, CandidateClass > & dchain::NeutralVisibleList< Neutral, CandidateClass >::labeledCandidateList ( )
protectedvirtual

Implements dchain::CandidateList< CandidateClass >.

Definition at line 159 of file NeutralVisibleList.cc.

160{
161 return ( *m_list ) ;
162}

Referenced by DCNeutralVisibleList< Neutral, CandidateClass >::operator=().

◆ labeledCandidateList() [2/2]

template<class Neutral , class CandidateClass >
const dchain::LabeledParticleList< Neutral, CandidateClass > & dchain::NeutralVisibleList< Neutral, CandidateClass >::labeledCandidateList ( ) const
protectedvirtual

Implements dchain::CandidateList< CandidateClass >.

Definition at line 192 of file NeutralVisibleList.cc.

193{
194 return ( *m_list ) ;
195}

◆ operator=() [1/2]

template<class Neutral , class CandidateClass >
const NeutralVisibleList< Neutral, CandidateClass > & dchain::NeutralVisibleList< Neutral, CandidateClass >::operator= ( const self_type & aOtherList)

Definition at line 134 of file NeutralVisibleList.cc.

135{
136 eraseContents() ;
137 typedef typename MakerTrait<Neutral>::maker_type Maker;
138 fill( *(aOtherList.m_list), Maker(), SelectAll<Neutral>() ) ;
139 return ( *this ) ;
140}

◆ operator=() [2/2]

template<class Neutral , class CandidateClass = typename Neutral::CandidateClass>
template<class Witness >
const self_type & dchain::NeutralVisibleList< Neutral, CandidateClass >::operator= ( const Witness & aWitnessList)
inline

Definition at line 147 of file NeutralVisibleList.h.

147 {
149 fill(aWitnessList.begin(), aWitnessList.end(),
152 return ( *this ) ;
153 }

◆ operator[]()

template<class Neutral , class CandidateClass = typename Neutral::CandidateClass>
template<class TSelector >
FillListWithSelection< self_type, TSelector > dchain::NeutralVisibleList< Neutral, CandidateClass >::operator[] ( const TSelector & iSel)
inline

Definition at line 157 of file NeutralVisibleList.h.

◆ particle_begin() [1/2]

template<class Neutral , class CandidateClass >
NeutralVisibleList< Neutral, CandidateClass >::iterator dchain::NeutralVisibleList< Neutral, CandidateClass >::particle_begin ( )

◆ particle_begin() [2/2]

template<class Neutral , class CandidateClass >
NeutralVisibleList< Neutral, CandidateClass >::const_iterator dchain::NeutralVisibleList< Neutral, CandidateClass >::particle_begin ( ) const

Definition at line 177 of file NeutralVisibleList.cc.

178{
179// Need to cast to 'const' to get the right function call
180 return ( (*(const dchain::LabeledParticleList< Neutral , CandidateClass >*)(m_list.pointer())).begin() ) ;
181}

◆ particle_end() [1/2]

template<class Neutral , class CandidateClass >
NeutralVisibleList< Neutral, CandidateClass >::iterator dchain::NeutralVisibleList< Neutral, CandidateClass >::particle_end ( )

◆ particle_end() [2/2]

template<class Neutral , class CandidateClass >
NeutralVisibleList< Neutral, CandidateClass >::const_iterator dchain::NeutralVisibleList< Neutral, CandidateClass >::particle_end ( ) const

Definition at line 184 of file NeutralVisibleList.cc.

185{
186// Need to cast to 'const' to get the right function call
187 return ( (*(const dchain::LabeledParticleList< Neutral , CandidateClass >*)(m_list.pointer())).end() ) ;
188}

◆ selectiveInserter()

template<class Neutral , class CandidateClass = typename Neutral::CandidateClass>
template<class TSelect >
SelectiveInserter< self_type, TSelect > dchain::NeutralVisibleList< Neutral, CandidateClass >::selectiveInserter ( const TSelect & iSelect)
inline

creates an insert iterator that filters based on iSelect

Definition at line 191 of file NeutralVisibleList.h.

191 {
192 return SelectiveInserter<self_type,TSelect>(*this,iSelect); }

Referenced by dchain::NeutralVisibleList< Neutral, CandidateClass >::fill().


The documentation for this class was generated from the following files: