Diana Software
MFilterInIteration.cc
Go to the documentation of this file.
1 #include "MFilterInIteration.hh"
2 #include "QEvent.hh"
3 #include "QEventList.hh"
4 
5 
7 
8 using namespace Diana;
9 
10 
12 {
13  fIteration = (unsigned int)GetInt("Iteration",2,true);
14  fFilterAfter = GetBool("FilterAfter",false,false);
15 }
16 
17 //bool MFilterInIteration::Filter(const QEvent& ev, const QEventList& neighbours)
19 {
20  const unsigned int iter = GetIteration();
21  bool result = false;
22  if(iter < fIteration) {
23  result = fFilterAfter;
24  } else {
25  result = !fFilterAfter;
26  }
27  return result;
28 }
#define REGISTER_MODULE(clazz)
Definition: QDriver.hh:133
Filter in iteration.
void GetCuts(const Diana::QEvent &ev)
Get cuts from config file.
bool Filter(const Diana::QEvent &ev)
return true if ev passes the cuts
diana event
Definition: QEvent.hh:46
the Diana namespace is needed because sometimes we use Qt libraries, that use same class names of our...