Diana Software
MFilterResult.cc
Go to the documentation of this file.
1 #include "MFilterResult.hh"
2 #include "QEvent.hh"
3 #include "QBool.hh"
4 
5 using namespace Diana;
6 
8 
9 void MFilterResult::GetCuts(const QEvent& ev)
10 {
11  fFilterLabel = GetString("BoolLabel","NODEFAULT@NODEFAULT");
12  // fNegate = GetBool("Negate",false,false);
13  ev.RequireByLabel<QBool>(fFilterLabel);
14  bool warn = (GetLogicFlag() != CASE);
15  GetBool("Save",false, warn);
16 }
17 
19 {
20  // if(fNegate) return !ev.GetByLabel<QBool>(fFilterLabel);
21 
22  return ev.GetByLabel<QBool>(fFilterLabel);
23 }
#define REGISTER_MODULE(clazz)
Definition: QDriver.hh:133
Filter upon an already existing QBool in the QEvent.
bool Filter(const Diana::QEvent &ev)
return true if ev passes the cuts
bool wrapped into a QObject
Definition: QBool.hh:17
diana event
Definition: QEvent.hh:46
const Q & GetByLabel(const QEventLabel &label) const
Get a QObject in read mode by label.
Definition: QEvent.hh:135
the Diana namespace is needed because sometimes we use Qt libraries, that use same class names of our...