BOSS 7.1.1
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
 
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 ()
 
- 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
 
- Protected Member Functions inherited from dchain::IndexedLabeledParticles< ParticleClass, CandidateClass >
- Protected Member Functions inherited from dchain::LabeledCandidateList< CandidateClass >
- Protected Member Functions inherited from dchain::IndexedLabeledCandidates< CandidateClass >

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 >
WholeItr< ParticleClass > dchain::LabeledParticleList< ParticleClass, CandidateClass >::const_iterator

Definition at line 119 of file LabeledParticleList.h.

◆ const_partial_iterator

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

Definition at line 120 of file LabeledParticleList.h.

◆ iterator

template<class ParticleClass , class CandidateClass >
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 109 of file LabeledParticleList.cc.

109 :
110 m_list( *(new _labeledparticlelist_vector_ ) )
111{
112}
#define _labeledparticlelist_vector_

◆ ~LabeledParticleList()

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

Definition at line 120 of file LabeledParticleList.cc.

121{
122 delete( &m_list ) ;
123}

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 ( ) const

Definition at line 267 of file LabeledParticleList.cc.

268{
269 return ( const_iterator( this , 0 ) ) ;
270}
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 275 of file LabeledParticleList.cc.

276{
277 return ( const_partial_iterator( this , 0 , aLabel ) ) ;
278}
PartialItr< ParticleClass > const_partial_iterator

◆ empty() [1/2]

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

Implements dchain::LabeledCandidateList< CandidateClass >.

Definition at line 209 of file LabeledParticleList.cc.

210{
211 return ( m_list.empty() ) ;
212}

◆ 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 217 of file LabeledParticleList.cc.

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

◆ 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 ( ) const

Definition at line 283 of file LabeledParticleList.cc.

284{
285 return ( const_iterator( this , m_list.size() ) ) ;
286}

◆ 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 291 of file LabeledParticleList.cc.

292{
293 return ( const_partial_iterator( this , m_list.size() , aLabel ) ) ;
294}

◆ 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 171 of file LabeledParticleList.cc.

173{
174 m_list.erase( m_list.begin() + aStart ,
175 m_list.begin() + aFinish ) ;
176}

◆ 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 181 of file LabeledParticleList.cc.

182{
183 return ( labeledParticleClass( aIndex ) ) ;
184}
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 299 of file LabeledParticleList.cc.

300{
301 return ( labeledParticleClass( aIndex ) ) ;
302}

◆ 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 189 of file LabeledParticleList.cc.

190{
191 return ( m_list[ aIndex ] ) ;
192}

◆ 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 307 of file LabeledParticleList.cc.

308{
309 return ( m_list[ aIndex ] ) ;
310}

◆ operator[]() [1/2]

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

Definition at line 140 of file LabeledParticleList.cc.

140 {
141 return ( labeledParticleClass( aIndex ) ) ;
142}

◆ operator[]() [2/2]

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

Definition at line 201 of file LabeledParticleList.cc.

202{
203 return ( labeledParticleClass( aIndex ) ) ;
204}

◆ push_back()

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

Definition at line 163 of file LabeledParticleList.cc.

164{
165 m_list.push_back( aEntry ) ;
166}

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

◆ size() [1/2]

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

Implements dchain::LabeledCandidateList< CandidateClass >.

Definition at line 230 of file LabeledParticleList.cc.

231{
232 return ( m_list.size() ) ;
233}

◆ 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 238 of file LabeledParticleList.cc.

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

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