BOSS 7.1.2
BESIII Offline Software System
Loading...
Searching...
No Matches
ConjugateList.h
Go to the documentation of this file.
1#ifndef DCHAIN_CONJUGATELIST_H
2#define DCHAIN_CONJUGATELIST_H
3// -*- C++ -*-
4//
5// Package: DChain
6// Module: ConjugateList
7//
8// Description: container of subclasses of Candidate, used for partial iteration
9//
10// Usage:
11// <usage>
12//
13// Author: Simon Patton
14// Created: Wed Sep 11 15:59:57 EDT 1996
15// $Id: ConjugateList.h,v 1.2 2022/01/18 05:02:15 maqm Exp $
16//
17// Revision history
18//
19// $Log: ConjugateList.h,v $
20// Revision 1.2 2022/01/18 05:02:15 maqm
21// upgarde to gcc4.9.3
22//
23// Revision 1.1.1.1 2009/03/03 06:06:56 maqm
24// first import of DecayChain
25//
26// Revision 1.1 2006/01/11 20:28:22 cdj
27// massive class renaming, addition of [] for selection and unit tests
28//
29// Revision 1.2 2001/04/04 15:01:00 cdj
30// made label public (needed for storage)
31//
32// Revision 1.1.1.1 2000/12/18 22:16:52 cdj
33// imported DChain
34//
35// Revision 1.12 1998/08/21 00:52:41 sjp
36// Modifier to no longer use typedefs
37//
38// Revision 1.11 1998/08/20 19:59:01 sjp
39// Modified to use DChainBoolean
40//
41// Revision 1.10 1998/04/17 19:11:02 sjp
42// Modified to use latest types
43//
44// Revision 1.9 1997/08/28 06:59:50 sjp
45// Modified files to handle complete templating
46//
47// Revision 1.8 1997/08/26 04:14:12 sjp
48// Made Candidate handling objects into `CandidateClass' Templates
49//
50// Revision 1.7 1997/08/19 23:02:18 sjp
51// Restructured package to be independent of Rock
52//
53// Revision 1.6 1997/08/15 21:32:16 sjp
54// Updated to use <package>/<file>.h include structure.
55// Updated to use bug flags specified in Experiement.h
56//
57// Revision 1.5 1997/01/22 16:27:16 sjp
58// Fixed error in pre-processor labels
59//
60// Revision 1.4 1997/01/21 20:33:45 sjp
61// Changed CPP flags and include because of library reorganization
62//
63// Revision 1.3 1997/01/19 20:28:35 sjp
64// Changed LargeCount to Count
65//
66// Revision 1.2 1996/12/20 21:19:08 sjp
67// Extended pathnames for Include files
68//
69// Revision 1.1 1996/11/04 19:35:54 sjp
70// New file for new `List' module
71//
72
73// system include files
74
75// user include files
76#include "DecayChain/Element/conjugation.h" // enum
77#include "DecayChain/List/CandidateList.h" // superclass declaration
78
79// forward declarations
80template < class Arg > class DCAnalysisFunction ;
81template < class Arg > class DCConjugateFunction ;
82template < class Arg > class DCCombinatoricQuery ;
83
84namespace dchain {
85template < class CandidateClass >
86class ConjugateList : public dchain::CandidateList< CandidateClass >
87{
88 // friend classses and functions
89// DCCombinatoricQuery is a friend so that CombinatoricList can check the
90// LabeledCandidateList and Label to determine whether a set of
91// ConjugateLists are self-conjugate, and can use
92// conjugate_partial_begin() and conjugate_partial_end() to build up
93// the `conjugate' half of the DCCombinatoricQuery
94 friend class DCCombinatoricQuery< CandidateClass > ;
95
96 public:
97 // constants, enums and typedefs
101 // Constructors and destructor
102 ConjugateList( const conjugation::Label aLabel ) ;
103 virtual ~ConjugateList() ;
104
105 // member functions
106
107 // const member functions
108 virtual bool isSelfConjugate() const ;
109 bool isConjugateOf( const ConjugateList< CandidateClass >& aList ) const ;
110 int partial_size() const ;
111
112 virtual const_partial_iterator partial_begin() const ;
113 virtual const_partial_iterator partial_end() const ;
114
115 /** TAnalyzer takes two arguments
116 1) const CandidateClass&
117 2) a bool which is 'true' if the candiate matches the present conjugation
118 */
119 template <class TAnalyzer>
120 void conjugation_iterate( const TAnalyzer& analyzer) const
121 {
122 const_iterator finished ( this->end() ) ;
123 for ( const_iterator entry ( this->begin() ) ;
124 entry != finished ;
125 ++entry ) {
126 analyze( (*entry)() , (*entry).label() == m_label ) ;
127 }
128 }
129
130 template<class TAnalyzer>
131 void partial_iterate( const TAnalyzer& analyze ) const {
132 const_partial_iterator finished ( partial_end() ) ;
133 for ( const_partial_iterator entry ( partial_begin() ) ;
134 entry != finished ;
135 ++entry ) {
136 analyze( (*entry)() ) ;
137 }
138 }
139
140
141 // static member functions
142
143 // special member functions
144//- Note: following two function are used by DCCombinatoricQuery only!
147
148 virtual conjugation::Label label() const ;
149
150 //protected:
151 public:
152 // protected member functions
153 void setLabel( const conjugation::Label aLabel) ;
154
155 // protected const member functions
156
157 private:
158 // Constructors and destructor
159 ConjugateList() ; // stop default
160 ConjugateList( const ConjugateList& ) ; // stop default
161
162 // assignment operator(s)
163 const ConjugateList& operator=( const ConjugateList& ) ; // stop default
164
165 // private member functions
166
167 // private const member functions
168
169 // data members
170 conjugation::Label m_label ;
171
172 // static data members
173
174};
175
176// inline function definitions
177}
178
179// function definitions
181
182#endif /* DCHAIN_CONJUGATELIST_H */
virtual iterator begin()
virtual iterator end()
const_partial_iterator conjugate_partial_begin() const
bool isConjugateOf(const ConjugateList< CandidateClass > &aList) const
dchain::MuteWholeCandidateItr< CandidateClass > iterator
dchain::PartialCandidateItr< CandidateClass > const_partial_iterator
const_partial_iterator conjugate_partial_end() const
virtual conjugation::Label label() const
dchain::WholeCandidateItr< CandidateClass > const_iterator
virtual const_partial_iterator partial_begin() const
void setLabel(const conjugation::Label aLabel)
void conjugation_iterate(const TAnalyzer &analyzer) const
virtual bool isSelfConjugate() const
virtual const_partial_iterator partial_end() const
void partial_iterate(const TAnalyzer &analyze) const