Diana Software
MTutorialAveragePulse.hh

Example module which produces a raw average pulse for each channel, header file.

Author
Marco Vignati

This module is used in diana_tutorial_averagepulse.cfg to perform the average pulse of each channel. See also the implementation in MTutorialAveragePulse.cc.

#ifndef _M_TUTORIAL_AVERAGE_PULSE_HH_
#define _M_TUTORIAL_AVERAGE_PULSE_HH_
#include "QModule.hh"
#include "QVector.hh"
#include <map>
class MTutorialAveragePulse : public Diana::QModule {
public:
void Init(Diana::QEvent& ev);
void Do(Diana::QEvent& ev);
void Done();
class ChannelInfo {
public:
Diana::QVector fSamples;
};
private:
std::map<int, ChannelInfo> fAveragePulses;
std::string fOutput;
};
#endif
std::map< int, ChannelInfo > fAveragePulses
map containing ChannelInfo for each channel. The key is the channel number
std::string fOutput
output file which for AveragePulses
void Do(Diana::QEvent &ev)
Do method. Declare and implement only one of the two versions.
void Init(Diana::QEvent &ev)
Init method.