1 | // ESAF : Euso Simulation and Analysis Framework |
---|
2 | // Reco input module: abstract interface |
---|
3 | // $Id: InputModule.hh 2637 2006-03-29 14:29:36Z thea $ |
---|
4 | // Marco Pallavicini created Oct, 16 2003 |
---|
5 | |
---|
6 | #ifndef __INPUTMODULE_HH_ |
---|
7 | #define __INPUTMODULE_HH_ |
---|
8 | |
---|
9 | #include <string> |
---|
10 | #include "euso.hh" |
---|
11 | #include "EsafConfigurable.hh" |
---|
12 | #include "EsafMsgSource.hh" |
---|
13 | |
---|
14 | class RecoEvent; |
---|
15 | class RecoRootEvent; |
---|
16 | |
---|
17 | class InputModule : public EsafConfigurable, public EsafMsgSource { |
---|
18 | public: |
---|
19 | // ctor |
---|
20 | InputModule( const string& ); |
---|
21 | |
---|
22 | // dtor |
---|
23 | virtual ~InputModule(); |
---|
24 | |
---|
25 | // init data source |
---|
26 | virtual Bool_t Init() = 0; |
---|
27 | |
---|
28 | // close data source |
---|
29 | virtual Bool_t Done() = 0; |
---|
30 | |
---|
31 | // returns one event until event source is empty |
---|
32 | virtual RecoEvent* GetEvent( const char* = 0 ) = 0; |
---|
33 | |
---|
34 | // delete last returned event |
---|
35 | virtual void DestroyEvent() = 0; |
---|
36 | |
---|
37 | // name of this input module |
---|
38 | inline const string& GetName() const { return fName; } |
---|
39 | |
---|
40 | // save root output |
---|
41 | virtual Bool_t SaveRootData( RecoRootEvent* ) = 0; |
---|
42 | |
---|
43 | string fInputFileName; |
---|
44 | |
---|
45 | EsafConfigClass(Reco,InputModule) |
---|
46 | |
---|
47 | private: |
---|
48 | // name of this input module |
---|
49 | string fName; |
---|
50 | |
---|
51 | // pointer to last returned event |
---|
52 | RecoEvent *fEvent; |
---|
53 | |
---|
54 | protected: |
---|
55 | // event handling for child classes |
---|
56 | inline RecoEvent* GetRecoEvent() { return fEvent; } |
---|
57 | inline void SetRecoEvent(RecoEvent* ev) { fEvent = ev; } |
---|
58 | ClassDef(InputModule,0) |
---|
59 | }; |
---|
60 | |
---|
61 | #endif /* __INPUTMODULE_HH_ */ |
---|
62 | |
---|