Diana Software
QModule.hh
Go to the documentation of this file.
1 
47 #ifndef _Q_MODULE_H_
48 #define _Q_MODULE_H_
49 
50 #include "QBaseModule.hh"
51 
53 
54 class QModule : public QBaseModule {
55 
56  public:
58  QModule();
59 
61  virtual ~QModule();
62 
64  virtual void Init(QEvent& ev) = 0;
65 
67  virtual void Do( QEvent& ev);
68 
70  virtual void Do( QEvent& ev, const QEventList& neighbours);
71 
73  virtual void Done() = 0;
74 
75  private:
77  void Begin(QEventAssembler& eva);
78 
80  bool Process( QEventAssembler& eva, QEventList& neigh, const bool exec, QEventList& oneigh);
81 
83  void End();
84 
87 
90 
92  bool fFirstCall;
93 
96 
97 
98 };
99 
101 
102 #undef REGISTER_MODULE
103 #define REGISTER_MODULE(clazz) REGISTER_MOD(clazz,Diana::QModule)
104 
105 
106 #endif
#define Q_END_NAMESPACE
Definition: QDiana.hh:22
#define Q_BEGIN_NAMESPACE
Definition: QDiana.hh:20
Base class for modules.
Definition: QBaseModule.hh:57
Visitor class of QEvent that provides full handling of QEvent.
list of references to const QEvent (s)
Definition: QEventList.hh:21
diana event
Definition: QEvent.hh:46
Base class for diana modules.
Definition: QModule.hh:54
virtual void Done()=0
Done method is called after event loop.
void End()
End method is called after event loop, and calls Done()
Definition: QModule.cc:87
bool Process(QEventAssembler &eva, QEventList &neigh, const bool exec, QEventList &oneigh)
Process method is called for each event, and calls Do()
Definition: QModule.cc:39
bool fSkipRequiredNotValid
Skip events containing non-valid required objects.
Definition: QModule.hh:89
QModule()
constuctor
Definition: QModule.cc:7
virtual void Init(QEvent &ev)=0
Init method is called before event loop.
bool fSkipEvents
flag to skip the Do() execution on filtered events
Definition: QModule.hh:86
size_t fRunOnIteration
Specify on which iteration the module runs.
Definition: QModule.hh:95
virtual void Do(QEvent &ev)
Do method is called on each event, getting the event as argument.
Definition: QModule.cc:71
bool fFirstCall
flag to check first Do() call
Definition: QModule.hh:92
void Begin(QEventAssembler &eva)
Begin method is called before event loop, and calls Init()
Definition: QModule.cc:15
virtual ~QModule()
destructor
Definition: QModule.cc:11