BOSS 6.6.4.p01
BESIII Offline Software System
Loading...
Searching...
No Matches
dchain::LabeledParticleList< ParticleClass, CandidateClass > Class Template Reference

#include <LabeledParticleList.h>

+ Inheritance diagram for dchain::LabeledParticleList< ParticleClass, CandidateClass >:

Public Types

typedef MuteWholeItr< ParticleClass > iterator
 
typedef WholeItr< ParticleClass > const_iterator
 
typedef PartialItr< ParticleClass > const_partial_iterator
 
- Public Types inherited from dchain::LabeledCandidateList< CandidateClass >
typedef MuteWholeCandidateItr< CandidateClass > iterator
 
typedef WholeCandidateItr< CandidateClass > const_iterator
 
typedef PartialCandidateItr< CandidateClass > const_partial_iterator
 
typedef LabeledCandidate< CandidateClass > value_type
 

Public Member Functions

 LabeledParticleList ()
 
virtual ~LabeledParticleList ()
 
LabeledParticle< ParticleClass > & operator[] (const int aIndex)
 
iterator begin ()
 
iterator end ()
 
void push_back (const LabeledParticle< ParticleClass > &aEntry)
 
virtual void erase_elements (int aStart, int aFinish)
 
const LabeledParticle< ParticleClass > & operator[] (const int aIndex) const
 
virtual bool empty () const
 
virtual bool empty (const typename conjugation::Label aLabel) const
 
virtual int size () const
 
virtual int size (const typename conjugation::Label aLabel) const
 
const_iterator begin () const
 
const_partial_iterator begin (const typename conjugation::Label aLabel) const
 
const_iterator end () const
 
const_partial_iterator end (const typename conjugation::Label aLabel) const
 
- Public Member Functions inherited from dchain::IndexedLabeledParticles< ParticleClass, CandidateClass >
 IndexedLabeledParticles ()
 
virtual ~IndexedLabeledParticles ()
 
- Public Member Functions inherited from dchain::LabeledCandidateList< CandidateClass >
 LabeledCandidateList ()
 
virtual ~LabeledCandidateList ()
 
LabeledCandidate< CandidateClass > & operator[] (const int aIndex)
 
iterator begin ()
 
iterator end ()
 
void erase (iterator aStart, iterator aFinish)
 
const LabeledCandidate< CandidateClass > & operator[] (const int aIndex) const
 
virtual bool empty () const =0
 
virtual bool empty (const conjugation::Label aLabel) const =0
 
virtual int size () const =0
 
virtual int size (const conjugation::Label aLabel) const =0
 
const_iterator begin () const
 
const_partial_iterator begin (const conjugation::Label aLabel) const
 
const_iterator end () const
 
const_partial_iterator end (const conjugation::Label aLabel) const
 
- Public Member Functions inherited from dchain::IndexedLabeledCandidates< CandidateClass >
 IndexedLabeledCandidates ()
 
virtual ~IndexedLabeledCandidates ()
 
virtual int size () const =0
 
- Public Member Functions inherited from dchain::ReferenceCount
 ReferenceCount ()
 
virtual ~ReferenceCount ()
 
void addLink () const
 
void dropLink () const
 

Protected Member Functions

virtual LabeledCandidate< CandidateClass > & labeledCandidateClass (const int aIndex)
 
virtual LabeledParticle< ParticleClass > & labeledParticleClass (const int aIndex)
 
virtual const LabeledCandidate< CandidateClass > & labeledCandidateClass (const int aIndex) const
 
virtual const LabeledParticle< ParticleClass > & labeledParticleClass (const int aIndex) const
 
virtual LabeledParticle< ParticleClass > & labeledParticleClass (const int aIndex)=0
 
virtual const LabeledParticle< ParticleClass > & labeledParticleClass (const int aIndex) const=0
 
virtual LabeledCandidate< CandidateClass > & labeledCandidateClass (const int aIndex)=0
 
virtual void erase_elements (int aStart, int aFinish)=0
 
virtual const LabeledCandidate< CandidateClass > & labeledCandidateClass (const int aIndex) const =0
 
virtual dchain::LabeledCandidate< CandidateClass > & labeledCandidateClass (const int aIndex)=0
 
virtual const dchain::LabeledCandidate< CandidateClass > & labeledCandidateClass (const int aIndex) const =0
 

Detailed Description

template<class ParticleClass, class CandidateClass>
class dchain::LabeledParticleList< ParticleClass, CandidateClass >

Definition at line 111 of file LabeledParticleList.h.

Member Typedef Documentation

◆ const_iterator

template<class ParticleClass , class CandidateClass >
typedef WholeItr< ParticleClass > dchain::LabeledParticleList< ParticleClass, CandidateClass >::const_iterator

