Algorithm::Pedestal_iterator< InputIterator > Struct Template Reference

#include <Convolver.h>

List of all members.

Public Types

typedef std::pair
< TH1_c_iterator,
TH1_c_iterator
HistIter
typedef std::vector< HistIterHistList

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

Detailed Description

template<typename InputIterator>
struct Algorithm::Pedestal_iterator< InputIterator >

Definition at line 88 of file Convolver.h.


Member Typedef Documentation

template<typename InputIterator >
typedef std::pair<TH1_c_iterator, TH1_c_iterator> Algorithm::Pedestal_iterator< InputIterator >::HistIter

Definition at line 89 of file Convolver.h.

template<typename InputIterator >
typedef std::vector<HistIter> Algorithm::Pedestal_iterator< InputIterator >::HistList

Definition at line 90 of file Convolver.h.


Constructor & Destructor Documentation

template<typename InputIterator >
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){}

template<typename InputIterator >
Algorithm::Pedestal_iterator< InputIterator >::Pedestal_iterator ( const InputIterator &  it  )  [inline]

Definition at line 92 of file Convolver.h.

00092 :InputIterator(it),fPedestal(0){}


Member Function Documentation

template<typename InputIterator >
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      }

template<typename InputIterator >
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      }

template<typename InputIterator >
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      }

template<typename InputIterator >
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      }


Member Data Documentation

template<typename InputIterator >
HistList Algorithm::Pedestal_iterator< InputIterator >::fHistograms [private]
template<typename InputIterator >
double Algorithm::Pedestal_iterator< InputIterator >::fPedestal [private]

The documentation for this struct was generated from the following file:

Generated on 15 Jun 2016 for AlcapDAQ by  doxygen 1.6.1