#include <Convolver.h>
Public Types | |
typedef std::pair < TH1_c_iterator, TH1_c_iterator > | HistIter |
typedef std::vector< HistIter > | HistList |
Public Member Functions | |
Pedestal_iterator (const InputIterator &it, double ped) | |
Pedestal_iterator (const InputIterator &it) | |
double | operator* () const |
double | GetPedestal () const |
void | operator++ () |
void | AddHistogram (TH1 *hist, double scale, int shift) |
Private Attributes | |
double | fPedestal |
HistList | fHistograms |
Definition at line 88 of file Convolver.h.
typedef std::pair<TH1_c_iterator, TH1_c_iterator> Algorithm::Pedestal_iterator< InputIterator >::HistIter |
Definition at line 89 of file Convolver.h.
typedef std::vector<HistIter> Algorithm::Pedestal_iterator< InputIterator >::HistList |
Definition at line 90 of file Convolver.h.
Algorithm::Pedestal_iterator< InputIterator >::Pedestal_iterator | ( | const InputIterator & | it, | |
double | ped | |||
) | [inline] |
Definition at line 91 of file Convolver.h.
00091 :InputIterator(it),fPedestal(ped){}
Algorithm::Pedestal_iterator< InputIterator >::Pedestal_iterator | ( | const InputIterator & | it | ) | [inline] |
Definition at line 92 of file Convolver.h.
00092 :InputIterator(it),fPedestal(0){}
void Algorithm::Pedestal_iterator< InputIterator >::AddHistogram | ( | TH1 * | hist, | |
double | scale, | |||
int | shift | |||
) | [inline] |
Definition at line 114 of file Convolver.h.
References Algorithm::TH1_wrapper::begin(), Algorithm::TH1_wrapper::end(), and Algorithm::Pedestal_iterator< InputIterator >::fHistograms.
00114 { 00115 TH1_wrapper wrap(hist, scale); 00116 fHistograms.push_back(std::make_pair(wrap.begin(shift), wrap.end())); 00117 }
double Algorithm::Pedestal_iterator< InputIterator >::GetPedestal | ( | ) | const [inline] |
Definition at line 96 of file Convolver.h.
References Algorithm::Pedestal_iterator< InputIterator >::fPedestal.
Referenced by TemplateConvolver::FindAllPeaks(), TemplateConvolver::FindBestPeak(), and Algorithm::Pedestal_iterator< InputIterator >::operator*().
00096 { 00097 double val=fPedestal; 00098 //for(HistList::const_iterator i_hist=fHistograms.begin(); i_hist!=fHistograms.end(); ++i_hist){ 00099 // val+=*(i_hist->first); 00100 //} 00101 return val; 00102 }
double Algorithm::Pedestal_iterator< InputIterator >::operator* | ( | ) | const [inline] |
Definition at line 93 of file Convolver.h.
References Algorithm::Pedestal_iterator< InputIterator >::GetPedestal().
00093 { 00094 return InputIterator::operator*() - GetPedestal(); 00095 }
void Algorithm::Pedestal_iterator< InputIterator >::operator++ | ( | ) | [inline] |
Definition at line 103 of file Convolver.h.
References Algorithm::Pedestal_iterator< InputIterator >::fHistograms.
00103 { 00104 InputIterator::operator++(); 00105 for(HistList::iterator i_hist=fHistograms.begin(); i_hist!=fHistograms.end(); ){ 00106 ++(i_hist->first); 00107 if( i_hist->first == i_hist->second ){ 00108 fHistograms.erase(i_hist); 00109 continue; 00110 } 00111 ++i_hist; 00112 } 00113 }
HistList Algorithm::Pedestal_iterator< InputIterator >::fHistograms [private] |
Definition at line 121 of file Convolver.h.
Referenced by Algorithm::Pedestal_iterator< InputIterator >::AddHistogram(), and Algorithm::Pedestal_iterator< InputIterator >::operator++().
double Algorithm::Pedestal_iterator< InputIterator >::fPedestal [private] |
Definition at line 120 of file Convolver.h.
Referenced by Algorithm::Pedestal_iterator< InputIterator >::GetPedestal().