BOSS 7.1.1
BESIII Offline Software System
Loading...
Searching...
No Matches
LabeledParticleList.h
Go to the documentation of this file.
1#ifndef DCHAIN_LABELEDPARTICLELIST_H
2#define DCHAIN_LABELEDPARTICLELIST_H
3// -*- C++ -*-
4//
5// Package: DChain
6// Module: LabeledDecayList
7//
8// Description: Container of `primary'/`conjugate' particle subclasses of Candidate
9//
10// Usage:
11// <usage>
12//
13// Author: Simon Patton
14// Created: Fri Sep 13 17:58:11 EDT 1996
15// $Id: LabeledParticleList.h,v 1.1.1.1 2009/03/03 06:06:56 maqm Exp $
16//
17// Revision history
18//
19// $Log: LabeledParticleList.h,v $
20// Revision 1.1.1.1 2009/03/03 06:06:56 maqm
21// first import of DecayChain
22//
23// Revision 1.1 2006/01/11 20:28:29 cdj
24// massive class renaming, addition of [] for selection and unit tests
25//
26// Revision 1.1.1.1 2000/12/18 22:16:53 cdj
27// imported DChain
28//
29// Revision 1.17 1998/08/28 05:19:16 sjp
30// Updated to subclass from IndexedLabeled class
31//
32// Revision 1.16 1998/08/21 00:52:42 sjp
33// Modifier to no longer use typedefs
34//
35// Revision 1.15 1998/08/20 19:59:04 sjp
36// Modified to use DChainBoolean
37//
38// Revision 1.14 1998/08/19 20:39:51 sjp
39// Fixed include path for defintions
40//
41// Revision 1.13 1998/05/04 19:08:00 sjp
42// Move forward declaration of vector, so alway made
43//
44// Revision 1.12 1998/04/17 19:11:03 sjp
45// Modified to use latest types
46//
47// Revision 1.11 1997/08/28 06:59:52 sjp
48// Modified files to handle complete templating
49//
50// Revision 1.10 1997/08/26 04:14:13 sjp
51// Made Candidate handling objects into `CandidateClass' Templates
52//
53// Revision 1.9 1997/08/19 23:02:22 sjp
54// Restructured package to be independent of Rock
55//
56// Revision 1.8 1997/08/19 16:17:43 sjp
57// Improved handling of STL containers
58//
59// Revision 1.7 1997/08/15 21:32:26 sjp
60// Updated to use <package>/<file>.h include structure.
61// Updated to use bug flags specified in Experiement.h
62//
63// Revision 1.6 1997/01/31 20:17:07 sjp
64// Modified to use the new `bug' include files
65//
66// Revision 1.5 1997/01/22 16:27:23 sjp
67// Fixed error in pre-processor labels
68//
69// Revision 1.4 1997/01/21 20:33:54 sjp
70// Changed CPP flags and include because of library reorganization
71//
72// Revision 1.3 1997/01/19 20:28:38 sjp
73// Changed LargeCount to Count
74//
75// Revision 1.2 1996/12/20 21:19:14 sjp
76// Extended pathnames for Include files
77//
78// Revision 1.1 1996/11/04 19:36:02 sjp
79// New file for new `List' module
80//
81
82// system include files
83
84// user include files
85#include "DecayChain/Element/conjugation.h" // enumarator
86#include "DecayChain/List/IndexedLabeledParticles.h" // superclass
91
92#include <vector>
93
94#ifndef _labeledparticlelist_vector_
95// The following CPP macro is used to avoid having to typedef
96// a map in the class. Why? Because things can get messy, at
97// least in the g++ compiler as the typedef can cause instantiation
98// when not all the necessary information is available!
99#define _labeledparticlelist_vector_ std::vector< LabeledParticle< ParticleClass > >
100#endif
101
102//
103// Note: To avoid a myriad of conpiler flags it is easier to
104// have a two parameter template class. The instantiation
105// of this class must look like
106//
107// template class LabeledDecayList< A , A::CandidateClass > ;
108
109namespace dchain {
110template < class ParticleClass , class CandidateClass >
112 : public IndexedLabeledParticles< ParticleClass , CandidateClass >
113{
114 // friend classses and functions
115
116 public:
117 // constants, enums and typedefs
121
122 // Constructors and destructor
124 virtual ~LabeledParticleList() ;
125
126 // member functions
127 LabeledParticle< ParticleClass >& operator[]( const int aIndex ) ;
128 iterator begin() ;
129 iterator end() ;
130 void push_back( const LabeledParticle< ParticleClass >& aEntry ) ;
131 virtual void erase_elements( int aStart ,
132 int aFinish ) ;
133
134 // const member functions
135 const LabeledParticle< ParticleClass >& operator[]( const int aIndex ) const ;
136 virtual bool empty() const ;
137 virtual bool empty( const typename conjugation::Label aLabel ) const ;
138 virtual int size() const ;
139 virtual int size( const typename conjugation::Label aLabel ) const ;
140 const_iterator begin() const ;
141 const_partial_iterator begin( const typename conjugation::Label aLabel ) const ;
142 const_iterator end() const ;
143 const_partial_iterator end( const typename conjugation::Label aLabel ) const ;
144
145 // static member functions
146
147 protected:
148 // protected member functions
149 virtual LabeledCandidate< CandidateClass >& labeledCandidateClass( const int aIndex ) ;
150 virtual LabeledParticle< ParticleClass >& labeledParticleClass( const int aIndex ) ;
151
152 // protected const member functions
153 virtual const LabeledCandidate< CandidateClass >& labeledCandidateClass( const int aIndex ) const ;
154 virtual const LabeledParticle< ParticleClass >& labeledParticleClass( const int aIndex ) const ;
155
156 private:
157 // Constructors and destructor
159
160 // assignment operator(s)
162
163 // private member functions
164
165 // private const member functions
166
167 // data members
169
170 // static data members
171
172} ;
173}
174// inline function definitions
175
176// function definitions
178
179#endif /* DCHAIN_LABELEDPARTICLELIST_H */
#define _labeledparticlelist_vector_
PartialItr< ParticleClass > const_partial_iterator
virtual void erase_elements(int aStart, int aFinish)
virtual LabeledCandidate< CandidateClass > & labeledCandidateClass(const int aIndex)
LabeledParticle< ParticleClass > & operator[](const int aIndex)
MuteWholeItr< ParticleClass > iterator
WholeItr< ParticleClass > const_iterator
virtual LabeledParticle< ParticleClass > & labeledParticleClass(const int aIndex)
void push_back(const LabeledParticle< ParticleClass > &aEntry)