Diana Software
MSelectRunType.cc
Go to the documentation of this file.
1 #include "MSelectRunType.hh"
2 #include "QEvent.hh"
3 #include "QRunDataHandle.hh"
4 #include "QRawEvent.hh"
5 
6 
8 
9 using namespace Diana;
10 
11 
13 {
14  QError err = fRunType.Set(GetString("RunType","B"));
16 }
17 
19 {
20  const int run = ev.Get<QHeader>("DAQ","Header").GetRun();
22  GlobalData().Get("",&rHandle,"");
23  const QRunData& runData = rHandle.Get();
24 
25  if(runData.fType == RT_REPROCESS && runData.fSourceType == fRunType)
26  return true;
27  else
28  if(runData.fType == fRunType)
29  return true;
30 
31  return false;
32 }
err
Definition: CheckOF.C:114
QRunDataHandle rHandle(753)
#define DianaThrow(obj)
Definition: QDianaDebug.hh:26
#define REGISTER_MODULE(clazz)
Definition: QDriver.hh:133
@ QERR_SUCCESS
Definition: QError.hh:27
@ RT_REPROCESS
Definition: QRunType.hh:19
Selects events maching run type.
bool Filter(const Diana::QEvent &ev)
return true if ev passes the cuts
void GetCuts(const Diana::QEvent &ev)
Get cuts from config file.
error class with error type and description
Definition: QError.hh:115
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: basic information like run number and time.
Definition: QHeader.hh:16
global handle for QRunData
Basic run based info.
Definition: QRunData.hh:20
RunType fSourceType
Detector name.
Definition: QRunData.hh:76
RunType fType
Run Type.
Definition: QRunData.hh:45
the Diana namespace is needed because sometimes we use Qt libraries, that use same class names of our...