BOSS 6.6.4.p01
BESIII Offline Software System
Loading...
Searching...
No Matches
CandidateList.h
Go to the documentation of this file.
1#ifndef DCHAIN_CANDIDATELIST_H
2#define DCHAIN_CANDIDATELIST_H
3// -*- C++ -*-
4//
5// Package: DChain
6// Module: CandidateList
7//
8// Description: container of subclasses of Candidate, used for iteration
9//
10// Usage:
11// <usage>
12//
13// Author: Simon Patton
14// Created: Wed Sep 11 15:59:57 EDT 1996
15// $Id: CandidateList.h,v 1.1.1.1 2009/03/03 06:06:56 maqm Exp $
16//
17// Revision history
18//
19// $Log: CandidateList.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:20 cdj
24// massive class renaming, addition of [] for selection and unit tests
25//
26// Revision 1.1.1.1 2000/12/18 22:16:51 cdj
27// imported DChain
28//
29// Revision 1.10 1998/08/21 00:52:43 sjp
30// Modifier to no longer use typedefs
31//
32// Revision 1.9 1998/08/20 19:59:06 sjp
33// Modified to use DChainBoolean
34//
35// Revision 1.8 1998/04/17 19:11:06 sjp
36// Modified to use latest types
37//
38// Revision 1.7 1997/08/28 06:59:57 sjp
39// Modified files to handle complete templating
40//
41// Revision 1.6 1997/08/26 04:14:17 sjp
42// Made Candidate handling objects into `CandidateClass' Templates
43//
44// Revision 1.5 1997/08/15 21:32:07 sjp
45// Updated to use <package>/<file>.h include structure.
46// Updated to use bug flags specified in Experiement.h
47//
48// Revision 1.4 1997/01/22 16:27:08 sjp
49// Fixed error in pre-processor labels
50//
51// Revision 1.3 1997/01/21 20:33:36 sjp
52// Changed CPP flags and include because of library reorganization
53//
54// Revision 1.2 1997/01/19 20:28:34 sjp
55// Changed LargeCount to Count
56//
57// Revision 1.1 1996/11/04 19:35:46 sjp
58// New file for new `List' module
59//
60
61// system include files
62
63// user include files
64
65// forward declarations
66namespace dchain {
67
68template < class CandidateClass > class MuteWholeCandidateItr ;
69template < class CandidateClass > class WholeCandidateItr ;
70template < class CandidateClass > class PartialCandidateItr ;
71template < class CandidateClass > class LabeledCandidate ;
72template < class CandidateClass > class LabeledCandidateList ;
73
74
75template < class CandidateClass >
77{
78 // friend classses and functions
79
80 public:
81 // constants, enums and typedefs
85
87 // Constructors and destructor
89 virtual ~CandidateList() ;
90
91 // member functions
92 virtual iterator begin() ;
93 virtual iterator end() ;
94
95 // const member functions
96 virtual bool empty() const ;
97 virtual int size() const ;
98 virtual const_iterator begin() const ;
99 virtual const_iterator end() const ;
100
101 template < class TAnalyzer >
102 void iterate( const TAnalyzer& analyze ) const {
103 const_iterator finished ( end() );
104 for ( const_iterator entry ( begin() ) ;
105 entry != finished ;
106 ++entry ) {
107 analyze( (*entry)() ) ;
108 }
109 }
110
111 // static member functions
112
113 protected:
114 // protected member functions
116
117 // protected const member functions
119
120 private:
121 // Constructors and destructor
122 CandidateList( const CandidateList< CandidateClass >& ) ; // stop default
123
124 // assignment operator(s)
125 const CandidateList& operator=( const CandidateList< CandidateClass >& ) ; // 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}
137// inline function definitions
138
139// function definitions
141
142#endif /* DCHAIN_CANDIDATELIST_H */
dchain::PartialCandidateItr< CandidateClass > const_partial_iterator
Definition: CandidateList.h:84
virtual dchain::LabeledCandidateList< CandidateClass > & labeledCandidateList()=0
virtual iterator begin()
dchain::WholeCandidateItr< CandidateClass > const_iterator
Definition: CandidateList.h:83
virtual bool empty() const
dchain::LabeledCandidate< CandidateClass > value_type
Definition: CandidateList.h:86
void iterate(const TAnalyzer &analyze) const
virtual iterator end()
virtual const dchain::LabeledCandidateList< CandidateClass > & labeledCandidateList() const =0
dchain::MuteWholeCandidateItr< CandidateClass > iterator
Definition: CandidateList.h:82
virtual int size() const