Diana Software
MAveragePulses.hh
Go to the documentation of this file.
1 
49 #ifndef _M_AVERAGEPULSES_H_
50 #define _M_AVERAGEPULSES_H_
51 
52 #include <vector>
53 #include <string>
54 #include "QModule.hh"
55 #include "QDiana.hh"
56 #include "QVector.hh"
57 #include "QAverageVector.hh"
58 
59 class MAveragePulses : public Diana::QModule {
60 
61  public:
62  // Init method is called before event loop
63  virtual void Init( Diana::QEvent& ev);
64 
65  // Do method is called for each event, getting the event as argument
66  virtual void Do( Diana::QEvent& ev);
67 
68  // Done method is called after event loop
69  virtual void Done();
70 
71  void DumpEventList(int nrun);
72 
73  private:
74 
75  class ChannelData {
76  public:
78  size_t fNumPulses;
79  double fAlignPos;
80  Diana::QVector fPeakPositions;
81 
82  };
83 
85  std::string fPulseLabel;
87  std::string fValidityKind;
88 
91 
94 
97 
100 
103 
106 
108  std::string fOutput;
109 
112 
115 
117  std::map<int, ChannelData> fChannelData;
118 
120  std::vector<int> fSRuns;
121 
123 };
124 
125 #endif
Module to form idealized pulses by averaging.
int fValidityStart
Validity start first run (or dataset) of validity.
virtual void Do(Diana::QEvent &ev)
std::vector< int > fSRuns
vector of runs used for average pulse calculation
bool fFractionalShift
fractional shift
bool fUseOFDelay
use maximum position from OF to align pulses
std::map< int, ChannelData > fChannelData
data stored for each channel
std::string fValidityKind
Validity kind defines the kind of validity range for the average pulse (run or dataset)
virtual void Init(Diana::QEvent &ev)
std::string fOutput
output for average pulse
std::string fPulseLabel
pulse kind
int fValidityEnd
Validity end last run (or dataset) of validity.
bool fSubtractBaseline
subract baseline from average pulse
bool fAlignmentOn
pulse alignment switch
bool fNumBaselinePoints
number of points used to calculate baseline
void DumpEventList(int nrun)
virtual void Done()
int fMaxShift
max shift allowed
average vector object