BOSS
8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Event/DecayChain/include/DecayChain/Iterator/PartialItr.h
Go to the documentation of this file.
1
#ifndef DCHAIN_PARTIALITR_H
2
#define DCHAIN_PARTIALITR_H
3
// -*- C++ -*-
4
//
5
// Package: DChain
6
// Module: PartialItr
7
//
8
// Description: a Iterator through one label of a LabeledList.
9
//
10
// Usage:
11
// <usage>
12
//
13
// Author: Simon Patton
14
// Created: Wed Sep 11 21:51:25 EDT 1996
15
// $Id: PartialItr.h,v 1.1.1.1 2009/03/03 06:06:56 maqm Exp $
16
//
17
// Revision history
18
//
19
// $Log: PartialItr.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:18 cdj
24
// massive class renaming, addition of [] for selection and unit tests
25
//
26
// Revision 1.1.1.1 2000/12/18 22:16:50 cdj
27
// imported DChain
28
//
29
// Revision 1.12 1998/08/28 05:16:08 sjp
30
// Updated to use IndexedLabeled classes
31
//
32
// Revision 1.11 1998/08/21 00:53:59 sjp
33
// fixed bad forward declaration
34
//
35
// Revision 1.10 1997/08/28 06:59:27 sjp
36
// Modified files to handle complete templating
37
//
38
// Revision 1.9 1997/08/26 04:13:26 sjp
39
// Made Candidate handling objects into `CandidateClass' Templates
40
//
41
// Revision 1.8 1997/08/19 23:01:59 sjp
42
// Restructured package to be independent of Rock
43
//
44
// Revision 1.7 1997/08/15 21:32:36 sjp
45
// Updated to use <package>/<file>.h include structure.
46
// Updated to use bug flags specified in Experiement.h
47
//
48
// Revision 1.6 1997/01/31 20:17:12 sjp
49
// Modified to use the new `bug' include files
50
//
51
// Revision 1.5 1997/01/22 16:27:31 sjp
52
// Fixed error in pre-processor labels
53
//
54
// Revision 1.4 1997/01/21 20:34:04 sjp
55
// Changed CPP flags and include because of library reorganization
56
//
57
// Revision 1.3 1996/12/31 17:46:42 sjp
58
// Replaced ptrdiff with member type distance
59
//
60
// Revision 1.2 1996/12/20 21:19:21 sjp
61
// Extended pathnames for Include files
62
//
63
// Revision 1.1 1996/11/04 19:36:10 sjp
64
// New file for new `List' module
65
//
66
67
// system include files
68
69
// user include files
70
#include "DecayChain/Element/LabeledParticle.h"
71
#include "DecayChain/Element/conjugation.h"
// enumarator
72
#include "DecayChain/Iterator/PartialCandidateItr.h"
// superclass
73
#include "DecayChain/List/IndexedLabeledParticles.h"
74
75
// forward declarations
76
namespace
dchain
{
77
template
<
class
T>
class
LabeledParticle
;
78
template
<
class
T,
class
Cand
id
ateClass>
class
LabeledParticleList
;
79
// template < class T , class CandidateClass > class IndexedLabeledParticles ;
80
//
81
// Note : some functions are inlines in the declaration becuase too many
82
// compiler bugs make it impractical to have definition outside
83
// the delcaration! This should be reviewed in the future
84
//
85
86
template
<
class
T>
87
class
PartialItr
:
public
PartialCandidateItr
<typename T::CandidateClass> {
88
// friend classses and functions
89
friend
class
LabeledParticleList
<T, typename T::CandidateClass>;
90
91
public
:
92
// constants, enums and typedefs
93
94
// Constructors and destructor
95
PartialItr
( const PartialItr<T>& aOtherItr );
96
// virtual ~PartialItr() ;
97
98
// assignment operator(s)
99
const
PartialItr
<T>& operator=( const PartialItr<T>& aOtherItr );
100
101
// member functions
102
PartialItr
<T>& operator++();
103
PartialItr
<T> operator++( int );
104
PartialItr
<T>& operator--();
105
PartialItr
<T> operator--( int );
106
107
// const member functions
108
const
LabeledParticle
<T>& operator*() const;
109
110
// static member functions
111
112
protected
:
113
// Constructors and destructor
114
PartialItr
( const IndexedLabeledParticles<T, typename T::CandidateClass>* aList,
115
const typename candidateitr::size_type aIndex,
116
const typename conjugation::Label aLabel )
117
:
PartialCandidateItr
<typename T::CandidateClass>( aList, aIndex, aLabel ) {}
118
119
// protected member functions
120
121
// protected const member functions
122
123
private
:
124
// Constructors and destructor
125
PartialItr
();
// stop default
126
127
// private member functions
128
129
// private const member functions
130
131
// data members
132
133
// static data members
134
};
135
136
// inline function definitions
137
138
// user include files
139
//
140
// constructors and destructor
141
//
142
143
template
<
class
T>
144
inline
PartialItr<T>::PartialItr
(
const
PartialItr<T>
& aOtherItr )
145
:
PartialCandidateItr
<typename T::CandidateClass>( aOtherItr ) {}
146
147
//
148
// assignment operators
149
//
150
151
template
<
class
T>
152
inline
const
PartialItr<T>
&
PartialItr<T>::operator=
(
const
PartialItr<T>
& aOtherItr ) {
153
PartialCandidateItr<typename T::CandidateClass>::operator=
( aOtherItr );
154
return
( *
this
);
155
}
156
157
//
158
// member functions
159
//
160
161
template
<
class
T>
inline
PartialItr<T>
&
PartialItr<T>::operator++
() {
162
PartialCandidateItr<typename T::CandidateClass>::operator++
();
163
return
( *
this
);
164
}
165
166
template
<
class
T>
inline
PartialItr<T>
PartialItr<T>::operator++
(
int
) {
167
PartialItr<T>
tmp( *
this
);
168
PartialCandidateItr<typename T::CandidateClass>::operator++
();
169
return
( tmp );
170
}
171
172
template
<
class
T>
inline
PartialItr<T>
&
PartialItr<T>::operator--
() {
173
PartialCandidateItr<typename T::CandidateClass>::operator--
();
174
return
( *
this
);
175
}
176
177
template
<
class
T>
inline
PartialItr<T>
PartialItr<T>::operator--
(
int
) {
178
PartialItr<T>
tmp( *
this
);
179
PartialCandidateItr<typename T::CandidateClass>::operator--
();
180
return
( tmp );
181
}
182
183
//
184
// const member functions
185
//
186
187
template
<
class
T>
inline
const
LabeledParticle<T>
&
PartialItr<T>::operator*
()
const
{
188
return
( ( *(
IndexedLabeledParticles
<
189
T,
typename
T::CandidateClass>*)( this->
indexedCandidates
() ) )
190
.labeledParticleClass( this->
index
() ) );
191
}
192
}
// namespace dchain
193
194
#endif
/* DCHAIN_PARTIALITR_H */
dchain::IndexedLabeledParticles
Definition
InstallArea/x86_64-el9-gcc13-opt/include/DecayChain/List/IndexedLabeledParticles.h:47
dchain::LabeledParticleList
Definition
InstallArea/x86_64-el9-gcc13-opt/include/DecayChain/List/LabeledParticleList.h:111
dchain::LabeledParticle
Definition
Event/DecayChain/include/DecayChain/Element/LabeledParticle.h:72
dchain::PartialCandidateItr::operator=
const PartialCandidateItr< CandidateClass > & operator=(const PartialCandidateItr< CandidateClass > &aOtherItr)
Definition
Event/DecayChain/include/DecayChain/Iterator/PartialCandidateItr.h:170
dchain::PartialCandidateItr::operator--
PartialCandidateItr< CandidateClass > & operator--()
Definition
Event/DecayChain/include/DecayChain/Iterator/PartialCandidateItr.h:217
dchain::PartialCandidateItr::index
size_type index() const
Definition
Event/DecayChain/include/DecayChain/Iterator/PartialCandidateItr.h:126
dchain::PartialCandidateItr< T::CandidateClass >::PartialCandidateItr
PartialCandidateItr()
Definition
Event/DecayChain/include/DecayChain/Iterator/PartialCandidateItr.h:140
dchain::PartialCandidateItr::indexedCandidates
IndexedLabeledCandidates< CandidateClass > * indexedCandidates() const
Definition
Event/DecayChain/include/DecayChain/Iterator/PartialCandidateItr.h:120
dchain::PartialCandidateItr::operator++
PartialCandidateItr< CandidateClass > & operator++()
Definition
Event/DecayChain/include/DecayChain/Iterator/PartialCandidateItr.h:184
dchain::PartialItr::operator*
const LabeledParticle< T > & operator*() const
Definition
Event/DecayChain/include/DecayChain/Iterator/PartialItr.h:187
dchain::PartialItr::operator=
const PartialItr< T > & operator=(const PartialItr< T > &aOtherItr)
Definition
Event/DecayChain/include/DecayChain/Iterator/PartialItr.h:152
dchain::PartialItr::operator--
PartialItr< T > & operator--()
Definition
Event/DecayChain/include/DecayChain/Iterator/PartialItr.h:172
dchain::PartialItr::operator++
PartialItr< T > & operator++()
Definition
Event/DecayChain/include/DecayChain/Iterator/PartialItr.h:161
dchain::PartialItr::PartialItr
PartialItr(const PartialItr< T > &aOtherItr)
Definition
Event/DecayChain/include/DecayChain/Iterator/PartialItr.h:144
dchain
Definition
Event/DecayChain/include/DecayChain/Element/children.h:16
8.0.0
BOSS_Source
Event
DecayChain
include
DecayChain
Iterator
PartialItr.h
Generated by
1.16.1