CGEM BOSS 6.6.5.g
BESIII Offline Software System
Loading...
Searching...
No Matches
dchain::CombinatoricLoop< CandidateClass > Class Template Reference

#include <CombinatoricLoop.h>

Public Member Functions

virtual ~CombinatoricLoop ()
 
void setCurrentIterator (typename dchain::CandidateList< CandidateClass >::const_partial_iterator &aIterator)
 
const dchain::CandidateList< CandidateClass >::const_partial_iterator partial_begin () const
 
const dchain::CandidateList< CandidateClass >::const_partial_iterator partial_end () const
 
 CombinatoricLoop (const typename dchain::CandidateList< CandidateClass >::const_partial_iterator &aBegin, const typename dchain::CandidateList< CandidateClass >::const_partial_iterator &aEnd, _combinatoricloop_vector_ &aLoopList)
 

Detailed Description

template<class CandidateClass>
class dchain::CombinatoricLoop< CandidateClass >

Definition at line 97 of file CombinatoricLoop.h.

Constructor & Destructor Documentation

◆ ~CombinatoricLoop()

template<class CandidateClass >
dchain::CombinatoricLoop< CandidateClass >::~CombinatoricLoop
virtual

Definition at line 117 of file CombinatoricLoop.cc.

118{
119 delete m_previousDuplicate ;
120}

◆ CombinatoricLoop()

template<class CandidateClass >
dchain::CombinatoricLoop< CandidateClass >::CombinatoricLoop ( const typename dchain::CandidateList< CandidateClass >::const_partial_iterator &  aBegin,
const typename dchain::CandidateList< CandidateClass >::const_partial_iterator &  aEnd,
_combinatoricloop_vector_ aLoopList 
)

Definition at line 94 of file CombinatoricLoop.cc.

96 :
97 m_beginIterator( aBegin ) ,
98 m_endIterator( aEnd ) ,
99 m_previousDuplicate( 0 )
100{
101 typename _combinatoricloop_vector_::const_iterator lastLoop( aLoopList.begin() ) ;
102 typename _combinatoricloop_vector_::const_iterator loopToCheck( aLoopList.end() ) ;
103 while ( loopToCheck != lastLoop ) {
104 --loopToCheck ;
105 if ( ( (*(*loopToCheck)).m_beginIterator ) == m_beginIterator ) {
106 m_previousDuplicate = new typename _combinatoricloop_vector_::const_iterator( loopToCheck ) ;
107 (*(*(*m_previousDuplicate))).adjustEnd() ;
108//
109// only require one match, so prepare to terminate search for duplicate
110//
111 loopToCheck = lastLoop ;
112 }
113 }
114}

Member Function Documentation

◆ partial_begin()

template<class CandidateClass >
const dchain::CandidateList< CandidateClass >::const_partial_iterator dchain::CombinatoricLoop< CandidateClass >::partial_begin

Definition at line 144 of file CombinatoricLoop.cc.

145{
146 if ( 0 == m_previousDuplicate ) {
147 return( m_beginIterator ) ;
148 }
149 typename dchain::CandidateList< CandidateClass >::const_partial_iterator newBegin( ( (*(*(*m_previousDuplicate))).m_currentIterator ) ) ;
150 return( ++newBegin ) ;
151}

Referenced by dchain::FillDecayList< DecayClass, CandidateClass >::fill().

◆ partial_end()

template<class CandidateClass >
const dchain::CandidateList< CandidateClass >::const_partial_iterator dchain::CombinatoricLoop< CandidateClass >::partial_end

Definition at line 154 of file CombinatoricLoop.cc.

155{
156 return( m_endIterator ) ;
157}

Referenced by dchain::FillDecayList< DecayClass, CandidateClass >::fill().

◆ setCurrentIterator()

template<class CandidateClass >
void dchain::CombinatoricLoop< CandidateClass >::setCurrentIterator ( typename dchain::CandidateList< CandidateClass >::const_partial_iterator &  aIterator)

Definition at line 134 of file CombinatoricLoop.cc.

135{
136 m_currentIterator = aIterator ;
137}

Referenced by dchain::FillDecayList< DecayClass, CandidateClass >::fill().


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