BOSS 7.0.6
BESIII Offline Software System
Loading...
Searching...
No Matches
dchain::NeutralNCVisibleList< NeutralNC, CandidateClass > Class Template Reference

#include <NeutralNCVisibleList.h>

+ Inheritance diagram for dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >:

Public Types

typedef dchain::MuteWholeItr< NeutralNC > iterator
 
typedef dchain::WholeItr< NeutralNC > const_iterator
 
typedef dchain::PartialItr< NeutralNC > const_partial_iterator
 
typedef NeutralNC value_type
 
typedef NeutralNCVisibleList< NeutralNC, CandidateClass > self_type
 
- Public Types inherited from dchain::CandidateList< CandidateClass >
typedef dchain::MuteWholeCandidateItr< CandidateClass > iterator
 
typedef dchain::WholeCandidateItr< CandidateClass > const_iterator
 
typedef dchain::PartialCandidateItr< CandidateClass > const_partial_iterator
 
typedef dchain::LabeledCandidate< CandidateClass > value_type
 

Public Member Functions

 NeutralNCVisibleList ()
 
 NeutralNCVisibleList (const self_type &aOtherList)
 
template<class TSelector >
 NeutralNCVisibleList (const self_type &aOtherList, const TSelector &aSel)
 
virtual ~NeutralNCVisibleList ()
 
template<class Witness >
const self_typeoperator= (const Witness &aWitnessList)
 
template<class TSelector >
FillListWithSelection< self_type, TSelector > operator[] (const TSelector &iSel)
 
iterator particle_begin ()
 
iterator particle_end ()
 
ChosenConjugateList< NeutralNC, CandidateClass > & bar ()
 
ChosenConjugateList< NeutralNC, CandidateClass > & operator() ()
 
const_iterator particle_begin () const
 
const_iterator particle_end () const
 
template<class TAnalyze >
void iterate (const TAnalyze &analyze) const
 
template<class TAnalyze >
void iterate (TAnalyze &analyze) const
 
template<class TSelect >
SelectiveInserter< self_type, TSelect > selectiveInserter (const TSelect &iSelect)
 creates an insert iterator that filters based on iSelect
 
template<class THolder , class TSelect >
bool attempt_insert (THolder &pPossible, const TSelect &aSelect)
 
template<class THolder >
void insert (THolder &pPossible)
 
void eraseContents ()
 
void erase ()
 
template<class TMaker , class TSelector >
void fill (const LabeledParticleList< NeutralNC, CandidateClass > &aList, const TMaker &aMaker, const TSelector &aSel)
 
template<class Iterator , class TMaker , class TSelector >
void fill (Iterator first, Iterator last, const TMaker &aMaker, const TSelector &aSel=SelectAll< NeutralNC >())
 
- Public Member Functions inherited from dchain::CandidateList< CandidateClass >
 CandidateList ()
 
virtual ~CandidateList ()
 
virtual iterator begin ()
 
virtual iterator end ()
 
virtual bool empty () const
 
virtual int size () const
 
virtual const_iterator begin () const
 
virtual const_iterator end () const
 
template<class TAnalyzer >
void iterate (const TAnalyzer &analyze) const
 

Protected Member Functions

virtual dchain::LabeledParticleList< NeutralNC, CandidateClass > & labeledCandidateList ()
 
virtual const dchain::LabeledParticleList< NeutralNC, CandidateClass > & labeledCandidateList () const
 
virtual dchain::LabeledCandidateList< CandidateClass > & labeledCandidateList ()=0
 
virtual const dchain::LabeledCandidateList< CandidateClass > & labeledCandidateList () const =0
 

Detailed Description

template<class NeutralNC, class CandidateClass = typename NeutralNC::CandidateClass>
class dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >

Definition at line 79 of file NeutralNCVisibleList.h.

Member Typedef Documentation

◆ const_iterator

template<class NeutralNC , class CandidateClass = typename NeutralNC::CandidateClass>
typedef dchain::WholeItr< NeutralNC > dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::const_iterator

Definition at line 86 of file NeutralNCVisibleList.h.

◆ const_partial_iterator

template<class NeutralNC , class CandidateClass = typename NeutralNC::CandidateClass>
typedef dchain::PartialItr< NeutralNC > dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::const_partial_iterator

Definition at line 87 of file NeutralNCVisibleList.h.

◆ iterator

template<class NeutralNC , class CandidateClass = typename NeutralNC::CandidateClass>
typedef dchain::MuteWholeItr< NeutralNC > dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::iterator

Definition at line 85 of file NeutralNCVisibleList.h.

◆ self_type

template<class NeutralNC , class CandidateClass = typename NeutralNC::CandidateClass>
typedef NeutralNCVisibleList<NeutralNC, CandidateClass> dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::self_type

Definition at line 91 of file NeutralNCVisibleList.h.

◆ value_type

template<class NeutralNC , class CandidateClass = typename NeutralNC::CandidateClass>
typedef NeutralNC dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::value_type

Definition at line 89 of file NeutralNCVisibleList.h.

Constructor & Destructor Documentation

