BOSS 6.6.4.p03
BESIII Offline Software System
Loading...
Searching...
No Matches
DCFillableChargedList.h
Go to the documentation of this file.
1#ifndef DCHAIN_DCFILLABLECHARGEDLIST_H
2#define DCHAIN_DCFILLABLECHARGEDLIST_H
3// -*- C++ -*-
4//
5// Package: DChain
6// Module: FillableChargedList
7//
8// Description: <one line class summary>
9//
10// Usage:
11// <usage>
12//
13// Author: Simon Patton
14// Created: Wed Sep 3 13:47:79 EDT 1997
15// $Id: DCFillableChargedList.h,v 1.1.1.1 2009/03/03 06:06:56 maqm Exp $
16//
17// Revision history
18//
19// $Log: DCFillableChargedList.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 2004/09/09 15:48:22 emilie
27// made the fill function public
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 2000/12/30 19:43:30 cdj
33// no more missing symbols under OSF1
34//
35// Revision 1.2 2000/12/19 23:40:09 cdj
36// dc_fill now works correctly
37//
38// Revision 1.1.1.1 2000/12/18 22:16:52 cdj
39// imported DChain
40//
41// Revision 1.4 1998/08/20 19:59:01 sjp
42// Modified to use DChainBoolean
43//
44// Revision 1.3 1998/08/19 20:39:52 sjp
45// Fixed include path for defintions
46//
47// Revision 1.2 1998/04/17 19:11:02 sjp
48// Modified to use latest types
49//
50// Revision 1.1 1997/09/17 20:06:17 sjp
51// New class to separate filling from behaviour
52//
53
54// system include files
55
56// user include files
57#include "DecayChain/List/DCChargedVisibleList.h" // superclass declaration
58
59// forward declarations
60
61template < class Charged >
62class DCFillableChargedList : public DCChargedVisibleList< Charged , typename Charged::CandidateClass >
63{
64 // friend classes and functions
65
66 public:
67 // constants, enums and typedefs
68
69 // Constructors and destructor
70 DCFillableChargedList( bool ( * pFunction )( Charged& ) = 0 ) ;
71 template <class WitnessIterator>
72 DCFillableChargedList(WitnessIterator first, WitnessIterator last,
73 bool ( * pFunction )( Charged& ) = 0 ) :
74 DCChargedVisibleList<Charged, typename Charged::CandidateClass>(pFunction){
75 fill(first, last); }
76
77 //DCFillableChargedList( const TruthWitnesses& aTruthList ,
78 // bool ( * pFunction )( Charged& ) = 0 ) ;
79 //DCFillableChargedList( const VisibleWitnesses& aVisibleList ,
80 // bool ( * pFunction )( Charged& ) = 0 ) ;
81 template<class WitnessIterator>
82 DCFillableChargedList(WitnessIterator first, WitnessIterator last,
83 DCSelectionFunction< Charged >& aFunctionalObject )
84 : DCChargedVisibleList<Charged, typename Charged::CandidateClass>(aFunctionalObject) {
85 fill(first, last); }
86
87 //DCFillableChargedList( const TruthWitnesses& aTruthList ,
88 // DCSelectionFunction< Charged >& aFunctionalObject );
89 //DCFillableChargedList( const VisibleWitnesses& aVisibleList ,
90 // DCSelectionFunction< Charged >& aFunctionalObject );
91//
93 , bool ( * pFunction )( Charged& ) = 0 ) ;
96 , DCSelectionFunction< Charged >& aFunctionalObject ) ;
97 virtual ~DCFillableChargedList() ;
98
99 // assignment operator(s)
101
102 template<class Witness>
103 const DCFillableChargedList<Charged>& operator=(const Witness& aWitnessList) {
104 this->eraseContents();
105 fill(aWitnessList.begin(), aWitnessList.end());
106 return ( *this ) ;
107 }
108
109 // member functions
110 template<class WitnessIterator>
111 void fill(WitnessIterator first, WitnessIterator last) {
113 last);
114 }
115
116 // const member functions
117
118 // static member functions
119
120 protected:
121 // protected member functions
122
123 // protected const member functions
124
125 private:
126 // Constructors and destructor
127 //DCFillableChargedList( const DCFillableChargedList< Charged >& ); // stop default
128
129 // private member functions
130 void fill(
131 const dchain::LabeledParticleList< Charged ,
132 typename Charged::CandidateClass >& aList ) {
133 DCChargedVisibleList< Charged ,
134 typename Charged::CandidateClass >::fill( aList ) ;
135 }
136
137 // private const member functions
138
139 // data members
140
141 // static data members
142
143};
144
145// inline function definitions
146
147// templated member function definitions
149
150template<class Charged, class WitnessIterator>
151inline
153 WitnessIterator first,
154 WitnessIterator last)
155{
156 aFillableList.fill(first,last);
157}
158
159#endif /* DCHAIN_DCFILLABLECHARGEDLIST_H */
void dc_fill(DCFillableChargedList< Charged > &aFillableList, WitnessIterator first, WitnessIterator last)
void fill(const dchain::LabeledParticleList< Charged, CandidateClass > &aList)
DCFillableChargedList(WitnessIterator first, WitnessIterator last, bool(*pFunction)(Charged &)=0)
const DCFillableChargedList< Charged > & operator=(const Witness &aWitnessList)
void fill(WitnessIterator first, WitnessIterator last)
const DCFillableChargedList< Charged > & operator=(const DCFillableChargedList< Charged > &aOtherList)
DCFillableChargedList(WitnessIterator first, WitnessIterator last, DCSelectionFunction< Charged > &aFunctionalObject)