BOSS 7.1.0
BESIII Offline Software System
Loading...
Searching...
No Matches
NeutralNCVisibleList.cc
Go to the documentation of this file.
1#ifndef DCHAIN_NEUTRALNCVISIBLELIST_CC
2#define DCHAIN_NEUTRALNCVISIBLELIST_CC
3// -*- C++ -*-
4//
5// Package: DChain
6// Module: NeutralNCVisibleList
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: NeutralNCVisibleList.cc,v 1.2 2009/06/22 08:38:08 zoujh Exp $
16//
17// Revision history
18//
19// $Log: NeutralNCVisibleList.cc,v $
20// Revision 1.2 2009/06/22 08:38:08 zoujh
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.1 2006/01/11 20:28:40 cdj
27// massive class renaming, addition of [] for selection and unit tests
28//
29//
30
31// system include files
32#include <stdlib.h> // required for 'exit'
33
34// user include files
43
45
46//
47// constants, enums and typedefs
48//
49namespace dchain {
50
51//
52// static data member definitions
53//
54
55//
56// constructors and destructor
57//
58
59template < class NeutralNC , class CandidateClass >
62 m_list( (new dchain::LabeledParticleList< NeutralNC , CandidateClass >) ),
63 m_ntBarList(0),
64 m_isBarList(0)
65{
66}
67
68template < class NeutralNC , class CandidateClass >
71 aOtherList ) :
72 m_list( (new dchain::LabeledParticleList< NeutralNC , CandidateClass >) ),
73 m_ntBarList(0),
74 m_isBarList(0)
75{
76 typedef typename MakerTrait<NeutralNC>::maker_type Maker;
77 fill( *(aOtherList.m_list), Maker(), SelectAll<NeutralNC>() ) ;
78}
79
80
81template < class NeutralNC , class CandidateClass >
83{
84 delete m_ntBarList;
85 delete m_isBarList;
86}
87
88//
89// assignment operators
90//
91
92/*
93template < class NeutralNC , class CandidateClass >
94const NeutralNCVisibleList< NeutralNC , CandidateClass >& NeutralNCVisibleList< NeutralNC , CandidateClass >::operator=( const NeutralNCVisibleList< NeutralNC , CandidateClass >& aOtherList )
96 eraseContents() ;
97 typedef typename MakerTrait<NeutralNC>::maker_type Maker;
98 fill( *(aOtherList.m_list), Maker(), SelectAll<NeutralNC>() ) ;
99 return ( *this ) ;
100}
101*/
102
103//
104// member functions
105//
106
107template < class NeutralNC , class CandidateClass >
110{
111 return ( m_list->begin() ) ;
112}
113
114template < class NeutralNC , class CandidateClass >
117{
118 return ( m_list->end() ) ;
119}
120
121template < class NeutralNC , class CandidateClass >
124{
125 if ( m_ntBarList == 0 ) {
126 m_ntBarList = new ChosenConjugateList< NeutralNC, CandidateClass >(*m_list, kIsntBar);
127 }
129 return (*m_ntBarList);
132template < class NeutralNC , class CandidateClass >
136 if ( m_isBarList == 0 ) {
137 m_isBarList = new ChosenConjugateList< NeutralNC, CandidateClass >(*m_list, kIsBar);
138 }
139
140 return (*m_isBarList);
141}
142
143template < class NeutralNC , class CandidateClass >
146{
147 return ( *m_list ) ;
148}
149
150
151template < class NeutralNC , class CandidateClass >
153{
154 m_list->erase( m_list->begin() ,
155 m_list->end() ) ;
156}
157
158//
159// const member functions
160//
161
162template < class NeutralNC , class CandidateClass >
165{
166// Need to cast to 'const' to get the right function call
167 return ( (*(const dchain::LabeledParticleList< NeutralNC , CandidateClass >*)(m_list.pointer())).begin() ) ;
168}
169
170template < class NeutralNC , class CandidateClass >
173{
174// Need to cast to 'const' to get the right function call
175 return ( (*(const dchain::LabeledParticleList< NeutralNC , CandidateClass >*)(m_list.pointer())).end() ) ;
176}
177
178
179template < class NeutralNC , class CandidateClass >
182{
183 return ( *m_list ) ;
184}
185
186//
187// static member functions
188//
190#endif /* DCHAIN_NEUTRALNCVISIBLELIST_CC */
ChosenConjugateList< NeutralNC, CandidateClass > & operator()()
virtual dchain::LabeledParticleList< NeutralNC, CandidateClass > & labeledCandidateList()
ChosenConjugateList< NeutralNC, CandidateClass > & bar()
void fill(const LabeledParticleList< NeutralNC, CandidateClass > &aList, const TMaker &aMaker, const TSelector &aSel)