#include <SimDataFormats/CrossingFrame/interface/MixCollection.h>
Public Member Functions | |
int | bunch () const |
getters | |
int | getSourceType () const |
bool | getTrigger () const |
MixItr (MixCollection *shc, int nrDets) | |
MixItr (typename std::vector< T >::const_iterator it) | |
MixItr () | |
constructors | |
const T & | operator * () const |
bool | operator!= (const MixItr &itr) |
MixItr | operator++ (int) |
MixItr | operator++ () |
const T * | operator-> () const |
operators | |
virtual | ~MixItr () |
Default destructor. | |
Private Member Functions | |
bool | getNewPileups (typename std::vector< T >::const_iterator &first, typename std::vector< T >::const_iterator &last) |
bool | getNewSignal (typename std::vector< T >::const_iterator &first, typename std::vector< T >::const_iterator &last) |
MixItr | next () |
void | reset () |
Private Attributes | |
bool | first_ |
unsigned int | internalCtr_ |
int | iPileup_ |
int | iSignal_ |
MixCollection * | mixCol_ |
const CrossingFrame< T > * | myCF_ |
int | nrDets_ |
std::vector< T >::const_iterator | pMixItr_ |
std::vector< T >::const_iterator | pMixItrEnd_ |
bool | trigger_ |
Definition at line 47 of file MixCollection.h.
MixCollection< T >::MixItr::MixItr | ( | ) | [inline] |
constructors
Definition at line 51 of file MixCollection.h.
00051 :first_(true), internalCtr_(0) {;}
MixCollection< T >::MixItr::MixItr | ( | typename std::vector< T >::const_iterator | it | ) | [inline] |
Definition at line 52 of file MixCollection.h.
00052 : pMixItr_(it),nrDets_(0),first_(true),internalCtr_(0) {;}
MixCollection< T >::MixItr::MixItr | ( | MixCollection * | shc, | |
int | nrDets | |||
) | [inline] |
virtual MixCollection< T >::MixItr::~MixItr | ( | ) | [inline, virtual] |
int MixCollection< T >::MixItr::bunch | ( | ) | const [inline] |
getters
Definition at line 68 of file MixCollection.h.
References MixCollection< T >::MixItr::internalCtr_, MixCollection< T >::MixItr::myCF_, and MixCollection< T >::MixItr::trigger_.
00068 { 00069 if (trigger_) return 0; 00070 int bcr= myCF_->getBunchCrossing(internalCtr_); 00071 return bcr; 00072 }
bool MixCollection< T >::MixItr::getNewPileups | ( | typename std::vector< T >::const_iterator & | first, | |
typename std::vector< T >::const_iterator & | last | |||
) | [inline, private] |
Definition at line 204 of file MixCollection.h.
References MixCollection< T >::crossingFrames_, MixCollection< T >::MixItr::iPileup_, it, MixCollection< T >::MixItr::mixCol_, MixCollection< T >::MixItr::myCF_, MixCollection< T >::MixItr::nrDets_, and s.
Referenced by MixCollection< T >::MixItr::next().
00204 { 00205 00206 // gets the next pileup collection , changing subdet if necessary 00207 while (iPileup_<nrDets_) { 00208 mixCol_-> crossingFrames_[iPileup_]->getPileups(first,last); 00209 int s=0; 00210 for (typename std::vector<T>::const_iterator it=first;it!= last ;it++) { 00211 s++; 00212 } 00213 myCF_=mixCol_->crossingFrames_[iPileup_]; 00214 iPileup_++; 00215 if (first!=last) return true; 00216 } 00217 return false; 00218 }
bool MixCollection< T >::MixItr::getNewSignal | ( | typename std::vector< T >::const_iterator & | first, | |
typename std::vector< T >::const_iterator & | last | |||
) | [inline, private] |
Definition at line 191 of file MixCollection.h.
References MixCollection< T >::crossingFrames_, MixCollection< T >::MixItr::iSignal_, MixCollection< T >::MixItr::mixCol_, MixCollection< T >::MixItr::myCF_, and MixCollection< T >::MixItr::nrDets_.
Referenced by MixCollection< T >::MixItr::next().
00191 { 00192 // gets the next signal collection with non-zero size 00193 00194 while (iSignal_<nrDets_) { 00195 mixCol_->crossingFrames_[iSignal_]->getSignal(first,last); 00196 myCF_=mixCol_->crossingFrames_[iSignal_]; 00197 iSignal_++; 00198 if (first != last) return true; 00199 } 00200 return false; 00201 }
int MixCollection< T >::MixItr::getSourceType | ( | ) | const [inline] |
Definition at line 76 of file MixCollection.h.
References MixCollection< T >::MixItr::getTrigger(), MixCollection< T >::MixItr::internalCtr_, and MixCollection< T >::MixItr::myCF_.
00076 {return (getTrigger() ? -1 : myCF_->getSourceType(internalCtr_));}
bool MixCollection< T >::MixItr::getTrigger | ( | ) | const [inline] |
Definition at line 74 of file MixCollection.h.
References MixCollection< T >::MixItr::trigger_.
Referenced by MixCollection< T >::MixItr::getSourceType().
00074 {return trigger_;}
MixCollection< T >::MixItr MixCollection< T >::MixItr::next | ( | void | ) | [inline, private] |
Definition at line 221 of file MixCollection.h.
References MixCollection< T >::end(), MixCollection< T >::MixItr::first_, MixCollection< T >::MixItr::getNewPileups(), MixCollection< T >::MixItr::getNewSignal(), MixCollection< T >::MixItr::internalCtr_, MixCollection< T >::MixItr::mixCol_, MixCollection< T >::MixItr::pMixItr_, MixCollection< T >::MixItr::pMixItrEnd_, and MixCollection< T >::MixItr::trigger_.
Referenced by MixCollection< T >::MixItr::operator++().
00221 { 00222 00223 // initialisation 00224 if (first_) { 00225 first_=false; 00226 trigger_=true; 00227 } else { 00228 if (!trigger_) internalCtr_++; 00229 if (++pMixItr_!=pMixItrEnd_) return *this; 00230 } 00231 00232 // we have an end condition, look whether there are more collections 00233 bool ok; 00234 if (trigger_) { 00235 ok=this->getNewSignal(pMixItr_,pMixItrEnd_); 00236 if (ok) return *this; 00237 trigger_=false; 00238 } 00239 ok=this->getNewPileups(pMixItr_,pMixItrEnd_); 00240 if (ok) { 00241 internalCtr_=0; 00242 return *this; 00243 } 00244 else { 00245 return mixCol_->end(); 00246 } 00247 }
const T& MixCollection< T >::MixItr::operator * | ( | void | ) | const [inline] |
Definition at line 62 of file MixCollection.h.
References MixCollection< T >::MixItr::pMixItr_.
00062 {return pMixItr_.operator*(); }
bool MixCollection< T >::MixItr::operator!= | ( | const MixItr & | itr | ) | [inline] |
Definition at line 65 of file MixCollection.h.
References MixCollection< T >::MixItr::pMixItr_.
00065 {return pMixItr_!=itr.pMixItr_;}
MixItr MixCollection< T >::MixItr::operator++ | ( | int | ) | [inline] |
Definition at line 64 of file MixCollection.h.
References MixCollection< T >::MixItr::next().
00064 {return next();}
MixItr MixCollection< T >::MixItr::operator++ | ( | void | ) | [inline] |
Definition at line 63 of file MixCollection.h.
References MixCollection< T >::MixItr::next().
00063 {return next();}
const T* MixCollection< T >::MixItr::operator-> | ( | void | ) | const [inline] |
operators
Definition at line 61 of file MixCollection.h.
References MixCollection< T >::MixItr::pMixItr_.
00061 { return pMixItr_.operator->(); }
void MixCollection< T >::MixItr::reset | ( | void | ) | [inline, private] |
bool MixCollection< T >::MixItr::first_ [private] |
unsigned int MixCollection< T >::MixItr::internalCtr_ [private] |
Definition at line 89 of file MixCollection.h.
Referenced by MixCollection< T >::MixItr::bunch(), MixCollection< T >::MixItr::getSourceType(), and MixCollection< T >::MixItr::next().
int MixCollection< T >::MixItr::iPileup_ [private] |
Definition at line 87 of file MixCollection.h.
Referenced by MixCollection< T >::MixItr::getNewPileups().
int MixCollection< T >::MixItr::iSignal_ [private] |
Definition at line 87 of file MixCollection.h.
Referenced by MixCollection< T >::MixItr::getNewSignal().
MixCollection* MixCollection< T >::MixItr::mixCol_ [private] |
Definition at line 84 of file MixCollection.h.
Referenced by MixCollection< T >::MixItr::getNewPileups(), MixCollection< T >::MixItr::getNewSignal(), and MixCollection< T >::MixItr::next().
const CrossingFrame<T>* MixCollection< T >::MixItr::myCF_ [private] |
Definition at line 83 of file MixCollection.h.
Referenced by MixCollection< T >::MixItr::bunch(), MixCollection< T >::MixItr::getNewPileups(), MixCollection< T >::MixItr::getNewSignal(), and MixCollection< T >::MixItr::getSourceType().
int MixCollection< T >::MixItr::nrDets_ [private] |
Definition at line 85 of file MixCollection.h.
Referenced by MixCollection< T >::MixItr::getNewPileups(), and MixCollection< T >::MixItr::getNewSignal().
std::vector<T>::const_iterator MixCollection< T >::MixItr::pMixItr_ [private] |
Definition at line 80 of file MixCollection.h.
Referenced by MixCollection< T >::MixItr::next(), MixCollection< T >::MixItr::operator *(), MixCollection< T >::MixItr::operator!=(), and MixCollection< T >::MixItr::operator->().
std::vector<T>::const_iterator MixCollection< T >::MixItr::pMixItrEnd_ [private] |
bool MixCollection< T >::MixItr::trigger_ [private] |
Definition at line 88 of file MixCollection.h.
Referenced by MixCollection< T >::MixItr::bunch(), MixCollection< T >::MixItr::getTrigger(), and MixCollection< T >::MixItr::next().