Definition at line 119 of file LabeledParticleList.h.

◆ const_partial_iterator

template<class ParticleClass , class CandidateClass >
typedef PartialItr< ParticleClass > dchain::LabeledParticleList< ParticleClass, CandidateClass >::const_partial_iterator

Definition at line 120 of file LabeledParticleList.h.

◆ iterator

template<class ParticleClass , class CandidateClass >
typedef MuteWholeItr< ParticleClass > dchain::LabeledParticleList< ParticleClass, CandidateClass >::iterator

Definition at line 118 of file LabeledParticleList.h.

Constructor & Destructor Documentation

◆ LabeledParticleList()

template<class ParticleClass , class CandidateClass >
LabeledParticleList< ParticleClass, CandidateClass >::LabeledParticleList

Definition at line 106 of file LabeledParticleList.cc.

106 :
107 m_list( *(new _labeledparticlelist_vector_ ) )
108{
109}
#define _labeledparticlelist_vector_

◆ ~LabeledParticleList()

template<class ParticleClass , class CandidateClass >
LabeledParticleList< ParticleClass, CandidateClass >::~LabeledParticleList
virtual

Definition at line 117 of file LabeledParticleList.cc.

118{
119 delete( &m_list ) ;
120}

Member Function Documentation

◆ begin() [1/3]

template<class ParticleClass , class CandidateClass >
LabeledParticleList< ParticleClass, CandidateClass >::iterator LabeledParticleList< ParticleClass, CandidateClass >::begin

◆ begin() [2/3]

template<class ParticleClass , class CandidateClass >
LabeledParticleList< ParticleClass, CandidateClass >::const_iterator LabeledParticleList< ParticleClass, CandidateClass >::begin

Definition at line 264 of file LabeledParticleList.cc.

265{
266 return ( const_iterator( this , 0 ) ) ;
267}
WholeItr< ParticleClass > const_iterator

◆ begin() [3/3]

template<class ParticleClass , class CandidateClass >
LabeledParticleList< ParticleClass, CandidateClass >::const_partial_iterator LabeledParticleList< ParticleClass, CandidateClass >::begin ( const typename conjugation::Label  aLabel) const

Definition at line 272 of file LabeledParticleList.cc.

273{
274 return ( const_partial_iterator( this , 0 , aLabel ) ) ;
275}
PartialItr< ParticleClass > const_partial_iterator

◆ empty() [1/2]

template<class ParticleClass , class CandidateClass >
bool LabeledParticleList< ParticleClass, CandidateClass >::empty
virtual

Implements dchain::LabeledCandidateList< CandidateClass >.

Definition at line 206 of file LabeledParticleList.cc.

207{
208 return ( m_list.empty() ) ;
209}

◆ empty() [2/2]

template<class ParticleClass , class CandidateClass >
bool LabeledParticleList< ParticleClass, CandidateClass >::empty ( const typename conjugation::Label  aLabel) const
virtual

Implements dchain::LabeledCandidateList< CandidateClass >.

Definition at line 214 of file LabeledParticleList.cc.

215{
216// for efficiency, check to see if the whole list is empty first
217 if ( m_list.empty() ) {
218 return ( !false ) ;
219 }
220 return ( const_partial_iterator( this , 0 , aLabel ) ==
221 const_partial_iterator( this , m_list.size() , aLabel ) ) ;
222}

◆ end() [1/3]

template<class ParticleClass , class CandidateClass >
LabeledParticleList< ParticleClass, CandidateClass >::iterator LabeledParticleList< ParticleClass, CandidateClass >::end

◆ end() [2/3]

template<class ParticleClass , class CandidateClass >
LabeledParticleList< ParticleClass, CandidateClass >::const_iterator LabeledParticleList< ParticleClass, CandidateClass >::end

Definition at line 280 of file LabeledParticleList.cc.

281{
282 return ( const_iterator( this , m_list.size() ) ) ;
283}

◆ end() [3/3]

template<class ParticleClass , class CandidateClass >
LabeledParticleList< ParticleClass, CandidateClass >::const_partial_iterator LabeledParticleList< ParticleClass, CandidateClass >::end ( const typename conjugation::Label  aLabel) const

Definition at line 288 of file LabeledParticleList.cc.

289{
290 return ( const_partial_iterator( this , m_list.size() , aLabel ) ) ;
291}

◆ erase_elements()

template<class ParticleClass , class CandidateClass >
void LabeledParticleList< ParticleClass, CandidateClass >::erase_elements ( int  aStart,
int  aFinish 
)
virtual

Implements dchain::LabeledCandidateList< CandidateClass >.

Definition at line 168 of file LabeledParticleList.cc.

170{
171 m_list.erase( m_list.begin() + aStart ,
172 m_list.begin() + aFinish ) ;
173}

