BOSS 7.0.9
BESIII Offline Software System
Loading...
Searching...
No Matches
DCChargedVisibleList.cc
Go to the documentation of this file.
1#ifndef DCHAIN_DCCHARGEDVISIBLELIST_CC
2#define DCHAIN_DCCHARGEDVISIBLELIST_CC
3// -*- C++ -*-
4//
5// Package: DChain
6// Module: ChargedVisibleList
7//
8// Description: <one line class summary>
9//
10// Implimentation:
11// <Notes on implimentation>
12//
13// Author: Simon Patton
14// Created: Fri Oct 4 11:04:56 EDT 1996
15// $Id: DCChargedVisibleList.cc,v 1.1.1.1 2009/03/03 06:06:56 maqm Exp $
16//
17// Revision history
18//
19// $Log: DCChargedVisibleList.cc,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:36 cdj
24// massive class renaming, addition of [] for selection and unit tests
25//
26// Revision 1.5 2003/08/01 13:48:43 mrs43
27// changed plus and minus methods of DCChargedVisibleList to const
28//
29// Revision 1.4 2003/05/15 19:56:11 cdj
30// revamped memory handling so always use a ReferenceHolder to deal with the reference counting
31//
32// Revision 1.3 2003/03/13 20:19:16 cleo3
33// now compiles under Linux
34//
35// Revision 1.2 2000/12/30 19:43:32 cdj
36// no more missing symbols under OSF1
37//
38// Revision 1.1.1.1 2000/12/18 22:16:55 cdj
39// imported DChain
40//
41// Revision 1.14 1998/08/20 20:00:08 sjp
42// Modified to use DChainBoolean
43//
44// Revision 1.13 1998/08/19 20:46:19 sjp
45// Fixed comments and removed report references
46//
47// Revision 1.12 1998/04/17 19:14:46 sjp
48// Modified to use latest type
49//
50// Revision 1.11 1997/09/17 20:05:34 sjp
51// Removed filling to superclass
52//
53// Revision 1.10 1997/09/03 14:58:18 sjp
54// Use new report.h and TBParticlePoint
55//
56// Revision 1.9 1997/08/28 07:00:17 sjp
57// Modified files to handle complete templating
58//
59// Revision 1.8 1997/08/19 23:02:32 sjp
60// Restructured package to be independent of Rock
61//
62// Revision 1.7 1997/08/19 15:55:28 sjp
63// Modified list to have no dependence on any other
64// structures except its contents, which must have
65// certain `typedef' available to use.
66//
67// Revision 1.6 1997/08/15 21:33:00 sjp
68// Updated to use <package>/<file>.h include structure.
69// Updated to use bug flags specified in Experiement.h
70//
71// Revision 1.5 1997/01/31 20:17:28 sjp
72// Modified to use the new `bug' include files
73//
74// Revision 1.4 1997/01/21 20:34:26 sjp
75// Changed CPP flags and include because of library reorganization
76//
77// Revision 1.3 1996/12/20 21:15:57 sjp
78// Ammended to allow for LabaledLists being reference counted.
79// Added dropLink() for all created entries.
80//
81// Revision 1.2 1996/11/05 19:30:35 sjp
82// Added definition for filling for TruthTable.
83//
84// Revision 1.1 1996/11/04 19:36:39 sjp
85// New file for new `List' module
86//
87
88// system include files
89#include <stdlib.h> // required for 'exit'
90
91// user include files
100
102
103// STL include files
104//#include <vector>
105
106//
107// constants, enums and typedefs
108//
109
111// static data member definitions
112//
115// constructors and destructor
117
118template < class Charged , class CandidateClass >
120DCChargedVisibleList( bool ( * pFunction )( Charged& ) ) :
121 m_function( pFunction ) ,
122 m_functionalObject( 0 )
123{
124}
125
126template < class Charged , class CandidateClass >
129 bool ( * pFunction )( Charged& ) ) :
130 dchain::ChargedVisibleList<Charged, CandidateClass>(aOtherList, pFunction),
131 m_function( pFunction ) ,
132 m_functionalObject( 0 )
133{
134}
135
136template < class Charged , class CandidateClass >
139 m_function( 0 ) ,
140 m_functionalObject( &aFunctionalObject )
141{
142}
143
144template < class Charged , class CandidateClass >
147 DCSelectionFunction< Charged >& aFunctionalObject ) :
148 dchain::ChargedVisibleList<Charged,CandidateClass>(aOtherList,aFunctionalObject),
149 m_function( 0 ) ,
150 m_functionalObject( &aFunctionalObject )
151{
152}
153
154template < class Charged , class CandidateClass >
156{
157}
158
159//
160// assignment operators
161//
162
163template < class Charged , class CandidateClass >
165{
166 this->eraseContents() ;
167 fill(aOtherList.labeledCandidateList()) ;
168 return ( *this ) ;
169}
170
171//
172// member functions
173//
174
175template < class Charged , class CandidateClass >
177{
178 if ( 0 != m_function ) {
179 fill(aList, dchain::NewMaker<Charged>(), m_function);
180 } else if (m_functionalObject) {
181 fill(aList,dchain::NewMaker<Charged>(), m_functionalObject);
182 } else {
184 }
185}
186
187//
188// const member functions
189//
190
191//
192// static member functions
193//
194
195#endif /* DCHAIN_DCCHARGEDVISIBLELIST_CC */
void fill(NTuple::Array< double > &nt_p4, const HepLorentzVector &p4)
Definition: MyUtil.cxx:3
DCChargedVisibleList(bool(*pFunction)(Charged &)=0)
void fill(const dchain::LabeledParticleList< Charged, CandidateClass > &aList)
const DCChargedVisibleList< Charged, CandidateClass > & operator=(const DCChargedVisibleList< Charged, CandidateClass > &aOtherList)
virtual LabeledParticleList< Charged, CandidateClass > & labeledCandidateList()