]>
Commit | Line | Data |
---|---|---|
155ff173 | 1 | //-*- Mode: C++ -*- |
2 | #ifndef ALIHLTHOMERBLOCKDESC_H | |
3 | #define ALIHLTHOMERBLOCKDESC_H | |
4 | ||
5 | /* This file is property of and copyright by the ALICE HLT Project * | |
6 | * ALICE Experiment at CERN, All rights reserved. * | |
7 | * See cxx source for full Copyright notice */ | |
8 | ||
9 | /** @file AliHLTHOMERBlockDesc.h | |
10 | @author Jochen Thaeder | |
11 | @date | |
12 | @brief Container for HOMER Blocks | |
13 | */ | |
14 | ||
15 | // see below for class documentation | |
16 | // or | |
17 | // refer to README to build package | |
18 | // or | |
19 | // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt | |
20 | ||
21 | class AliHLTMessage; | |
22 | ||
23 | #include "TString.h" | |
24 | #include "TObject.h" | |
25 | ||
26 | /** | |
27 | * @class AliHLTHOMERBlockDesc | |
28 | * This class contains the data which comes from 1 block, delivered via the | |
29 | * HOMER interface. It used in order to fill these block in TLists. ( It has | |
30 | * to inherit from TObject ). Further more it reads the specification of the | |
31 | * block and classifies the data as TObject, raw data, or something else. Mainly | |
32 | * used in the AliEVEHOMERManager, as data objects for AliEVE. | |
33 | * | |
34 | * @ingroup alihlt_homer | |
35 | */ | |
36 | class AliHLTHOMERBlockDesc : public TObject { | |
37 | ||
38 | public: | |
39 | ||
40 | /* | |
41 | * --------------------------------------------------------------------------------- | |
42 | * Constructor / Destructor | |
43 | * --------------------------------------------------------------------------------- | |
44 | */ | |
45 | ||
46 | /** standard constructor */ | |
47 | AliHLTHOMERBlockDesc(); | |
48 | ||
49 | /** Constructor, set block data | |
50 | * @param data Pointer to data | |
51 | * @param size Size of data | |
52 | * @param origin Detector | |
53 | * @param dataType HLT data type | |
54 | * @param specification HLT specification | |
55 | */ | |
56 | AliHLTHOMERBlockDesc( void * data, ULong_t size, TString origin, TString dataType, ULong_t specification ); | |
57 | ||
58 | /** destructor */ | |
59 | virtual ~AliHLTHOMERBlockDesc(); | |
60 | ||
61 | /* | |
62 | * --------------------------------------------------------------------------------- | |
63 | * Data Handling - Setter - public | |
64 | * --------------------------------------------------------------------------------- | |
65 | */ | |
66 | ||
67 | /** Set block data | |
68 | * @param data Pointer to data | |
69 | * @param size Size of data | |
70 | * @param origin Detector | |
71 | * @param dataType HLT data type | |
72 | * @param specification HLT specification | |
73 | */ | |
74 | void SetBlock( void * data, ULong_t size, TString origin, TString dataType, ULong_t specification ); | |
75 | ||
76 | /* | |
77 | * --------------------------------------------------------------------------------- | |
78 | * TObject Handling - public | |
79 | * --------------------------------------------------------------------------------- | |
80 | */ | |
81 | ||
82 | /** Returns if block contains a TObject | |
83 | * @return Returns kTRUE if block contains a TObject, kFALSE otherwise. | |
84 | */ | |
2ff24e4c | 85 | Bool_t IsTObject() { return fIsTObject;} |
155ff173 | 86 | |
87 | /** Returns Pointer to TObject */ | |
2ff24e4c | 88 | TObject* GetTObject() { return fTObject; } |
155ff173 | 89 | |
90 | /* | |
91 | * --------------------------------------------------------------------------------- | |
92 | * Data Handling - Getter - public | |
93 | * --------------------------------------------------------------------------------- | |
94 | */ | |
95 | ||
96 | /** Returns if block contains a raw data, fClassName is not set in this case. | |
97 | * @return Returns kTRUE if block contains raw data, kFALSE otherwise. | |
98 | */ | |
2ff24e4c | 99 | Bool_t IsRawData() { return fIsRawData;} |
155ff173 | 100 | |
101 | /** Get pointer to data | |
102 | * @return Pointer to data | |
103 | */ | |
2ff24e4c | 104 | void* GetData() { return fData; } |
155ff173 | 105 | |
106 | /** Get size of data | |
107 | * @return Size of data | |
108 | */ | |
2ff24e4c | 109 | ULong_t GetSize() { return fSize; } |
155ff173 | 110 | |
111 | /** Get detector of this block | |
112 | * @return Detector name | |
113 | */ | |
2ff24e4c | 114 | TString GetDetector() { return fDetector; } |
155ff173 | 115 | |
116 | /** Get HLT data type of this block | |
117 | * @return HLT data type | |
118 | */ | |
2ff24e4c | 119 | TString GetDataType() { return fDataType; } |
155ff173 | 120 | |
121 | /** Get HLT specification of this block | |
122 | * @return HLT specification | |
123 | */ | |
2ff24e4c | 124 | ULong_t GetSpecification() { return fSpecification; } |
155ff173 | 125 | |
126 | /** Get class name of this block | |
127 | * @return class name | |
128 | */ | |
2ff24e4c | 129 | TString GetClassName() { return fClassName; } |
155ff173 | 130 | |
131 | /** Get sub detector of this block | |
132 | * @return subdetector | |
133 | */ | |
2ff24e4c | 134 | TString GetSubDetector() { return fSubDetector; } |
155ff173 | 135 | |
136 | /** Get sub sub detector of this block | |
137 | * @return subsubdetector | |
138 | */ | |
2ff24e4c | 139 | TString GetSubSubDetector() { return fSubSubDetector; } |
155ff173 | 140 | |
141 | /** Returns kTRUE if HLT specification indicates a subdetector range | |
142 | * @return kTRUE if subdetector range | |
143 | */ | |
2ff24e4c | 144 | Bool_t HasSubDetectorRange() { return fHasSubDetectorRange; } |
155ff173 | 145 | |
146 | /** Returns kTRUE if HLT specification indicates a subsubdetector range | |
147 | * @return kTRUE if subsubdetector range | |
148 | */ | |
149 | Bool_t HasSubSubDetectorRange() { return fHasSubSubDetectorRange; } | |
150 | ||
155ff173 | 151 | private: |
2ff24e4c | 152 | |
155ff173 | 153 | /** copy constructor prohibited */ |
154 | AliHLTHOMERBlockDesc(const AliHLTHOMERBlockDesc&); | |
155 | ||
156 | /** assignment operator prohibited */ | |
157 | AliHLTHOMERBlockDesc& operator=(const AliHLTHOMERBlockDesc&); | |
158 | ||
159 | /** Set all additional members*/ | |
160 | void SetBlockParameters(); | |
161 | ||
162 | /** Checks if Block contains a TObject. | |
163 | * If so, set fIsTObject to kTRUE, otherwise kFALSE | |
164 | * @return fIsTObject | |
165 | */ | |
166 | Bool_t CheckIfTObject(); | |
167 | ||
168 | /** Checks if Block contains a TObject raw data. | |
169 | * If so, set fIsRawData to kTRUE, otherwise kFALSE | |
170 | * @return fIsRawData | |
171 | */ | |
172 | Bool_t CheckIfRawData(); | |
2ff24e4c | 173 | |
155ff173 | 174 | /* |
175 | * --------------------------------------------------------------------------------- | |
176 | * Members - private | |
177 | * --------------------------------------------------------------------------------- | |
178 | */ | |
179 | ||
180 | /** Pointer to data of the block */ | |
2ff24e4c | 181 | void* fData; //! transient |
155ff173 | 182 | |
183 | /** Size of data */ | |
2ff24e4c | 184 | ULong_t fSize; // see above |
155ff173 | 185 | |
186 | /** States if block contains a TObject */ | |
2ff24e4c | 187 | Bool_t fIsTObject; // see above |
155ff173 | 188 | |
189 | /** States if block contains a raw data */ | |
2ff24e4c | 190 | Bool_t fIsRawData; // see above |
191 | ||
6291d256 | 192 | /** AliHTMessage object containg a TObject */ |
2ff24e4c | 193 | AliHLTMessage* fMessage; //! transient |
155ff173 | 194 | |
2ff24e4c | 195 | /** TObject extracted out of @see AliHLTMessage */ |
196 | TObject* fTObject; //! transient | |
155ff173 | 197 | |
198 | /** Class Name of the block */ | |
2ff24e4c | 199 | TString fClassName; // see above |
155ff173 | 200 | |
201 | /** Detector Name, e.g. PHOS */ | |
2ff24e4c | 202 | TString fDetector; // see above |
155ff173 | 203 | |
204 | /** SubDetector Name e.g. MODULE */ | |
2ff24e4c | 205 | TString fSubDetector; // see above |
155ff173 | 206 | |
207 | /** SubSubDetector Name e.g. PARTITION */ | |
2ff24e4c | 208 | TString fSubSubDetector; // see above |
155ff173 | 209 | |
210 | /** HLT Specification */ | |
2ff24e4c | 211 | ULong_t fSpecification; // see above |
155ff173 | 212 | |
213 | /** HLT DataType */ | |
2ff24e4c | 214 | TString fDataType; // see above |
155ff173 | 215 | |
216 | /** States id block has a subdetector range */ | |
217 | Bool_t fHasSubDetectorRange; // see above | |
218 | ||
219 | /** States id block has a subsubdetector range */ | |
220 | Bool_t fHasSubSubDetectorRange; // see above | |
221 | ||
222 | ClassDef( AliHLTHOMERBlockDesc, 0 ) | |
223 | }; | |
224 | ||
225 | #endif |