Diana Software
MFilterTest.cc
Go to the documentation of this file.
1 #include "MFilterTest.hh"
2 #include "QEvent.hh"
3 #include "QRawEvent.hh"
4 #include "QPulse.hh"
5 #include "QVector.hh"
6 
7 using namespace Diana;
8 
10 
11 
12 void MFilterTest::GetCuts(const QEvent& ev)
13 {
14  fHeaterAccept = GetBool("HeaterAccept",false);
15  fPeakMax = GetInt("RawPeakMax", 58000 );
16 }
17 
18 bool MFilterTest::Filter(const QEvent& ev)
19 {
20 
21  //const QRawEvent& raw = ev.Get<QRawEvent>("DAQ","RawEvent");
22  const QPulse& pulse = ev.Get<QPulse>("DAQ","Pulse");
23  const QPulseInfo& pulseInfo = ev.Get<QPulseInfo>("DAQ","PulseInfo");
24 
25  // Filter heaters
26  bool result = true;
27  if(pulseInfo.GetIsPulser() && (!fHeaterAccept)) result = false;
28 
29  if(pulse.GetSamples().GetMax() > fPeakMax ) {
30  result = false;
31  }
32 
33  return result;
34 }
#define REGISTER_MODULE(clazz)
Definition: QDriver.hh:133
diana framework software test.
Definition: MFilterTest.hh:19
bool Filter(const Diana::QEvent &ev)
Definition: MFilterTest.cc:18
diana event
Definition: QEvent.hh:46
void Get(const char *owner, ReadHandle< Q > &handle) const
Get a QObject Handle in read mode.
Definition: QEvent.hh:74
Raw event: bolometer channel, trigger positions and types.
Definition: QPulseInfo.hh:18
Raw event: sampled waveform.
Definition: QPulse.hh:22
const Diana::QVector & GetSamples() const
Get Samples casted to double (QVector instead of QVectorI). Use this method in place of GetSamplesADC...
Definition: QPulse.cc:49
the Diana namespace is needed because sometimes we use Qt libraries, that use same class names of our...