1 | // ESAF : Euso Simulation and Analysis Framework |
---|
2 | // Reconstruction module data object |
---|
3 | // $Id: RecoModuleData.hh 2713 2006-06-06 12:28:46Z thea $ |
---|
4 | // Marco Pallavicini created Feb, 10 2004 |
---|
5 | // |
---|
6 | // This class is a container of various type of data that is used by |
---|
7 | // each RecoModule to store its output data |
---|
8 | // Each data has a name attached to it. |
---|
9 | // It can be: |
---|
10 | // Double_t |
---|
11 | // integer (boolean not supported; use integers instead) |
---|
12 | // a pointer to ANY object, including a map or a vector or a TMap or .... |
---|
13 | // The class internally just stores a pointer to the object as a void* |
---|
14 | |
---|
15 | // History: |
---|
16 | // |
---|
17 | |
---|
18 | #ifndef __RECOMODULEDATA_HH_ |
---|
19 | #define __RECOMODULEDATA_HH_ |
---|
20 | |
---|
21 | #include <string> |
---|
22 | #include <map> |
---|
23 | |
---|
24 | #include "euso.hh" |
---|
25 | #include "RecoData.hh" |
---|
26 | |
---|
27 | class RecoModule; |
---|
28 | |
---|
29 | class RecoModuleData: public RecoData { |
---|
30 | private: |
---|
31 | // private ctor needed by rootcint streamers |
---|
32 | RecoModuleData() : pModule(0) {}; |
---|
33 | |
---|
34 | public: |
---|
35 | |
---|
36 | // ctor |
---|
37 | RecoModuleData(RecoModule*); |
---|
38 | |
---|
39 | // dtor |
---|
40 | virtual ~RecoModuleData(); |
---|
41 | |
---|
42 | virtual const string& GetName() const; |
---|
43 | /* // add an integer value to the map |
---|
44 | * // returns 0 if OK, 1 if value already existing |
---|
45 | * Int_t Add(const string&, const Int_t&); |
---|
46 | * |
---|
47 | * // add an integer value to the map |
---|
48 | * // returns 0 if OK, 1 if value already existing |
---|
49 | * Int_t Add(const string&, const Double_t&); |
---|
50 | * |
---|
51 | * // add an integer value to the map |
---|
52 | * // returns 0 if OK, 1 if value already existing |
---|
53 | * Int_t Add(const string&, void*); |
---|
54 | * |
---|
55 | * // returns an Int_t |
---|
56 | * Int_t GetInt(const string&) const; |
---|
57 | * |
---|
58 | * // returns a Double_t |
---|
59 | * Double_t GetDouble(const string&) const; |
---|
60 | * |
---|
61 | * // returns any other object type |
---|
62 | * // the user must know the object type and cast it |
---|
63 | * void* GetObj(const string&) const; |
---|
64 | * |
---|
65 | * // remove an object |
---|
66 | * // the object is NOT deleted; user should do it by hand |
---|
67 | * Bool_t RemoveObj(const string&); |
---|
68 | * |
---|
69 | */ |
---|
70 | private: |
---|
71 | // |
---|
72 | // // check name |
---|
73 | // Bool_t CheckName(const string&); |
---|
74 | // |
---|
75 | // // map of integers |
---|
76 | // map<string,Int_t> fIntMap; |
---|
77 | // |
---|
78 | // // map of Double_t |
---|
79 | // map<string,Double_t> fDoubleMap; |
---|
80 | // |
---|
81 | // // map of pointers to any object |
---|
82 | // // the user must know which type the object is |
---|
83 | // map<string,void*> fObjMap; |
---|
84 | |
---|
85 | // pointer to parent module |
---|
86 | RecoModule *pModule; |
---|
87 | inline RecoModule* GetOwner() const { return pModule;} |
---|
88 | |
---|
89 | // // clean integer and Double_t maps |
---|
90 | // void CleanMaps(); |
---|
91 | // |
---|
92 | friend class RecoModule; |
---|
93 | ClassDef(RecoModuleData,0) |
---|
94 | }; |
---|
95 | |
---|
96 | #endif /* __RECOMODULEDATA_HH_ */ |
---|
97 | |
---|