BOSS 7.0.6
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.1.1.1 2009/03/03 06:06:56 maqm Exp $
16//
17// Revision history
18//
19// $Log: DCFillableNeutralNCList.h,v $
20// Revision 1.1.1.1 2009/03/03 06:06:56 maqm
21// first import of DecayChain
22//
23// Revision 1.3 2006/01/11 20:28:25 cdj
24// massive class renaming, addition of [] for selection and unit tests
25//
26// Revision 1.2 2002/07/23 20:19:14 cdj
27// Can now use dc_fill even when compiler has templated member functions
28//
29// Revision 1.1 2001/09/11 15:02:26 ajm36
30// add files to do neutral non-conjugating particles
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/DCNeutralNCVisibleList.h" // superclass declaration
58
59// forward declarations
60
61template < class NeutralNC >
62class DCFillableNeutralNCList : public DCNeutralNCVisibleList< NeutralNC , typename NeutralNC::CandidateClass >
63{
64 // friend classes and functions
65
66 public:
67 // constants, enums and typedefs
68
69 // Constructors and destructor
70 DCFillableNeutralNCList( bool ( * pFunction )( NeutralNC& ) = 0 ) ;
71 template <class WitnessIterator>
72 DCFillableNeutralNCList(WitnessIterator first, WitnessIterator last,
73 bool ( * pFunction )( NeutralNC& ) = 0 ) :
74 DCNeutralNCVisibleList<NeutralNC, typename NeutralNC::CandidateClass>(pFunction){
75 fill(first, last); }
76
77 //DCFillableNeutralNCList( const TruthWitnesses& aTruthList ,
78 // bool ( * pFunction )( NeutralNC& ) = 0 ) ;
79 //DCFillableNeutralNCList( const VisibleWitnesses& aVisibleList ,
80 // bool ( * pFunction )( NeutralNC& ) = 0 ) ;
81 template<class WitnessIterator>
82 DCFillableNeutralNCList(WitnessIterator first, WitnessIterator last,
83 DCSelectionFunction< NeutralNC >& aFunctionalObject )
84 : DCNeutralNCVisibleList<NeutralNC, typename NeutralNC::CandidateClass>(aFunctionalObject) {
85 fill(first, last); }
86
87 //DCFillableNeutralNCList( const TruthWitnesses& aTruthList ,
88 // DCSelectionFunction< NeutralNC >& aFunctionalObject );
89 //DCFillableNeutralNCList( const VisibleWitnesses& aVisibleList ,
90 // DCSelectionFunction< NeutralNC >& aFunctionalObject );
91//
93 , bool ( * pFunction )( NeutralNC& ) = 0 ) ;
96 , DCSelectionFunction< NeutralNC >& aFunctionalObject ) ;
97 virtual ~DCFillableNeutralNCList() ;
98
99 // assignment operator(s)
101
102 template<class Witness>
103 const DCFillableNeutralNCList<NeutralNC>& operator=(const Witness& aWitnessList) {
104 this->eraseContents();
105 fill(aWitnessList.begin(), aWitnessList.end());
106 return ( *this ) ;
107 }
108
109
110 // member functions
111
112 // const member functions
113
114 // static member functions
115
116 protected:
117 // protected member functions
118
119 // protected const member functions
120
121 private:
122 // Constructors and destructor
123 //DCFillableNeutralNCList( const DCFillableNeutralNCList< NeutralNC >& ); // stop default
124
125 // private member functions
126 void fill(
127 const dchain::LabeledParticleList< NeutralNC ,
128 typename NeutralNC::CandidateClass >& aList ) {
129 DCNeutralNCVisibleList< NeutralNC ,
130 typename NeutralNC::CandidateClass >::fill( aList ) ;
131 }
132 template<class WitnessIterator>
133 void fill(WitnessIterator first, WitnessIterator last) {
135 last);
136 }
137
138 // private const member functions
139
140 // data members
141
142 // static data members
143
144};
145
146// inline function definitions
147
148// templated member function definitions
150
151template<class NeutralNC, class WitnessIterator>
152inline
154 WitnessIterator first,
155 WitnessIterator last)
156{
157 aFillableList.fill(first,last);
158}
159
160#endif /* DCHAIN_FILLABLENEUTRALNCLIST_H */
void dc_fill(DCFillableNeutralNCList< NeutralNC > &aFillableList, WitnessIterator first, WitnessIterator last)
DCFillableNeutralNCList(WitnessIterator first, WitnessIterator last, bool(*pFunction)(NeutralNC &)=0)
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)