source: JEM-EUSO/esaf_cc_at_lal/packages/reconstruction/framework/include/RecoModule.hh @ 114

Last change on this file since 114 was 114, checked in by moretto, 11 years ago

actual version of ESAF at CCin2p3

File size: 2.0 KB
Line 
1// ESAF : Euso Simulation and Analysis Framework
2// Reconstruction module
3// $Id: RecoModule.hh 2633 2006-03-28 09:13:43Z thea $
4// Marco Pallavicini created Oct, 16 2003
5// data container added      Feb, 16,2004
6
7#ifndef __RECOMODULE_HH_
8#define __RECOMODULE_HH_
9
10#include <string>
11
12#include "euso.hh"
13#include "EsafConfigurable.hh"
14#include "RecoModuleData.hh"
15#include "EsafMsgSource.hh"
16
17class RecoEvent;
18class RecoRootEvent;
19
20class RecoModule : public EsafConfigurable, public EsafMsgSource {
21public:
22
23    // ctor
24    RecoModule( const string&);
25
26    // dtor
27    virtual ~RecoModule();
28
29    // module name
30    inline const string& GetName() const { return fName; }
31
32    // Init method: called at the beginning of a run
33    virtual Bool_t Init() = 0;
34
35    // called before each event process
36    virtual Bool_t PreProcess() = 0;
37
38    // event processing
39    virtual Bool_t Process( RecoEvent* ) = 0;
40
41    // called after processing an event
42    virtual Bool_t PostProcess() = 0;
43
44    // called at the end of each run
45    virtual Bool_t Done() = 0;
46
47    virtual Bool_t SaveRootData(RecoRootEvent*) = 0;
48   
49    // clean memory after each event
50    // each module has the responbility to clean the data container
51    // from its own data in method UserMemoryClean()
52    // UserMemoryClean() and StandardMemoryClean() are called
53    // by the framework
54    virtual void UserMemoryClean() {}
55   
56    virtual void TmpMemoryClean() {};
57
58    // user SHOULD NOT override this
59    inline void StandardMemoryClean() {MyData()->CleanMaps();}
60
61public:
62    EsafConfigClass(Reco,RecoModule)
63
64protected:
65    // get RecoModuleData object for child classes
66    RecoModuleData* MyData() { return fData; }
67
68public:
69    // get RecoModuleData object for public: read only!
70    const RecoModuleData* GetData() const { return fData;}
71
72private:
73    // name of this module
74    string fName;
75
76    // container object with output data of this module
77    RecoModuleData *fData;
78    ClassDef(RecoModule,0)
79};
80
81#endif  /* __RECOMODULE_HH_ */
82
Note: See TracBrowser for help on using the repository browser.