BOSS 7.0.9
BESIII Offline Software System
Loading...
Searching...
No Matches
DCFillableNeutralList.h
Go to the documentation of this file.
1#ifndef DCHAIN_FILLABLENEUTRALLIST_H
2#define DCHAIN_FILLABLENEUTRALLIST_H
3// -*- C++ -*-
4//
5// Package: DChain
6// Module: FillableNeutralList
7//
8// Description: List to hold Candidates generated from observed Tracks.
9//
10// Usage:
11// <usage>
12//
13// Author: Simon Patton
14// Created: Fri Oct 4 11:04:47 EDT 1996
15// $Id: DCFillableNeutralList.h,v 1.1.1.1 2009/03/03 06:06:56 maqm Exp $
16//
17// Revision history
18//
19// $Log: DCFillableNeutralList.h,v $
20// Revision 1.1.1.1 2009/03/03 06:06:56 maqm
21// first import of DecayChain
22//
23// Revision 1.6 2006/01/11 20:28:25 cdj
24// massive class renaming, addition of [] for selection and unit tests
25//
26// Revision 1.5 2003/12/16 15:45:41 cdj
27// added include file needed for Linux
28//
29// Revision 1.4 2002/07/23 20:19:13 cdj
30// Can now use dc_fill even when compiler has templated member functions
31//
32// Revision 1.3 2001/03/28 14:27:57 urner
33// added same workaround as for charged because of NonTemplatedMemberFunctionBug
34//
35// Revision 1.2 2001/03/23 23:07:44 urner
36// modification needed to add pi0 eta and Ks decay lists in CleoDChain
37//
38// Revision 1.1.1.1 2000/12/18 22:16:52 cdj
39// imported DChain
40//
41// Revision 1.3 1998/08/20 19:59:04 sjp
42// Modified to use DChainBoolean
43//
44// Revision 1.2 1998/04/17 19:11:03 sjp
45// Modified to use latest types
46//
47// Revision 1.1 1997/09/17 20:06:20 sjp
48// New class to separate filling from behaviour
49//
50
51// system include files
52#include <vector>
53
54// user include files
55#include "DecayChain/List/DCNeutralVisibleList.h" // superclass declaration
56
57// forward declarations
58
59template< class Neutral >
60// class TruthWitnesses ,
61// class VisibleWitnesses >
63 public DCNeutralVisibleList< Neutral ,
64 typename Neutral::CandidateClass >
65{
66 // friend classes and functions
67
68 public:
69 // constants, enums and typedefs
70
71 // Constructors and destructor
72 DCFillableNeutralList( bool ( * pFunction )( Neutral& ) = 0 ) ;
73 template <class WitnessIterator>
74 DCFillableNeutralList(WitnessIterator first, WitnessIterator last,
75 bool ( * pFunction )( Neutral& ) = 0 ) :
76 DCNeutralVisibleList<Neutral, typename Neutral::CandidateClass>(pFunction) {
77 fill(first, last); }
78 //DCFillableNeutralList( const TruthWitnesses& aTruthList ,
79 // bool ( * pFunction )( Neutral& ) = 0 ) ;
80 //DCFillableNeutralList( const VisibleWitnesses& aVisibleList ,
81 // bool ( * pFunction )( Neutral& ) = 0 ) ;
82 //DCFillableNeutralList( const TruthWitnesses& aTruthList ,
83 // DCSelectionFunction< Neutral >& aFunctionalObject ) ;
84 //DCFillableNeutralList( const VisibleWitnesses& aVisibleList ,
85 // DCSelectionFunction< Neutral >& aFunctionalObject ) ;
86//
87 template <class WitnessIterator>
88 DCFillableNeutralList(WitnessIterator first, WitnessIterator last,
89 DCSelectionFunction< Neutral >& aFunctionalObject ) :
90 DCNeutralVisibleList<Neutral, typename Neutral::CandidateClass>(aFunctionalObject) {
91 fill(first, last); }
93 bool ( * pFunction )( Neutral& ) = 0 ) ;
96 DCSelectionFunction< Neutral >& aFunctionalObject ) ;
97 DCFillableNeutralList( const std::vector<Neutral>& aVector ) ;
98 virtual ~DCFillableNeutralList() ;
99
100 // assignment operator(s)
101 //const DCFillableNeutralList< Neutral , TruthWitnesses , VisibleWitnesses >& operator=( const TruthWitnesses& aTruthList ) ;
102 //const DCFillableNeutralList< Neutral , TruthWitnesses , VisibleWitnesses >& operator=( const VisibleWitnesses& aVisibleList ) ;
103//
105
106
107
108 template<class WitnessIterator>
109 void fill(WitnessIterator first, WitnessIterator last) {
111 }
112
113 template<class Witness>
114 const DCFillableNeutralList<Neutral>& operator=(const Witness& aWitnessList) {
115 this->eraseContents();
116 fill(aWitnessList.begin(), aWitnessList.end());
117 return ( *this ) ;
118 }
119
120 // member functions
121
122 // const member functions
123
124 // static member functions
125
126 protected:
127 // protected member functions
128
129 // protected const member functions
130
131 private:
132 // Constructors and destructor
133
134 // private member functions
135 //void fill( const TruthWitnesses& aList ) ;
136 //void fill( const VisibleWitnesses& aList ) ;
138
139 // private const member functions
140
141 // data members
142
143 // static data members
144
145} ;
146
147// inline function definitions
148
149// function definitions
151
152template<class Neutral, class WitnessIterator>
153inline
155 WitnessIterator first,
156 WitnessIterator last)
157{
158 aFillableList.fill(first,last);
159}
160
161
162#endif /* DCHAIN_FILLABLENEUTRALLIST_H */
void dc_fill(DCFillableNeutralList< Neutral > &aFillableList, WitnessIterator first, WitnessIterator last)
void fill(WitnessIterator first, WitnessIterator last)
DCFillableNeutralList(const std::vector< Neutral > &aVector)
const DCFillableNeutralList< Neutral > & operator=(const DCFillableNeutralList< Neutral > &aOtherList)
DCFillableNeutralList(WitnessIterator first, WitnessIterator last, bool(*pFunction)(Neutral &)=0)
const DCFillableNeutralList< Neutral > & operator=(const Witness &aWitnessList)
DCFillableNeutralList(WitnessIterator first, WitnessIterator last, DCSelectionFunction< Neutral > &aFunctionalObject)
void fill(const dchain::LabeledParticleList< Neutral, CandidateClass > &aList)