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