Diana Software
QWriter.hh
Go to the documentation of this file.
1 
16 #ifndef _MQ_WRITER_HH_
17 #define _MQ_WRITER_HH_
18 
19 #include "QBaseModule.hh"
20 #include <string>
21 #include <list>
22 #include "QRWCommon.hh"
23 
24 
26 
27 class QEventInspector;
28 
29 class QWriter : public QBaseModule
30 {
31  public:
35  virtual ~QWriter() {};
36 
39  virtual void Init(QEventInspector& ev) = 0;
40 
45  virtual void Do( QEventInspector& ev) = 0;
46 
47 
51  virtual void Done() = 0;
52 
53  protected:
56  private:
58  void Begin(QEventAssembler& ev);
59 
61  bool Process(QEventAssembler& eva,QEventList& neigh, const bool exec, QEventList& oneigh);
62 
64  void End();
65 
68 
69  friend class QSequence;
70 };
71 
72 
73 #undef REGISTER_MODULE
74 #define REGISTER_MODULE(clazz) REGISTER_MOD(clazz,Diana::QWriter)
75 
77 
78 #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.
Visitor class to inspect the QEvent content.
list of references to const QEvent (s)
Definition: QEventList.hh:21
Diana Reconstruction program.
Definition: QSequence.hh:40
Abstract class for diana writers.
Definition: QWriter.hh:30
void End()
End method is called after event loop, and calls Done()
Definition: QWriter.cc:25
void Begin(QEventAssembler &ev)
Begin method is called before event loop, and calls Init()
Definition: QWriter.cc:7
bool fSkipEvents
Skip filtered events (false)
Definition: QWriter.hh:67
virtual void Init(QEventInspector &ev)=0
Init method is called before event loop, getting a QEventInspector as argument. This method must be i...
QWriter()
constructor
Definition: QWriter.hh:33
virtual void Done()=0
Done method is called after event loop This method must be implemented by inheriting classes.
virtual void Do(QEventInspector &ev)=0
Dot method is called for each event, getting the QEventInspector as argument. This method must be imp...
virtual ~QWriter()
destructor
Definition: QWriter.hh:35
QRWCommon * fRWCommon
object to share file names with QReader
Definition: QWriter.hh:55
bool Process(QEventAssembler &eva, QEventList &neigh, const bool exec, QEventList &oneigh)
Process method is called for each event, and calls Do()
Definition: QWriter.cc:15