00001 #ifndef _M_AVERAGE_PULSES_ONE_ITERATION_HH_ 00002 #define _M_AVERAGE_PULSES_ONE_ITERATION_HH_ 00003 00030 #include "QModule.hh" 00031 #include "QVector.hh" 00032 #include <map> 00033 00034 00035 class MAveragePulsesOneIteration : public QModule { 00036 00037 public: 00039 MAveragePulsesOneIteration(QSequence* s); 00040 00042 ~MAveragePulsesOneIteration(); 00043 00045 void Init(); 00046 00048 QEvent* Do(QEvent* ev); 00049 00051 void Done(); 00052 00053 private: 00055 void Add(const int channel, QVector& pulse); 00056 00058 QVector Normalize(const QEvent* ev); 00059 00062 void Resample(const int channel); 00063 00065 void Setup(const int channel, const QVector& pulse); 00066 00068 std::map<int, QVector> fAvgPulse; 00069 00071 time_t fBeginValidity; 00072 00075 std::map<int, QVector> fCountsInBin; 00076 00078 time_t fEndValidity; 00079 00081 std::map<int, QVector> fOccurancesOfPulseSize; 00082 00084 std::map<int, QVector> fPeakOccurancesInBin; 00085 00087 bool fProcessedAnEvent; 00088 00089 }; 00090 00091 #endif