BOSS 7.1.1
BESIII Offline Software System
Loading...
Searching...
No Matches
DCFillableNeutralNCList.h
Go to the documentation of this file.
1#ifndef DCHAIN_FILLABLENEUTRALNCLIST_H
2#define DCHAIN_FILLABLENEUTRALNCLIST_H
3// -*- C++ -*-
4//
5// Package: DChain
6// Module: FillableNeutralNCList
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: DCFillableNeutralNCList.h,v 1.2 2009/11/03 04:23:40 hujf Exp $
16//
17// Revision history
18//
19// $Log: DCFillableNeutralNCList.h,v $
20// Revision 1.2 2009/11/03 04:23:40 hujf
21// see ChangeLog
22//
23// Revision 1.1.1.1 2009/03/03 06:06:56 maqm
24// first import of DecayChain
25//
26// Revision 1.3 2006/01/11 20:28:25 cdj
27// massive class renaming, addition of [] for selection and unit tests
28//
29// Revision 1.2 2002/07/23 20:19:14 cdj
30// Can now use dc_fill even when compiler has templated member functions
31//
32// Revision 1.1 2001/09/11 15:02:26 ajm36
33// add files to do neutral non-conjugating particles
34//
35// Revision 1.3 2000/12/30 19:43:30 cdj
36// no more missing symbols under OSF1
37//
38// Revision 1.2 2000/12/19 23:40:09 cdj
39// dc_fill now works correctly
40//
41// Revision 1.1.1.1 2000/12/18 22:16:52 cdj
42// imported DChain
43//
44// Revision 1.4 1998/08/20 19:59:01 sjp
45// Modified to use DChainBoolean
46//
47// Revision 1.3 1998/08/19 20:39:52 sjp
48// Fixed include path for defintions
49//
50// Revision 1.2 1998/04/17 19:11:02 sjp
51// Modified to use latest types
52//
53// Revision 1.1 1997/09/17 20:06:17 sjp
54// New class to separate filling from behaviour
55//
56
57// system include files
58
59// user include files
60#include "DecayChain/List/DCNeutralNCVisibleList.h" // superclass declaration
61
62// forward declarations
63
64template < class NeutralNC >
65class DCFillableNeutralNCList : public DCNeutralNCVisibleList< NeutralNC , typename NeutralNC::CandidateClass >
66{
67 // friend classes and functions
68
69 public:
70 // constants, enums and typedefs
71
72 // Constructors and destructor
73 DCFillableNeutralNCList( bool ( * pFunction )( NeutralNC& ) = 0 ) ;
74 template <class WitnessIterator>
75 DCFillableNeutralNCList(WitnessIterator first, WitnessIterator last,
76 bool ( * pFunction )( NeutralNC& ) = 0 ) :
77 DCNeutralNCVisibleList<NeutralNC, typename NeutralNC::CandidateClass>(pFunction){
78 fill(first, last); }
79
80 //DCFillableNeutralNCList( const TruthWitnesses& aTruthList ,
81 // bool ( * pFunction )( NeutralNC& ) = 0 ) ;
82 //DCFillableNeutralNCList( const VisibleWitnesses& aVisibleList ,
83 // bool ( * pFunction )( NeutralNC& ) = 0 ) ;
84 template<class WitnessIterator>
85 DCFillableNeutralNCList(WitnessIterator first, WitnessIterator last,
86 DCSelectionFunction< NeutralNC >& aFunctionalObject )
87 : DCNeutralNCVisibleList<NeutralNC, typename NeutralNC::CandidateClass>(aFunctionalObject) {
88 fill(first, last); }
89
90 //DCFillableNeutralNCList( const TruthWitnesses& aTruthList ,
91 // DCSelectionFunction< NeutralNC >& aFunctionalObject );
92 //DCFillableNeutralNCList( const VisibleWitnesses& aVisibleList ,
93 // DCSelectionFunction< NeutralNC >& aFunctionalObject );
94//
96 , bool ( * pFunction )( NeutralNC& ) = 0 ) ;
99 , DCSelectionFunction< NeutralNC >& aFunctionalObject ) ;
100 virtual ~DCFillableNeutralNCList() ;
101
102 // assignment operator(s)
104
105 template<class Witness>
106 const DCFillableNeutralNCList<NeutralNC>& operator=(const Witness& aWitnessList) {
107 this->eraseContents();
108 fill(aWitnessList.begin(), aWitnessList.end());
109 return ( *this ) ;
110 }
111
112
113 // member functions
114
115 // const member functions
116
117 // static member functions
118
119 protected:
120 // protected member functions
121
122 // protected const member functions
123
124 private:
125 // Constructors and destructor
126 //DCFillableNeutralNCList( const DCFillableNeutralNCList< NeutralNC >& ); // stop default
127
128 // private member functions
129 public:
130 void fill(
131 const dchain::LabeledParticleList< NeutralNC ,
132 typename NeutralNC::CandidateClass >& aList ) {
133 DCNeutralNCVisibleList< NeutralNC ,
134 typename NeutralNC::CandidateClass >::fill( aList ) ;
135 }
136 template<class WitnessIterator>
137 void fill(WitnessIterator first, WitnessIterator last) {
139 last);
140 }
141
142 // private const member functions
143
144 // data members
145
146 // static data members
147
148};
149
150// inline function definitions
151
152// templated member function definitions
154
155template<class NeutralNC, class WitnessIterator>
156inline
158 WitnessIterator first,
159 WitnessIterator last)
160{
161 aFillableList.fill(first,last);
162}
163
164#endif /* DCHAIN_FILLABLENEUTRALNCLIST_H */
void dc_fill(DCFillableNeutralNCList< NeutralNC > &aFillableList, WitnessIterator first, WitnessIterator last)
DCFillableNeutralNCList(WitnessIterator first, WitnessIterator last, bool(*pFunction)(NeutralNC &)=0)
void fill(const dchain::LabeledParticleList< NeutralNC, typename NeutralNC::CandidateClass > &aList)
DCFillableNeutralNCList(bool(*pFunction)(NeutralNC &)=0)
void fill(WitnessIterator first, WitnessIterator last)
const DCFillableNeutralNCList< NeutralNC > & operator=(const Witness &aWitnessList)
const DCFillableNeutralNCList< NeutralNC > & operator=(const DCFillableNeutralNCList< NeutralNC > &aOtherList)
DCFillableNeutralNCList(WitnessIterator first, WitnessIterator last, DCSelectionFunction< NeutralNC > &aFunctionalObject)
void fill(const dchain::LabeledParticleList< NeutralNC, CandidateClass > &aList)