◆ NeutralNCVisibleList() [1/3]

template<class NeutralNC , class CandidateClass >
dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::NeutralNCVisibleList

Definition at line 60 of file NeutralNCVisibleList.cc.

61 :
63 m_ntBarList(0),
64 m_isBarList(0)
65{
66}

◆ NeutralNCVisibleList() [2/3]

template<class NeutralNC , class CandidateClass >
dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::NeutralNCVisibleList ( const self_type aOtherList)

Definition at line 69 of file NeutralNCVisibleList.cc.

71 :
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}
void fill(const LabeledParticleList< NeutralNC, CandidateClass > &aList, const TMaker &aMaker, const TSelector &aSel)

◆ NeutralNCVisibleList() [3/3]

template<class NeutralNC , class CandidateClass = typename NeutralNC::CandidateClass>
template<class TSelector >
dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::NeutralNCVisibleList ( const self_type aOtherList,
const TSelector &  aSel 
)
inline

Definition at line 97 of file NeutralNCVisibleList.h.

98 :
100 m_ntBarList(0),
101 m_isBarList(0)
102 {
103 fill(*(aOtherList.m_list),
105 aSel);
106 }

◆ ~NeutralNCVisibleList()

template<class NeutralNC , class CandidateClass >
dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::~NeutralNCVisibleList
virtual

Definition at line 82 of file NeutralNCVisibleList.cc.

83{
84 delete m_ntBarList;
85 delete m_isBarList;
86}

Member Function Documentation

◆ attempt_insert()

template<class NeutralNC , class CandidateClass = typename NeutralNC::CandidateClass>
template<class THolder , class TSelect >
bool dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::attempt_insert ( THolder &  pPossible,
const TSelect &  aSelect 
)
inline

Definition at line 168 of file NeutralNCVisibleList.h.

169 {
170 bool returnValue = (aSelect)(*pPossible);
171 if (returnValue) {
172 this->insert(pPossible);
173 }
174 return returnValue;
175 }
void insert(THolder &pPossible)

Referenced by dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::fill().

◆ bar()

template<class NeutralNC , class CandidateClass >
dchain::ChosenConjugateList< NeutralNC, CandidateClass > & dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::bar

Definition at line 134 of file NeutralNCVisibleList.cc.

135{
136 if ( m_isBarList == 0 ) {
137 m_isBarList = new ChosenConjugateList< NeutralNC, CandidateClass >(*m_list, kIsBar);
138 }
139
140 return (*m_isBarList);
141}

◆ erase()

template<class NeutralNC , class CandidateClass = typename NeutralNC::CandidateClass>
void dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::erase ( )
inline

Definition at line 190 of file NeutralNCVisibleList.h.

◆ eraseContents()

template<class NeutralNC , class CandidateClass >
void dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::eraseContents

◆ fill() [1/2]

template<class NeutralNC , class CandidateClass = typename NeutralNC::CandidateClass>
template<class TMaker , class TSelector >
void dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::fill ( const LabeledParticleList< NeutralNC, CandidateClass > &  aList,
const TMaker &  aMaker,
const TSelector &  aSel 
)
inline

Definition at line 195 of file NeutralNCVisibleList.h.

197 {
198
199 for( const_iterator entry(aList.begin()); entry != aList.end(); ++entry){
200 //NOTE: even though this is really just calling the copy constructor
201 //it is best to use the maker since it allows further control
202 const NeutralNC& from((*entry)());
203 typename ResultTypeTrait<TMaker>::type localCopy( aMaker(from) );
204
205 attempt_insert(localCopy,aSel);
206 }
207
208 }
bool attempt_insert(THolder &pPossible, const TSelect &aSelect)
dchain::WholeItr< NeutralNC > const_iterator
T::result_type type
Definition: MakerTrait.h:55

Referenced by dchain::fill_using_selector(), dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::NeutralNCVisibleList(), and dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::operator=().

◆ fill() [2/2]

template<class NeutralNC , class CandidateClass = typename NeutralNC::CandidateClass>
template<class Iterator , class TMaker , class TSelector >
void dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::fill ( Iterator  first,
Iterator  last,
const TMaker &  aMaker,
const TSelector &  aSel = SelectAll<NeutralNC>() 
)
inline

Definition at line 210 of file NeutralNCVisibleList.h.

212 {
213 std::transform(first,last,
214 selectiveInserter(aSel),
215 aMaker);
216 }
SelectiveInserter< self_type, TSelect > selectiveInserter(const TSelect &iSelect)
creates an insert iterator that filters based on iSelect

◆ insert()

template<class NeutralNC , class CandidateClass = typename NeutralNC::CandidateClass>
template<class THolder >
void dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::insert ( THolder &  pPossible)
inline

Definition at line 178 of file NeutralNCVisibleList.h.

178 {
179 if (is_bar(pPossible)) {
180 m_list->push_back( LabeledParticle< NeutralNC >( pPossible ,
181 kIsBar ) ) ;
182 }
183 else {
184 m_list->push_back( LabeledParticle< NeutralNC >( pPossible ,
185 kIsntBar ) ) ;
186 }
187 }
int is_bar(const T &iNeutralNC)