◆ labeledCandidateClass() [1/2]

template<class ParticleClass , class CandidateClass >
LabeledCandidate< CandidateClass > & LabeledParticleList< ParticleClass, CandidateClass >::labeledCandidateClass ( const int  aIndex)
protectedvirtual

Implements dchain::LabeledCandidateList< CandidateClass >.

Definition at line 178 of file LabeledParticleList.cc.

179{
180 return ( labeledParticleClass( aIndex ) ) ;
181}
virtual LabeledParticle< ParticleClass > & labeledParticleClass(const int aIndex)

◆ labeledCandidateClass() [2/2]

template<class ParticleClass , class CandidateClass >
const LabeledCandidate< CandidateClass > & LabeledParticleList< ParticleClass, CandidateClass >::labeledCandidateClass ( const int  aIndex) const
protectedvirtual

Implements dchain::LabeledCandidateList< CandidateClass >.

Definition at line 296 of file LabeledParticleList.cc.

297{
298 return ( labeledParticleClass( aIndex ) ) ;
299}

◆ labeledParticleClass() [1/2]

template<class ParticleClass , class CandidateClass >
LabeledParticle< ParticleClass > & LabeledParticleList< ParticleClass, CandidateClass >::labeledParticleClass ( const int  aIndex)
protectedvirtual

Implements dchain::IndexedLabeledParticles< ParticleClass, CandidateClass >.

Definition at line 186 of file LabeledParticleList.cc.

187{
188 return ( m_list[ aIndex ] ) ;
189}

◆ labeledParticleClass() [2/2]

template<class ParticleClass , class CandidateClass >
const LabeledParticle< ParticleClass > & LabeledParticleList< ParticleClass, CandidateClass >::labeledParticleClass ( const int  aIndex) const
protectedvirtual

Implements dchain::IndexedLabeledParticles< ParticleClass, CandidateClass >.

Definition at line 304 of file LabeledParticleList.cc.

305{
306 return ( m_list[ aIndex ] ) ;
307}

◆ operator[]() [1/2]

template<class ParticleClass , class CandidateClass >
LabeledParticle< ParticleClass > & LabeledParticleList< ParticleClass, CandidateClass >::operator[] ( const int  aIndex)

Definition at line 137 of file LabeledParticleList.cc.

137 {
138 return ( labeledParticleClass( aIndex ) ) ;
139}

◆ operator[]() [2/2]

template<class ParticleClass , class CandidateClass >
const LabeledParticle< ParticleClass > & LabeledParticleList< ParticleClass, CandidateClass >::operator[] ( const int  aIndex) const

Definition at line 198 of file LabeledParticleList.cc.

199{
200 return ( labeledParticleClass( aIndex ) ) ;
201}

◆ push_back()

template<class ParticleClass , class CandidateClass >
void LabeledParticleList< ParticleClass, CandidateClass >::push_back ( const LabeledParticle< ParticleClass > &  aEntry)

Definition at line 160 of file LabeledParticleList.cc.

161{
162 m_list.push_back( aEntry ) ;
163}

Referenced by dchain::FillDecayList< DecayClass, CandidateClass >::doIt().

◆ size() [1/2]

template<class ParticleClass , class CandidateClass >
int LabeledParticleList< ParticleClass, CandidateClass >::size
virtual

Implements dchain::LabeledCandidateList< CandidateClass >.

Definition at line 227 of file LabeledParticleList.cc.

228{
229 return ( m_list.size() ) ;
230}

◆ size() [2/2]

template<class ParticleClass , class CandidateClass >
int LabeledParticleList< ParticleClass, CandidateClass >::size ( const typename conjugation::Label  aLabel) const
virtual

Implements dchain::LabeledCandidateList< CandidateClass >.

Definition at line 235 of file LabeledParticleList.cc.

236{
237// for efficiency, check to see if the whole list is empty first
238 if ( m_list.empty() ) {
239 return ( 0 ) ;
240 }
241 int result( 0 ) ;
242/* Currently the "count" is done explicilty because of deficiencies
243 in the SunOS5 compiler!
244 count( _labeledparticlelist_vector_::const_iterator( m_list.begin() ) ,
245 _labeledparticlelist_vector_::const_iterator( m_list.end() ) ,
246 aLabel ,
247 result ) ;
248 */
249 typename _labeledparticlelist_vector_::const_iterator first( m_list.begin() ) ;
250 typename _labeledparticlelist_vector_::const_iterator last( m_list.end() ) ;
251 while (first != last) {
252 if ( *first == aLabel ) {
253 first++ ;
254 result++ ;
255 }
256 }
257
258 return ( result ) ;
259}
Index first(Pair i)
Definition: EvtCyclic3.cc:195

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