* AliHLTHOMERBlockDesc holds now a copy of the data
[u/mrichter/AliRoot.git] / HLT / BASE / AliHLTHOMERBlockDesc.h
CommitLineData
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
21class AliHLTMessage;
22
23#include "TString.h"
24#include "TObject.h"
25
b6bb7ca3 26#include "AliHLTLoggingVariadicFree.h"
06272c83 27
155ff173 28/**
29 * @class AliHLTHOMERBlockDesc
30 * This class contains the data which comes from 1 block, delivered via the
31 * HOMER interface. It used in order to fill these block in TLists. ( It has
32 * to inherit from TObject ). Further more it reads the specification of the
33 * block and classifies the data as TObject, raw data, or something else. Mainly
34 * used in the AliEVEHOMERManager, as data objects for AliEVE.
35 *
36 * @ingroup alihlt_homer
37 */
b6bb7ca3 38class AliHLTHOMERBlockDesc : public TObject, public AliHLTLogging {
155ff173 39
40public:
41
42 /*
43 * ---------------------------------------------------------------------------------
44 * Constructor / Destructor
45 * ---------------------------------------------------------------------------------
46 */
47
48 /** standard constructor */
49 AliHLTHOMERBlockDesc();
50
155ff173 51 /** destructor */
52 virtual ~AliHLTHOMERBlockDesc();
53
54 /*
55 * ---------------------------------------------------------------------------------
56 * Data Handling - Setter - public
57 * ---------------------------------------------------------------------------------
58 */
59
60 /** Set block data
61 * @param data Pointer to data
62 * @param size Size of data
63 * @param origin Detector
64 * @param dataType HLT data type
65 * @param specification HLT specification
66 */
67 void SetBlock( void * data, ULong_t size, TString origin, TString dataType, ULong_t specification );
68
69 /*
70 * ---------------------------------------------------------------------------------
71 * TObject Handling - public
72 * ---------------------------------------------------------------------------------
73 */
74
75 /** Returns if block contains a TObject
76 * @return Returns kTRUE if block contains a TObject, kFALSE otherwise.
77 */
2ff24e4c 78 Bool_t IsTObject() { return fIsTObject;}
155ff173 79
80 /** Returns Pointer to TObject */
2ff24e4c 81 TObject* GetTObject() { return fTObject; }
155ff173 82
06272c83 83 /** Get class name of this block
84 * @return class name
85 */
86 TString GetClassName() { return fClassName; }
87
155ff173 88 /*
89 * ---------------------------------------------------------------------------------
90 * Data Handling - Getter - public
91 * ---------------------------------------------------------------------------------
92 */
93
94 /** Returns if block contains a raw data, fClassName is not set in this case.
95 * @return Returns kTRUE if block contains raw data, kFALSE otherwise.
96 */
2ff24e4c 97 Bool_t IsRawData() { return fIsRawData;}
155ff173 98
99 /** Get pointer to data
100 * @return Pointer to data
101 */
2ff24e4c 102 void* GetData() { return fData; }
155ff173 103
104 /** Get size of data
105 * @return Size of data
106 */
2ff24e4c 107 ULong_t GetSize() { return fSize; }
155ff173 108
06272c83 109 /** Get name of this block
110 * @return name
111 */
112 TString GetBlockName() { return fBlockName; }
113
155ff173 114 /** Get detector of this block
115 * @return Detector name
116 */
2ff24e4c 117 TString GetDetector() { return fDetector; }
155ff173 118
119 /** Get HLT data type of this block
120 * @return HLT data type
121 */
2ff24e4c 122 TString GetDataType() { return fDataType; }
155ff173 123
124 /** Get HLT specification of this block
125 * @return HLT specification
126 */
2ff24e4c 127 ULong_t GetSpecification() { return fSpecification; }
155ff173 128
155ff173 129 /** Get sub detector of this block
130 * @return subdetector
131 */
06272c83 132 Int_t GetSubDetector() { return fSubDetector; }
155ff173 133
134 /** Get sub sub detector of this block
135 * @return subsubdetector
136 */
06272c83 137 Int_t GetSubSubDetector() { return fSubSubDetector; }
155ff173 138
139 /** Returns kTRUE if HLT specification indicates a subdetector range
140 * @return kTRUE if subdetector range
141 */
06272c83 142 Bool_t HasSubDetectorRange() { return fHasSubDetectorRange; }
155ff173 143
144 /** Returns kTRUE if HLT specification indicates a subsubdetector range
145 * @return kTRUE if subsubdetector range
146 */
06272c83 147 Bool_t HasSubSubDetectorRange(){ return fHasSubSubDetectorRange; }
148
149 ///////////////////////////////////////////////////////////////////////////////////
155ff173 150
155ff173 151private:
2ff24e4c 152
155ff173 153 /** copy constructor prohibited */
154 AliHLTHOMERBlockDesc(const AliHLTHOMERBlockDesc&);
155
156 /** assignment operator prohibited */
157 AliHLTHOMERBlockDesc& operator=(const AliHLTHOMERBlockDesc&);
158
06272c83 159 /*
160 * ---------------------------------------------------------------------------------
161 * Data Handling - private
162 * ---------------------------------------------------------------------------------
163 */
164
155ff173 165 /** Set all additional members*/
166 void SetBlockParameters();
167
168 /** Checks if Block contains a TObject.
169 * If so, set fIsTObject to kTRUE, otherwise kFALSE
170 * @return fIsTObject
171 */
172 Bool_t CheckIfTObject();
173
174 /** Checks if Block contains a TObject raw data.
175 * If so, set fIsRawData to kTRUE, otherwise kFALSE
176 * @return fIsRawData
177 */
178 Bool_t CheckIfRawData();
2ff24e4c 179
155ff173 180 /*
181 * ---------------------------------------------------------------------------------
182 * Members - private
183 * ---------------------------------------------------------------------------------
184 */
185
06272c83 186 // -- Block properties --
187 // ----------------------
188
155ff173 189 /** Pointer to data of the block */
ea9a0e13 190 Char_t* fData; //! transient
155ff173 191
192 /** Size of data */
2ff24e4c 193 ULong_t fSize; // see above
155ff173 194
06272c83 195 /** Block Name */
196 TString fBlockName; // see above
197
198 // -- Data flags --
199 // ----------------
200
155ff173 201 /** States if block contains a TObject */
2ff24e4c 202 Bool_t fIsTObject; // see above
155ff173 203
204 /** States if block contains a raw data */
2ff24e4c 205 Bool_t fIsRawData; // see above
206
06272c83 207 // -- TObject properties --
208 // ------------------------
209
6291d256 210 /** AliHTMessage object containg a TObject */
2ff24e4c 211 AliHLTMessage* fMessage; //! transient
155ff173 212
2ff24e4c 213 /** TObject extracted out of @see AliHLTMessage */
06272c83 214 TObject* fTObject; //! transient
155ff173 215
216 /** Class Name of the block */
06272c83 217 TString fClassName; // see above
218
219 // -- Data Specifications --
220 // -------------------------
221
222 /** HLT DataType */
223 TString fDataType; // see above
155ff173 224
225 /** Detector Name, e.g. PHOS */
2ff24e4c 226 TString fDetector; // see above
155ff173 227
155ff173 228 /** HLT Specification */
2ff24e4c 229 ULong_t fSpecification; // see above
155ff173 230
06272c83 231 // XXXXXXXXXXXXXXXXXXXXXXXX REMOVE IF NOT NEEDED XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
232
233 // -- Sub Detector Specifications --
234 // ---------------------------------
235
236 /** SubDetector Name e.g. MODULE */
237 Int_t fSubDetector; // see above
238
239 /** SubSubDetector Name e.g. PARTITION */
240 Int_t fSubSubDetector; // see above
155ff173 241
242 /** States id block has a subdetector range */
06272c83 243 Bool_t fHasSubDetectorRange; // see above
155ff173 244
245 /** States id block has a subsubdetector range */
06272c83 246 Bool_t fHasSubSubDetectorRange; // see above
247
248 // XXXXXXXXXXXXXXXXXXXXXXXX REMOVE IF NOT NEEDED XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
155ff173 249
250 ClassDef( AliHLTHOMERBlockDesc, 0 )
251};
252
253#endif