BOSS 7.1.1
BESIII Offline Software System
Loading...
Searching...
No Matches
MuteWholeCandidateItr.h
Go to the documentation of this file.
1#ifndef DCHAIN_MUTEWHOLECANDIDATEITR_H
2#define DCHAIN_MUTEWHOLECANDIDATEITR_H
3// -*- C++ -*-
4//
5// Package: DChain
6// Module: MuteWholeCandidateItr
7//
8// Description: Iterator through a entire LabeledList.
9//
10// Usage:
11// <usage>
12//
13// Author: Simon Patton
14// Created: Wed Sep 11 21:51:25 EDT 1996
15// $Id: MuteWholeCandidateItr.h,v 1.1.1.1 2009/03/03 06:06:56 maqm Exp $
16//
17// Revision history
18//
19// $Log: MuteWholeCandidateItr.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:17 cdj
24// massive class renaming, addition of [] for selection and unit tests
25//
26//
27
28// system include files
29
30// user include files
31#include "DecayChain/Iterator/candidateitr.h" // distance
33//#include "DecayChain/List/IndexedLabeledCandidates.h"
34
35// forward declarations
36namespace dchain {
37
38template < class CandidateClass > class IndexedLabeledCandidates ;
39template < class CandidateClass> class LabeledCandidate ;
40template < class CandidateClass > class LabeledCandidateList ;
41
42template < class CandidateClass >
43class MuteWholeCandidateItr
44{
45 // friend classses and functions
46 friend class LabeledCandidateList< CandidateClass > ;
47
48 public:
49 // constants, enums and typedefs
54 typedef std::random_access_iterator_tag iterator_category;
57
58 // Constructors and destructor
61
62 // assignment operator(s)
64
65 // member functions
74
75 // const member functions
79 bool operator==( const MuteWholeCandidateItr< CandidateClass >& aOtherItr ) const ;
80 bool operator!=( const MuteWholeCandidateItr< CandidateClass >& aOtherItr ) const ;
81 bool operator<( const MuteWholeCandidateItr< CandidateClass >& aOtherItr ) const ;
82 bool operator>( const MuteWholeCandidateItr< CandidateClass >& aOtherItr ) const ;
83 bool operator>=( const MuteWholeCandidateItr< CandidateClass >& aOtherItr ) const ;
84 bool operator<=( const MuteWholeCandidateItr< CandidateClass >& aOtherItr ) const ;
85
86 // static member functions
87
88 protected:
89 // Constructors and destructor
91 const size_type aIndex ) ;
92
93 // protected member functions
94
95 // protected const member functions
97 size_type index() const ;
98
99 private:
100 // Constructors and destructor
101 MuteWholeCandidateItr() ; // stop default
102
103 // private member functions
104
105 // private const member functions
106
107 // data members
108 IndexedLabeledCandidates< CandidateClass >* m_indexedCandidates ;
109 size_type m_index ;
110
111 // static data members
112
113} ;
114
115template < class CandidateClass >
117
118// inline function definitions
119
120// user include files
121
122//
123// forward definitions of inline functions
124//
125
126template < class CandidateClass >
127inline
132
133template < class CandidateClass >
134inline
139
140//
141// constructors and destructor
142//
143
144template < class CandidateClass >
145inline
147 m_indexedCandidates( aOtherItr.indexedCandidates() ) ,
148 m_index( aOtherItr.index() )
149{
150}
151
152template < class CandidateClass >
153inline
155 const size_type aIndex ) :
156 m_indexedCandidates( (IndexedLabeledCandidates< CandidateClass >*)aList ) ,
157 m_index( aIndex )
158{
159}
160
161//
162// assignment operators
163//
164
165template < class CandidateClass >
166inline
168{
169 m_indexedCandidates = aOtherItr.indexedCandidates() ;
170 m_index = aOtherItr.index() ;
171 return ( *this ) ;
172}
173
174//
175// member functions
176//
177
178template < class CandidateClass >
179inline
185
186template < class CandidateClass >
187inline
194
195template < class CandidateClass >
196inline
202
203template < class CandidateClass >
204inline
211
212template < class CandidateClass >
213inline
219
220template < class CandidateClass >
221inline
227
228template < class CandidateClass >
229inline
235
236template < class CandidateClass >
237inline
243
244//
245// const member functions
246//
247
248template < class CandidateClass >
249inline
251{
252 return ( (*m_indexedCandidates).labeledCandidateClass( m_index ) ) ;
253}
254
255template < class CandidateClass >
256inline
258{
259 return ( (*m_indexedCandidates).labeledCandidateClass( m_index + n ) ) ;
260}
261
262template < class CandidateClass >
263inline
268
269template < class CandidateClass >
270inline
272{
273 return ( ( m_index == aOtherItr.index() ) &&
274 ( m_indexedCandidates == aOtherItr.indexedCandidates() ) ) ;
275}
276
277template < class CandidateClass >
278inline
280{
281 return ( ( m_index != aOtherItr.index() ) ||
282 ( m_indexedCandidates != aOtherItr.indexedCandidates() ) ) ;
283}
284
285template < class CandidateClass >
286inline
288{
289 return ( ( m_index < aOtherItr.index() ) &&
290 ( m_indexedCandidates == aOtherItr.indexedCandidates() ) ) ;
291}
292
293template < class CandidateClass >
294inline
296{
297 return ( ( m_index > aOtherItr.index() ) &&
298 ( m_indexedCandidates == aOtherItr.indexedCandidates() ) ) ;
299}
300
301template < class CandidateClass >
302inline
304{
305 return ( ( m_index >= aOtherItr.index() ) &&
306 ( m_indexedCandidates == aOtherItr.indexedCandidates() ) ) ;
307}
308
309template < class CandidateClass >
310inline
312{
313 return ( ( m_index <= aOtherItr.index() ) &&
314 ( m_indexedCandidates == aOtherItr.indexedCandidates() ) ) ;
315}
316
317template < class CandidateClass >
318inline
320{
321 return ( (CandidateClass*)0 ) ;
322}
323
324}
325
326#endif /* DCHAIN_MUTEWHOLECANDIDATEITR_H */
const Int_t n
const LabeledCandidate< CandidateClass > * pointer
MuteWholeCandidateItr< CandidateClass > & operator++()
bool operator==(const MuteWholeCandidateItr< CandidateClass > &aOtherItr) const
IndexedLabeledCandidates< CandidateClass > * indexedCandidates() const
MuteWholeCandidateItr< CandidateClass > & operator+=(difference_type n)
candidateitr::size_type size_type
const MuteWholeCandidateItr< CandidateClass > & operator=(const MuteWholeCandidateItr< CandidateClass > &aOtherItr)
bool operator>(const MuteWholeCandidateItr< CandidateClass > &aOtherItr) const
MuteWholeCandidateItr< CandidateClass > operator+(difference_type n)
MuteWholeCandidateItr< CandidateClass > operator-(difference_type n)
const LabeledCandidate< CandidateClass > value_type
bool operator>=(const MuteWholeCandidateItr< CandidateClass > &aOtherItr) const
candidateitr::difference_type difference_type
MuteWholeCandidateItr(IndexedLabeledCandidates< CandidateClass > *aList, const size_type aIndex)
const LabeledCandidate< CandidateClass > & reference
candidateitr::size_type distance_type
bool operator<(const MuteWholeCandidateItr< CandidateClass > &aOtherItr) const
bool operator!=(const MuteWholeCandidateItr< CandidateClass > &aOtherItr) const
LabeledCandidate< CandidateClass > & operator[](size_type n) const
MuteWholeCandidateItr< CandidateClass > & operator-=(difference_type n)
LabeledCandidate< CandidateClass > & operator*() const
MuteWholeCandidateItr< CandidateClass > operator++(int)
MuteWholeCandidateItr< CandidateClass > operator--(int)
bool operator<=(const MuteWholeCandidateItr< CandidateClass > &aOtherItr) const
MuteWholeCandidateItr< CandidateClass > & operator--()
MuteWholeCandidateItr(const MuteWholeCandidateItr< CandidateClass > &aOtherItr)
std::random_access_iterator_tag iterator_category
difference_type operator-(const MuteWholeCandidateItr< CandidateClass > &aOtherItr) const
unsigned int size_type
LabeledCandidate< CandidateClass > * value_type(const MuteWholeCandidateItr< CandidateClass > &)