1 | // $Id: RecoData.hh 2713 2006-06-06 12:28:46Z thea $ |
---|
2 | // Author: 2006/06/05 |
---|
3 | |
---|
4 | /***************************************************************************** |
---|
5 | * ESAF: Euso Simulation and Analysis Framework * |
---|
6 | * * |
---|
7 | * Id: RecoData * |
---|
8 | * Package: <packagename> * |
---|
9 | * Coordinator: <coordinator> * |
---|
10 | * * |
---|
11 | *****************************************************************************/ |
---|
12 | |
---|
13 | #ifndef __RECODATA_HH__ |
---|
14 | #define __RECODATA_HH__ |
---|
15 | |
---|
16 | #include <string> |
---|
17 | #include <map> |
---|
18 | |
---|
19 | #include "euso.hh" |
---|
20 | #include "EsafMsgSource.hh" |
---|
21 | |
---|
22 | //////////////////////////////////////////////////////////////////////////////// |
---|
23 | // // |
---|
24 | // RecoData // |
---|
25 | // // |
---|
26 | // <brief class description> // |
---|
27 | // // |
---|
28 | //////////////////////////////////////////////////////////////////////////////// |
---|
29 | |
---|
30 | class RecoData : public EsafMsgSource { |
---|
31 | public: |
---|
32 | virtual ~RecoData(); |
---|
33 | |
---|
34 | virtual const string& GetName() const = 0; |
---|
35 | |
---|
36 | // add an integer value to the map |
---|
37 | // returns 0 if OK, 1 if value already existing |
---|
38 | virtual Int_t Add(const string&, const Int_t&); |
---|
39 | |
---|
40 | // add an integer value to the map |
---|
41 | // returns 0 if OK, 1 if value already existing |
---|
42 | virtual Int_t Add(const string&, const Double_t&); |
---|
43 | |
---|
44 | // add an integer value to the map |
---|
45 | // returns 0 if OK, 1 if value already existing |
---|
46 | virtual Int_t Add(const string&, void*); |
---|
47 | |
---|
48 | // returns an Int_t |
---|
49 | virtual Int_t GetInt(const string&) const; |
---|
50 | |
---|
51 | // returns a Double_t |
---|
52 | virtual Double_t GetDouble(const string&) const; |
---|
53 | |
---|
54 | // returns any other object type |
---|
55 | // the user must know the object type and cast it |
---|
56 | virtual void* GetObj(const string&) const; |
---|
57 | |
---|
58 | // remove an object |
---|
59 | // the object is NOT deleted; user should do it by hand |
---|
60 | virtual Bool_t RemoveObj(const string&); |
---|
61 | |
---|
62 | |
---|
63 | protected: |
---|
64 | RecoData(); |
---|
65 | |
---|
66 | // check name |
---|
67 | Bool_t CheckName(const string&); |
---|
68 | |
---|
69 | // map of integers |
---|
70 | map<string,Int_t> fIntMap; |
---|
71 | |
---|
72 | // map of Double_t |
---|
73 | map<string,Double_t> fDoubleMap; |
---|
74 | |
---|
75 | // map of pointers to any object |
---|
76 | // the user must know which type the object is |
---|
77 | map<string,void*> fObjMap; |
---|
78 | |
---|
79 | // clean integer and Double_t maps |
---|
80 | virtual void CleanMaps(); |
---|
81 | |
---|
82 | friend class RecoModule; |
---|
83 | ClassDef(RecoData,0) |
---|
84 | }; |
---|
85 | |
---|
86 | #endif /* __RECODATA_HH__ */ |
---|
87 | |
---|