DigitVector Class Reference

#include <DigitVector.h>

Inheritance diagram for DigitVector:

Chop Chop List of all members.

Public Member Functions

 DigitVector ()
 DigitVector (const CandHandle *p)
 DigitVector (const DigitVector &list, UInt_t start, UInt_t stop)
void FillFrom (const CandHandle *, Bool_t nodupe=false)
void FillFrom (const DigitVector &list, UInt_t start, UInt_t stop, Bool_t nodupe=false)
void AddDigit (CandDigitHandle, Bool_t nodupe=false)

Detailed Description

Definition at line 14 of file DigitVector.h.


Constructor & Destructor Documentation

DigitVector::DigitVector (  )  [inline]

Definition at line 18 of file DigitVector.h.

00018 {};

DigitVector::DigitVector ( const CandHandle p  )  [inline]

Definition at line 20 of file DigitVector.h.

References FillFrom().

00021     { FillFrom(p); };

DigitVector::DigitVector ( const DigitVector list,
UInt_t  start,
UInt_t  stop 
) [inline]

Definition at line 23 of file DigitVector.h.

References FillFrom().

00026     { FillFrom(list,start,stop); };


Member Function Documentation

void DigitVector::AddDigit ( CandDigitHandle  ,
Bool_t  nodupe = false 
)

Definition at line 45 of file DigitVector.cxx.

Referenced by FillFrom().

00046 {
00047   if(nodupe) { // reject duplicates.
00048     for(UInt_t i=0; i<size(); i++) {
00049       if(cdh == operator[](i)) return;
00050     }
00051   }
00052 
00053   push_back(cdh);
00054 }

void DigitVector::FillFrom ( const DigitVector list,
UInt_t  start,
UInt_t  stop,
Bool_t  nodupe = false 
)

Definition at line 28 of file DigitVector.cxx.

References AddDigit().

00033 {
00035   assert( (stop<=list.size()) );
00036   
00037   this->reserve(this->size() + (stop-start) );
00038   for(UInt_t i=start; i<stop; i++) {
00039     AddDigit(list[i],nodupe);
00040   }
00041 }

void DigitVector::FillFrom ( const CandHandle ,
Bool_t  nodupe = false 
)

Definition at line 12 of file DigitVector.cxx.

References AddDigit(), and CandHandle::GetDaughterIterator().

Referenced by DigitVector().

00013 {
00014   // Recursive.
00015   assert(ch_ptr);
00016   
00017   TIter chItr = ch_ptr->GetDaughterIterator(); 
00018   while(CandHandle *ch = dynamic_cast<CandHandle*>(chItr.Next())) {
00019     if(const CandDigitHandle* cdh = dynamic_cast<const CandDigitHandle*>(ch))
00020       AddDigit(*cdh, nodupe);
00021     else 
00022       FillFrom(ch);
00023   }  
00024 }


The documentation for this class was generated from the following files:
Generated on Wed Sep 10 22:51:06 2014 for loon by  doxygen 1.4.7