Referenced by dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::attempt_insert().

◆ iterate() [1/2]

template<class NeutralNC , class CandidateClass = typename NeutralNC::CandidateClass>
template<class TAnalyze >
void dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::iterate ( const TAnalyze &  analyze) const
inline

Definition at line 143 of file NeutralNCVisibleList.h.

143 {
144 const_iterator finished ( particle_end() ) ;
145 for ( const_iterator entry ( particle_begin() ) ;
146 entry != finished ;
147 ++entry ) {
148 analyze( (*entry)() ) ;
149 }
150 }

◆ iterate() [2/2]

template<class NeutralNC , class CandidateClass = typename NeutralNC::CandidateClass>
template<class TAnalyze >
void dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::iterate ( TAnalyze &  analyze) const
inline

Definition at line 153 of file NeutralNCVisibleList.h.

153 {
154 const_iterator finished ( particle_end() ) ;
155 for ( const_iterator entry ( particle_begin() ) ;
156 entry != finished ;
157 ++entry ) {
158 analyze( (*entry)() ) ;
159 }
160 }

◆ labeledCandidateList() [1/2]

template<class NeutralNC , class CandidateClass >
dchain::LabeledParticleList< NeutralNC, CandidateClass > & dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::labeledCandidateList
protectedvirtual

Implements dchain::CandidateList< CandidateClass >.

Definition at line 145 of file NeutralNCVisibleList.cc.

146{
147 return ( *m_list ) ;
148}

Referenced by DCNeutralNCVisibleList< NeutralNC, CandidateClass >::operator=().

◆ labeledCandidateList() [2/2]

template<class NeutralNC , class CandidateClass >
const dchain::LabeledParticleList< NeutralNC, CandidateClass > & dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::labeledCandidateList
protectedvirtual

Implements dchain::CandidateList< CandidateClass >.

Definition at line 181 of file NeutralNCVisibleList.cc.

182{
183 return ( *m_list ) ;
184}

◆ operator()()

template<class NeutralNC , class CandidateClass >
dchain::ChosenConjugateList< NeutralNC, CandidateClass > & dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::operator()

Definition at line 123 of file NeutralNCVisibleList.cc.

124{
125 if ( m_ntBarList == 0 ) {
126 m_ntBarList = new ChosenConjugateList< NeutralNC, CandidateClass >(*m_list, kIsntBar);
127 }
128
129 return (*m_ntBarList);
130}

◆ operator=()

template<class NeutralNC , class CandidateClass = typename NeutralNC::CandidateClass>
template<class Witness >
const self_type & dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::operator= ( const Witness &  aWitnessList)
inline

Definition at line 114 of file NeutralNCVisibleList.h.

114 {
116 fill(aWitnessList.begin(), aWitnessList.end(),
119 return ( *this ) ;
120 }

◆ operator[]()

template<class NeutralNC , class CandidateClass = typename NeutralNC::CandidateClass>
template<class TSelector >
FillListWithSelection< self_type, TSelector > dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::operator[] ( const TSelector &  iSel)
inline

Definition at line 124 of file NeutralNCVisibleList.h.

◆ particle_begin() [1/2]

template<class NeutralNC , class CandidateClass >
NeutralNCVisibleList< NeutralNC, CandidateClass >::iterator dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::particle_begin

Definition at line 109 of file NeutralNCVisibleList.cc.

110{
111 return ( m_list->begin() ) ;
112}

Referenced by LambdaCReconstruction::execute(), and dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::iterate().

◆ particle_begin() [2/2]

template<class NeutralNC , class CandidateClass >
NeutralNCVisibleList< NeutralNC, CandidateClass >::const_iterator dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::particle_begin

Definition at line 164 of file NeutralNCVisibleList.cc.

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}

◆ particle_end() [1/2]

template<class NeutralNC , class CandidateClass >
NeutralNCVisibleList< NeutralNC, CandidateClass >::iterator dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::particle_end

Definition at line 116 of file NeutralNCVisibleList.cc.

117{
118 return ( m_list->end() ) ;
119}

Referenced by LambdaCReconstruction::execute(), and dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::iterate().

◆ particle_end() [2/2]

template<class NeutralNC , class CandidateClass >
NeutralNCVisibleList< NeutralNC, CandidateClass >::const_iterator dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::particle_end

Definition at line 172 of file NeutralNCVisibleList.cc.

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}

◆ selectiveInserter()

template<class NeutralNC , class CandidateClass = typename NeutralNC::CandidateClass>
template<class TSelect >
SelectiveInserter< self_type, TSelect > dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::selectiveInserter ( const TSelect &  iSelect)
inline

creates an insert iterator that filters based on iSelect

Definition at line 164 of file NeutralNCVisibleList.h.

164 {
165 return SelectiveInserter<self_type,TSelect>(*this,iSelect); }

Referenced by dchain::NeutralNCVisibleList< NeutralNC, CandidateClass >::fill().


The documentation for this class was generated from the following files: