19 using namespace Diana;
25 fOutput = GetString(
"Output",
"avg/averagepulses.root");
39 if(fAveragePulses.find(chan) == fAveragePulses.end()) {
40 fAveragePulses[chan].fNumberOfEvents = 0;
41 fAveragePulses[chan].fSamples.Resize(samples.Size());
42 fAveragePulses[chan].fSamples.Initialize(0.);
46 fAveragePulses[chan].fSamples += samples;
47 fAveragePulses[chan].fNumberOfEvents++;
53 std::map<int,ChannelInfo>::const_iterator iter = fAveragePulses.begin();
54 while(iter != fAveragePulses.end()) {
56 const int chan = iter->first;
57 QVector
ap = iter->second.fSamples;
58 int nev = iter->second.fNumberOfEvents;
65 GlobalHandle<QVector> apHandle(
"Samples");
66 apHandle.SetChannel(chan);
68 GlobalData().Set(&apHandle,fOutput);
#define REGISTER_MODULE(clazz)
void Do(Diana::QEvent &ev)
Do method. Declare and implement only one of the two versions.
void Init(Diana::QEvent &ev)
Init method.
void Get(const char *owner, ReadHandle< Q > &handle) const
Get a QObject Handle in read mode.
Raw event: bolometer channel, trigger positions and types.
const int & GetChannelId() const
Get ChannelId.
Raw event: sampled waveform.
const Diana::QVector & GetSamples() const
Get Samples casted to double (QVector instead of QVectorI). Use this method in place of GetSamplesADC...
the Diana namespace is needed because sometimes we use Qt libraries, that use same class names of our...