]>
Commit | Line | Data |
---|---|---|
f23a6e1a | 1 | // @(#) $Id$ |
2 | ||
3 | #ifndef ALIHLTDATATYPES_H | |
4 | #define ALIHLTDATATYPES_H | |
32db4144 | 5 | /* This file is property of and copyright by the ALICE HLT Project * |
6 | * ALICE Experiment at CERN, All rights reserved. * | |
f23a6e1a | 7 | * See cxx source for full Copyright notice */ |
8 | ||
b22e91eb | 9 | /** @file AliHLTDataTypes.h |
32db4144 | 10 | @author Matthias Richter, Timm Steinbeck, Jochen Thaeder |
b22e91eb | 11 | @date |
12 | @brief Data type declaration for the HLT module. | |
13 | */ | |
14 | ||
2cbdb37e | 15 | ////////////////////////////////////////////////////////////////////////// |
16 | // | |
17 | // version no of HLT data types | |
18 | // | |
19 | ////////////////////////////////////////////////////////////////////////// | |
20 | ||
21 | /* Version Description | |
22 | * 1 first version until June 07; implicite, not tagged | |
23 | * 2 introduced June 07, enhanced/cleaned/arranged structure | |
eda89fe6 | 24 | * 3 2007-11-15 RAW DDL data type added; some inconsistencies fixed |
25 | * ('void' and 'any' origins); added signed HLT basic data types | |
69347e0d | 26 | * 2007-11-23 origin defines have become variables in conjunction |
c704e290 | 27 | * to be used with the operator| (AliHLTComponentDataType) |
28 | * 2007-11-24 added trigger structs and ESD tree data type | |
b543e186 | 29 | * 4 Component configuration and DCS update events added |
2efb85be | 30 | * gkAliHLTDDLListSize set from 29 to 30 according to new PubSub |
31 | * specs | |
c736de25 | 32 | * 5 Data types for Run and Event summary, and for monitoring added |
1ac82ce6 | 33 | * 6 Common data types for TreeD and TreeR defined |
703bcca6 | 34 | * kAliHLTAllDataTypes and kAliHLTDataOriginSample added |
d9dd3bc8 | 35 | * kAliHLTDataOriginEMCAL added |
45c0a780 | 36 | * kAliHLTDataTypeRunType added |
a0aeb701 | 37 | * 7 kAliHLTDataTypeComponentStatistics, kAliHLTDataTypeComponentTable, |
38 | * and AliHLTComponentStatistics have been added for optional | |
39 | * component block statistics | |
a3c9b745 | 40 | * 8 new wrapper interface has been introduced, old wrapper interface |
41 | * deprecated but kept for backward compatibility, the PubSub | |
42 | * interface is going to be compiled independently of AliHLT, new | |
43 | * interface provided by the libHLTinterface.so | |
44 | * AliHLTComponentEnvironment -> AliHLTAnalysisEnvironment | |
7398abba | 45 | * 9 added data types for arrays of AliHLTExternalTrackParam sets and |
46 | * TClonesArrays of AliExternalTrackParam objects. | |
fa5e8413 | 47 | * 10 Changes for information objects neededfor running with offline |
48 | * chains and analysis tasks. | |
49 | * kAliHLTMCObjectDataType added | |
50 | * kAliHLTDataOriginOffline added | |
51 | * kAliHLTDataOriginHLT added | |
2e3fd14f | 52 | * 11 extended AliHLTComponentStatistics: one more member to store the |
53 | * cycle time between events per component. | |
8761de93 | 54 | * 12 added common data type id 'CLUSTERS' |
55 | * added data type 'ECSPARAM' for the full ECS parameter string to | |
56 | * be sebt during SOR | |
2cbdb37e | 57 | */ |
8761de93 | 58 | #define ALIHLT_DATA_TYPES_VERSION 12 |
2cbdb37e | 59 | |
32db4144 | 60 | ////////////////////////////////////////////////////////////////////////// |
61 | // | |
69347e0d | 62 | // HLT data origin variables. |
63 | // | |
64 | // By converting from defines to variables, the origins can be used with | |
65 | // the operator| | |
66 | // | |
67 | // AliHLTComponentDataType dt; | |
fa5e8413 | 68 | // dt = kAliHLTDataTypeDDLRaw | kAliHLTDataOriginTPC; |
32db4144 | 69 | // |
70 | ////////////////////////////////////////////////////////////////////////// | |
71 | ||
1ac82ce6 | 72 | /** field size of datat type origin |
73 | * @ingroup alihlt_component_datatypes | |
74 | */ | |
32db4144 | 75 | const int kAliHLTComponentDataTypefOriginSize=4; |
76 | ||
77 | ||
1ac82ce6 | 78 | /** invalid data origin |
79 | * @ingroup alihlt_component_datatypes | |
80 | */ | |
3f850585 | 81 | # define kAliHLTDataOriginVoid "\0\0\0" |
82 | /** old invalid data origin, kept for backward compatibility */ | |
32db4144 | 83 | # define kAliHLTVoidDataOrigin "\0\0\0" |
84 | ||
1ac82ce6 | 85 | /** wildcard data type origin |
86 | * @ingroup alihlt_component_datatypes | |
87 | */ | |
3f850585 | 88 | # define kAliHLTDataOriginAny "***" |
89 | /** old wildcard data type origin, kept for backward compatibility */ | |
32db4144 | 90 | # define kAliHLTAnyDataOrigin "***" |
91 | ||
1ac82ce6 | 92 | /** Data origin HLT out |
93 | * @ingroup alihlt_component_datatypes | |
94 | */ | |
69347e0d | 95 | extern const char kAliHLTDataOriginOut[kAliHLTComponentDataTypefOriginSize]; |
32db4144 | 96 | |
fa5e8413 | 97 | /** Data origin HLT, used for HLT specifc data |
98 | * in offline chains. This not a bug! | |
99 | * @ingroup alihlt_component_datatypes | |
100 | */ | |
101 | extern const char kAliHLTDataOriginHLT[kAliHLTComponentDataTypefOriginSize]; | |
102 | ||
103 | /** Data origin Offline | |
104 | * @ingroup alihlt_component_datatypes | |
105 | */ | |
106 | extern const char kAliHLTDataOriginOffline[kAliHLTComponentDataTypefOriginSize]; | |
107 | ||
1ac82ce6 | 108 | /** Data origin HLT/PubSub private internal |
109 | * @ingroup alihlt_component_datatypes | |
110 | */ | |
69347e0d | 111 | extern const char kAliHLTDataOriginPrivate[kAliHLTComponentDataTypefOriginSize]; |
32db4144 | 112 | |
1ac82ce6 | 113 | /** Data origin TPC |
114 | * @ingroup alihlt_component_datatypes | |
115 | */ | |
69347e0d | 116 | extern const char kAliHLTDataOriginTPC[kAliHLTComponentDataTypefOriginSize]; |
32db4144 | 117 | |
1ac82ce6 | 118 | /** Data origin PHOS |
119 | * @ingroup alihlt_component_datatypes | |
120 | */ | |
69347e0d | 121 | extern const char kAliHLTDataOriginPHOS[kAliHLTComponentDataTypefOriginSize]; |
32db4144 | 122 | |
629266d1 | 123 | /** Data origin FMD |
124 | * @ingroup alihlt_component_datatypes | |
125 | */ | |
126 | extern const char kAliHLTDataOriginFMD[kAliHLTComponentDataTypefOriginSize]; | |
127 | ||
1ac82ce6 | 128 | /** Data origin MUON |
129 | * @ingroup alihlt_component_datatypes | |
130 | */ | |
69347e0d | 131 | extern const char kAliHLTDataOriginMUON[kAliHLTComponentDataTypefOriginSize]; |
32db4144 | 132 | |
1ac82ce6 | 133 | /** Data origin TRD |
134 | * @ingroup alihlt_component_datatypes | |
135 | */ | |
69347e0d | 136 | extern const char kAliHLTDataOriginTRD[kAliHLTComponentDataTypefOriginSize]; |
32db4144 | 137 | |
1ac82ce6 | 138 | /** Data origin ITS |
139 | * @ingroup alihlt_component_datatypes | |
140 | */ | |
69347e0d | 141 | extern const char kAliHLTDataOriginITS[kAliHLTComponentDataTypefOriginSize]; |
32db4144 | 142 | |
859fbc05 | 143 | /** Data origin ITS SPD |
144 | * @ingroup alihlt_component_datatypes | |
145 | */ | |
146 | extern const char kAliHLTDataOriginITSSPD[kAliHLTComponentDataTypefOriginSize]; | |
147 | ||
148 | /** Data origin ITS SDD | |
149 | * @ingroup alihlt_component_datatypes | |
150 | */ | |
151 | extern const char kAliHLTDataOriginITSSDD[kAliHLTComponentDataTypefOriginSize]; | |
152 | ||
153 | /** Data origin ITS SSD | |
154 | * @ingroup alihlt_component_datatypes | |
155 | */ | |
156 | extern const char kAliHLTDataOriginITSSSD[kAliHLTComponentDataTypefOriginSize]; | |
157 | ||
703bcca6 | 158 | /** Data origin for examples |
159 | * @ingroup alihlt_component_datatypes | |
160 | */ | |
161 | extern const char kAliHLTDataOriginSample[kAliHLTComponentDataTypefOriginSize]; | |
162 | ||
d9dd3bc8 | 163 | /** Data origin EMCAL |
164 | * @ingroup alihlt_component_datatypes | |
165 | */ | |
166 | extern const char kAliHLTDataOriginEMCAL[kAliHLTComponentDataTypefOriginSize]; | |
167 | ||
32db4144 | 168 | ////////////////////////////////////////////////////////////////////////// |
169 | // | |
170 | // HLT common data type defines | |
171 | // | |
172 | ////////////////////////////////////////////////////////////////////////// | |
173 | ||
1ac82ce6 | 174 | /** field size of data type id |
175 | * @ingroup alihlt_component_datatypes | |
176 | */ | |
32db4144 | 177 | const int kAliHLTComponentDataTypefIDsize=8; |
178 | ||
179 | ||
1ac82ce6 | 180 | /** invalid data type id |
181 | * @ingroup alihlt_component_datatypes | |
182 | */ | |
32db4144 | 183 | # define kAliHLTVoidDataTypeID "\0\0\0\0\0\0\0" |
184 | ||
3dd8541e | 185 | /** special id for all data types: any + void |
186 | * @ingroup alihlt_component_datatypes | |
187 | */ | |
188 | # define kAliHLTAllDataTypesID "ALLDATA" | |
189 | ||
190 | /** special id for any valid data type id | |
1ac82ce6 | 191 | * @ingroup alihlt_component_datatypes |
192 | */ | |
32db4144 | 193 | # define kAliHLTAnyDataTypeID "*******" |
194 | ||
1ac82ce6 | 195 | /** DDL RAW data |
196 | * @ingroup alihlt_component_datatypes | |
197 | */ | |
3f850585 | 198 | # define kAliHLTDDLRawDataTypeID {'D','D','L','_','R','A','W',' '} |
199 | ||
8761de93 | 200 | /** CLUSTERS data |
201 | * Common data type for the output of cluster finders, the exact | |
202 | * format depends on the origin (detector) | |
203 | * @ingroup alihlt_component_datatypes | |
204 | */ | |
205 | # define kAliHLTClustersDataTypeID {'C','L','U','S','T','E','R','S'} | |
206 | ||
1ac82ce6 | 207 | /** calibration data for file exchange subscriber |
208 | * @ingroup alihlt_component_datatypes | |
209 | */ | |
32db4144 | 210 | # define kAliHLTFXSCalibDataTypeID {'F','X','S','_','C','A','L',' '} |
211 | ||
212 | /** start of run (SOR) event | |
2cbdb37e | 213 | * @ref AliHLTRunDesc |
1ac82ce6 | 214 | * @ingroup alihlt_component_datatypes |
32db4144 | 215 | */ |
216 | # define kAliHLTSORDataTypeID {'S','T','A','R','T','O','F','R'} | |
217 | ||
218 | /** end of run (EOR) event | |
2cbdb37e | 219 | * @ref AliHLTRunDesc |
1ac82ce6 | 220 | * @ingroup alihlt_component_datatypes |
32db4144 | 221 | */ |
222 | # define kAliHLTEORDataTypeID {'E','N','D','O','F','R','U','N'} | |
223 | ||
45c0a780 | 224 | /** run type data block |
225 | * string with run type as payload | |
226 | * @ingroup alihlt_component_datatypes | |
227 | */ | |
228 | # define kAliHLTRunTypeDataTypeID {'R','U','N','T','Y','P','E',' '} | |
229 | ||
32db4144 | 230 | /** DDL list event |
231 | * @ref AliHLTEventDDL | |
1ac82ce6 | 232 | * @ingroup alihlt_component_datatypes |
32db4144 | 233 | */ |
234 | # define kAliHLTDDLDataTypeID {'D','D','L','L','I','S','T',' '} | |
235 | ||
9d9ffd37 | 236 | /** EventType event |
237 | * - empty payload, specification gives eventType | |
1ac82ce6 | 238 | * @ingroup alihlt_component_datatypes |
9d9ffd37 | 239 | */ |
240 | # define kAliHLTEventDataTypeID {'E','V','E','N','T','T','Y','P'} | |
241 | ||
8761de93 | 242 | /** ECS parameter event |
243 | * - sent during the SOR event by the framework | |
244 | * - contains the full ECS parameter string | |
245 | * @ingroup alihlt_component_datatypes | |
246 | */ | |
247 | # define kAliHLTECSParamDataTypeID {'E','C','S','P','A','R','A','M'} | |
248 | ||
853121af | 249 | /** ComponentConfiguration event |
b543e186 | 250 | * - payload contains the CDB path as string |
1ac82ce6 | 251 | * @ingroup alihlt_component_datatypes |
853121af | 252 | */ |
253 | # define kAliHLTComConfDataTypeID {'C','O','M','_','C','O','N','F'} | |
254 | ||
b543e186 | 255 | /** DCS value update event |
256 | * - payload contains string of relevant detectors | |
1ac82ce6 | 257 | * @ingroup alihlt_component_datatypes |
b543e186 | 258 | */ |
259 | # define kAliHLTUpdtDCSDataTypeID {'U','P','D','T','_','D','C','S'} | |
260 | ||
fa5e8413 | 261 | /** MC data block |
262 | * an AliMCEvent object of varying origin | |
263 | * The 'V0' at the end allows a versioning | |
264 | * @ingroup alihlt_component_datatypes | |
265 | */ | |
266 | # define kAliHLTMCObjectDataTypeID {'A','L','I','M','C','_','V','0'} | |
267 | ||
c704e290 | 268 | /** ESD data block |
269 | * an AliESD object of varying origin | |
853121af | 270 | * The 'V0' at the end allows a versioning |
1ac82ce6 | 271 | * @ingroup alihlt_component_datatypes |
c704e290 | 272 | */ |
a978c0d5 | 273 | # define kAliHLTESDObjectDataTypeID {'A','L','I','E','S','D','V','0'} |
c704e290 | 274 | |
a978c0d5 | 275 | /** ESD tree data block |
276 | * TTree with an AliESD object of varying origin | |
1ac82ce6 | 277 | * @ingroup alihlt_component_datatypes |
a978c0d5 | 278 | */ |
279 | # define kAliHLTESDTreeDataTypeID {'E','S','D','_','T','R','E','E'} | |
64defa03 | 280 | |
1ac82ce6 | 281 | /** AliRoot TreeD |
282 | * - the digits tree of an AliRoot module | |
283 | * @ingroup alihlt_component_datatypes | |
284 | */ | |
285 | #define kAliHLTTreeDDataTypeID {'A','L','I','T','R','E','E','D'} | |
286 | ||
287 | /** AliRoot TreeR | |
288 | * - the rec points tree of an AliRoot module | |
289 | * @ingroup alihlt_component_datatypes | |
290 | */ | |
ad2fa36b | 291 | #define kAliHLTTreeRDataTypeID {'A','L','I','T','R','E','E','R'} |
1ac82ce6 | 292 | |
64defa03 | 293 | /** HW Address selection data block |
294 | * - a selection list for 16 bit HW addresses | |
295 | * - varying origin | |
1ac82ce6 | 296 | * @ingroup alihlt_component_datatypes |
64defa03 | 297 | */ |
298 | # define kAliHLTHwAddr16DataTypeID {'H','W','A','D','D','R','1','6'} | |
299 | ||
2ff24e4c | 300 | /** Event Statistics |
301 | * - event statistics for given detectors | |
302 | * - varying origin | |
1ac82ce6 | 303 | * @ingroup alihlt_component_datatypes |
2ff24e4c | 304 | */ |
305 | # define kAliHLTEventStatisticsDataTypeID {'E','V','_','S','T','A','T','I'} | |
306 | ||
307 | /** Event Summary | |
308 | * - event summary | |
309 | * - origin : kAliHLTDataOriginOut ( HLT ) | |
1ac82ce6 | 310 | * @ingroup alihlt_component_datatypes |
2ff24e4c | 311 | */ |
312 | # define kAliHLTEventSummaryDataTypeID {'E','V','_','S','U','M','M','A'} | |
313 | ||
314 | /** Run Statistics | |
315 | * - run statistics for given detectors | |
316 | * - varying origin | |
1ac82ce6 | 317 | * @ingroup alihlt_component_datatypes |
2ff24e4c | 318 | */ |
319 | # define kAliHLTRunStatisticsDataTypeID {'R','U','N','S','T','A','T','I'} | |
320 | ||
321 | /** Run Summary | |
322 | * - run summary | |
323 | * - origin : kAliHLTDataOriginOut ( HLT ) | |
1ac82ce6 | 324 | * @ingroup alihlt_component_datatypes |
2ff24e4c | 325 | */ |
326 | # define kAliHLTRunSummaryDataTypeID {'R','U','N','S','U','M','M','A'} | |
327 | ||
a0aeb701 | 328 | /** Block Statistics |
329 | * - small block statistics info added to the data stream by | |
330 | * the component base class | |
331 | * - origin kAliHLTDataOriginPrivate | |
332 | * @ingroup alihlt_component_datatypes | |
333 | */ | |
334 | # define kAliHLTComponentStatisticsDataTypeID {'C','O','M','P','S','T','A','T'} | |
335 | ||
336 | /** Component table | |
337 | * - list of components in the chain to be percolated through the chain | |
338 | * - each component adds it's chain id string and a generated 32bit id | |
339 | * @ingroup alihlt_component_datatypes | |
340 | */ | |
341 | # define kAliHLTComponentTableDataTypeID {'C','O','M','P','T','A','B','L'} | |
342 | ||
c736de25 | 343 | /** general ROOT TObject |
344 | * - a general TObject exported from the HLT analysis | |
345 | * - varying origin | |
1ac82ce6 | 346 | * @ingroup alihlt_component_datatypes |
c736de25 | 347 | */ |
348 | #define kAliHLTTObjectDataTypeID {'R','O','O','T','T','O','B','J'} | |
349 | ||
350 | /** ROOT TObjArray | |
351 | * - a TObjArray exported from the HLT analysis | |
352 | * - varying origin | |
1ac82ce6 | 353 | * @ingroup alihlt_component_datatypes |
c736de25 | 354 | */ |
355 | #define kAliHLTTObjArrayDataTypeID {'R','O','O','T','O','B','A','R'} | |
356 | ||
357 | /** ROOT TTree | |
358 | * - a TTree object exported from the HLT analysis | |
359 | * - varying origin | |
1ac82ce6 | 360 | * @ingroup alihlt_component_datatypes |
c736de25 | 361 | */ |
362 | #define kAliHLTTTreeDataTypeID {'R','O','O','T','T','R','E','E'} | |
363 | ||
364 | /** ROOT histogram | |
365 | * - a histogram object exported from the HLT analysis | |
366 | * - class derives from TH1 (directly or indirectly) and inherits all common functionality | |
367 | * - varying origin | |
1ac82ce6 | 368 | * @ingroup alihlt_component_datatypes |
c736de25 | 369 | */ |
370 | #define kAliHLTHistogramDataTypeID {'R','O','O','T','H','I','S','T'} | |
371 | ||
372 | /** ROOT TNtuple | |
373 | * - a TNtupl object exported from the HLT analysis | |
374 | * - varying origin | |
1ac82ce6 | 375 | * @ingroup alihlt_component_datatypes |
c736de25 | 376 | */ |
377 | #define kAliHLTTNtupleDataTypeID {'R','O','O','T','T','U','P','L'} | |
378 | ||
7398abba | 379 | /** HLT Track |
380 | * - Struct for Tracks based on AliExternalTrackParam | |
381 | * - varying origin | |
382 | * @ingroup alihlt_component_datatypes | |
383 | */ | |
384 | #define kAliHLTTrackDataTypeID {'H','L','T','T','R','A','C','K'} | |
385 | ||
386 | /** TClonesArray of AliExternalTrackParam | |
387 | * @ingroup alihlt_component_datatypes | |
388 | */ | |
389 | #define kAliHLTExternalTrackParamDataTypeID {'T','C','A','E','X','T','T','R'} | |
390 | ||
5341a1bf | 391 | /** HLT Jet |
392 | * - Struct for jets based on AliHLTJETJets | |
393 | * - varying origin | |
394 | * @ingroup alihlt_component_datatypes | |
395 | */ | |
396 | #define kAliHLTJetDataTypeID {'H','L','T','J','E','T','V','0'} | |
397 | ||
1843b457 | 398 | using namespace std; |
f23a6e1a | 399 | |
400 | extern "C" { | |
32db4144 | 401 | ////////////////////////////////////////////////////////////////////////// |
402 | // | |
403 | // Basic HLT data types | |
404 | // | |
405 | ////////////////////////////////////////////////////////////////////////// | |
f23a6e1a | 406 | |
407 | typedef unsigned char AliHLTUInt8_t; | |
408 | ||
eda89fe6 | 409 | typedef signed char AliHLTInt8_t; |
410 | ||
71d7c760 | 411 | typedef unsigned short AliHLTUInt16_t; |
412 | ||
eda89fe6 | 413 | typedef signed short AliHLTInt16_t; |
414 | ||
f23a6e1a | 415 | typedef unsigned int AliHLTUInt32_t; |
416 | ||
eda89fe6 | 417 | typedef signed int AliHLTInt32_t; |
418 | ||
f23a6e1a | 419 | typedef unsigned long long AliHLTUInt64_t; |
420 | ||
eda89fe6 | 421 | typedef signed long long AliHLTInt64_t; |
422 | ||
423 | typedef float AliHLTFloat32_t; | |
424 | ||
425 | typedef double AliHLTFloat64_t; | |
426 | ||
f23a6e1a | 427 | typedef AliHLTUInt64_t AliHLTEventID_t; |
428 | ||
32db4144 | 429 | ////////////////////////////////////////////////////////////////////////// |
430 | // | |
431 | // HLT logging levels | |
432 | // | |
433 | ////////////////////////////////////////////////////////////////////////// | |
f23a6e1a | 434 | |
2efb85be | 435 | /** |
436 | * Logging severities of the HLT | |
437 | */ | |
438 | enum AliHLTComponentLogSeverity { | |
439 | /** no logging */ | |
32db4144 | 440 | kHLTLogNone = 0, |
2efb85be | 441 | /** benchmark messages */ |
32db4144 | 442 | kHLTLogBenchmark = 0x1, |
2efb85be | 443 | /** debug messages */ |
32db4144 | 444 | kHLTLogDebug = 0x2, |
2efb85be | 445 | /** info messages */ |
32db4144 | 446 | kHLTLogInfo = 0x4, |
2efb85be | 447 | /** warning messages */ |
32db4144 | 448 | kHLTLogWarning = 0x8, |
2efb85be | 449 | /** error messages */ |
32db4144 | 450 | kHLTLogError = 0x10, |
b2065764 | 451 | /** fatal error messages */ |
32db4144 | 452 | kHLTLogFatal = 0x20, |
b2065764 | 453 | /** few important messages not to be filtered out. |
454 | * redirected to kHLTLogInfo in AliRoot | |
455 | */ | |
456 | kHLTLogImportant = 0x40, | |
2efb85be | 457 | /** special value to enable all messages */ |
b2065764 | 458 | kHLTLogAll = 0x7f, |
2efb85be | 459 | /** the default logging filter */ |
7233bc62 | 460 | kHLTLogDefault = 0x79 |
a3c9b745 | 461 | }; |
32db4144 | 462 | |
463 | ////////////////////////////////////////////////////////////////////////// | |
464 | // | |
465 | // HLT data structures for data exchange and external interface | |
466 | // | |
467 | ////////////////////////////////////////////////////////////////////////// | |
468 | ||
469 | /** | |
470 | * @struct AliHLTComponentEventData | |
471 | * Event descriptor | |
472 | */ | |
8ede8717 | 473 | struct AliHLTComponentEventData |
f23a6e1a | 474 | { |
b4c0ba41 | 475 | AliHLTUInt32_t fStructSize; /// Size of this structure in bytes. |
476 | AliHLTEventID_t fEventID; /// 64 bit event ID number. | |
477 | AliHLTUInt32_t fEventCreation_s; /// Event creation time in seconds (Should be added to fEventCreation_us*1e6). | |
478 | AliHLTUInt32_t fEventCreation_us; /// Fractional event creation time in micro seconds. | |
479 | AliHLTUInt32_t fBlockCnt; /// The number of raw data blocks received by the component. | |
f23a6e1a | 480 | }; |
481 | ||
32db4144 | 482 | /** |
483 | * @struct AliHLTComponentShmData | |
484 | * Shared memory descriptor. | |
485 | * Irrelevant for analysis components. | |
486 | */ | |
8ede8717 | 487 | struct AliHLTComponentShmData |
f23a6e1a | 488 | { |
b4c0ba41 | 489 | AliHLTUInt32_t fStructSize; /// Size of this structure in bytes. |
490 | AliHLTUInt32_t fShmType; /// The type code of the shared memory. | |
491 | AliHLTUInt64_t fShmID; /// The shared memory identifier. | |
f23a6e1a | 492 | }; |
71d7c760 | 493 | |
1ac82ce6 | 494 | /** |
495 | * @defgroup alihlt_component_datatypes Common Component Data Types | |
496 | * The analysis framework defines a number of common data types for | |
497 | * usage in the detector modules, like e.g. ::kAliHLTAnyDataType | |
498 | * and ::kAliHLTDataTypeDDLRaw. Those data types always have | |
499 | * origin ::kAliHLTDataOriginAny. The correct detector origin can be | |
500 | * set by using operator '|' | |
501 | * <pre> | |
502 | * AliHLTComponentDataType dt=kAliHLTDDLRawDataTypeID|kAliHLTDataOriginTPC | |
503 | * </pre> | |
504 | * @ingroup alihlt_component | |
505 | */ | |
506 | ||
32db4144 | 507 | /** |
508 | * @struct AliHLTComponentDataType | |
559631d5 | 509 | * Data type descriptor for data blocks transferred through the processing |
32db4144 | 510 | * chain. |
1ac82ce6 | 511 | * @ingroup alihlt_component_datatypes |
32db4144 | 512 | */ |
8ede8717 | 513 | struct AliHLTComponentDataType |
f23a6e1a | 514 | { |
b4c0ba41 | 515 | AliHLTUInt32_t fStructSize; /// Size of this structure in bytes. |
516 | char fID[kAliHLTComponentDataTypefIDsize]; /// Data type identifier. | |
517 | char fOrigin[kAliHLTComponentDataTypefOriginSize]; /// Subsystem or detector origin of the data. | |
f23a6e1a | 518 | }; |
2d7ff710 | 519 | |
32db4144 | 520 | /** |
521 | * @struct AliHLTComponentBlockData | |
3294f81a | 522 | * This is the decription of data blocks exchanged between components. |
523 | * \b IMPORTANT: The validity of fPtr and fOffset is different for input and | |
524 | * output blocks: | |
525 | * - input blocks: The \em fPtr member always points to the beginning of the data | |
526 | * of size \em fSize. fOffset is ignored and should be in most | |
527 | * case 0. | |
528 | * - output blocks: The \em fPtr member is ignored by the framework. \em fOffset | |
529 | * must specify the start of the data relative to the output | |
530 | * buffer. The data block has size \em fSize. | |
32db4144 | 531 | */ |
8ede8717 | 532 | struct AliHLTComponentBlockData |
f23a6e1a | 533 | { |
b4c0ba41 | 534 | /** size and version of the struct */ |
f23a6e1a | 535 | AliHLTUInt32_t fStructSize; |
b4c0ba41 | 536 | /** shared memory key, ignored by processing components */ |
8ede8717 | 537 | AliHLTComponentShmData fShmKey; |
b4c0ba41 | 538 | /** offset of output data relative to the output buffer */ |
f23a6e1a | 539 | AliHLTUInt32_t fOffset; |
b4c0ba41 | 540 | /** start of the data for input data blocks, fOffset to be ignored*/ |
f23a6e1a | 541 | void* fPtr; |
b4c0ba41 | 542 | /** size of the data block */ |
f23a6e1a | 543 | AliHLTUInt32_t fSize; |
b4c0ba41 | 544 | /** data type of the data block */ |
8ede8717 | 545 | AliHLTComponentDataType fDataType; |
b4c0ba41 | 546 | /** data specification of the data block */ |
f23a6e1a | 547 | AliHLTUInt32_t fSpecification; |
548 | }; | |
549 | ||
32db4144 | 550 | /** |
551 | * @struct AliHLTComponentEventDoneData | |
552 | * | |
553 | */ | |
8ede8717 | 554 | struct AliHLTComponentEventDoneData |
f23a6e1a | 555 | { |
b4c0ba41 | 556 | AliHLTUInt32_t fStructSize; /// Size of this structure in bytes. |
557 | AliHLTUInt32_t fDataSize; /// Size of the data section (following this data member) in bytes. | |
558 | void* fData; /// Start of the data section. | |
f23a6e1a | 559 | }; |
560 | ||
32db4144 | 561 | /** |
2cbdb37e | 562 | * @struct AliHLTRunDesc |
32db4144 | 563 | * Event descriptor. |
45c0a780 | 564 | * The struct is sent with the SOR and EOR events. |
565 | * | |
566 | * @note | |
a3c9b745 | 567 | * The name of the member fRunType is a bit misleading. This is not |
568 | * the ALICE Run Type given by the ECS to the sub-system. The member | |
569 | * is an internal HLT run type and a combination of the HLT running | |
570 | * mode and the beam type. | |
571 | * <pre> | |
572 | * Bit 0-2: beam type identifier | |
573 | * Bit 3-31: HLT mode | |
574 | * </pre> | |
32db4144 | 575 | */ |
2cbdb37e | 576 | struct AliHLTRunDesc |
32db4144 | 577 | { |
b4c0ba41 | 578 | AliHLTUInt32_t fStructSize; /// Size of this structure in bytes. |
579 | AliHLTUInt32_t fRunNo; /// The run number for the current active run. | |
580 | AliHLTUInt32_t fRunType; /// The HLT run type. | |
32db4144 | 581 | }; |
582 | ||
a0aeb701 | 583 | /** |
584 | * @struct AliHLTComponentStatistics | |
585 | * Small block size summary added by the AliHLTComponent base class | |
586 | * if component statistics are enabled (--enable-compstat). | |
587 | * | |
588 | * fLevel is retrieved from incoming block statistics and incremented. | |
589 | * Incoming block statistics are appended to the newly added one if | |
590 | * --enable-compstat=full has been chosen. | |
2e3fd14f | 591 | * |
592 | * ChangeLog: | |
593 | * 2009-01-14 fComponentCycleTime added | |
a0aeb701 | 594 | */ |
595 | struct AliHLTComponentStatistics | |
596 | { | |
b4c0ba41 | 597 | AliHLTUInt32_t fStructSize; /// Size of this structure in bytes. |
598 | AliHLTUInt32_t fLevel; /// Indicates from which processing stage this information is from. | |
599 | AliHLTUInt32_t fId; /// Unique identifier for the chain based on CRC code. | |
600 | AliHLTUInt32_t fTime; /// Real wall time used to process the data (micro seconds). | |
601 | AliHLTUInt32_t fCTime; /// CPU time used to process the data (micro seconds). | |
602 | AliHLTUInt32_t fInputBlockCount; /// Number of input data blocks. | |
603 | AliHLTUInt32_t fTotalInputSize; /// Total size in bytes of input data. | |
604 | AliHLTUInt32_t fOutputBlockCount; /// Number of output data blocks. | |
605 | AliHLTUInt32_t fTotalOutputSize; /// Total size in bytes of output data. | |
606 | AliHLTUInt32_t fComponentCycleTime; /// Real wall time indicating the start of the data processing (micro seconds). | |
a0aeb701 | 607 | }; |
608 | ||
609 | /** | |
610 | * @struct AliHLTComponentTableEntry | |
611 | * Structure to be send on SOR event through the chain. Each component | |
612 | * adds its chain id and component arguments to the list. | |
613 | * The 'length' of the structure is variable and depends on the length | |
614 | * of the strings in the buffer at the end. | |
abb52c8f | 615 | * |
616 | * ComponentTableEntries are identified by a 32bit Id generated by a CRC | |
617 | * algorithm from the chain Id of the component. This is not a 100% unique | |
618 | * id but with a high probability. This approach accounts for the fact | |
619 | * that all components are separated processes. | |
a0aeb701 | 620 | */ |
621 | struct AliHLTComponentTableEntry | |
622 | { | |
b4c0ba41 | 623 | /** Size of this structure in bytes. */ |
a0aeb701 | 624 | AliHLTUInt32_t fStructSize; |
abb52c8f | 625 | /** size of the array of parent ids */ |
626 | AliHLTUInt16_t fNofParents; | |
627 | /** size of the description string in the appended buffer */ | |
628 | AliHLTUInt8_t fSizeDescription; | |
a0aeb701 | 629 | /** the strings: chain id, component args, reserved */ |
630 | AliHLTUInt8_t fBuffer[1]; | |
631 | }; | |
632 | ||
8f81abf4 | 633 | ////////////////////////////////////////////////////////////////////////// |
634 | // | |
635 | // Trigger meta information | |
636 | // | |
637 | ////////////////////////////////////////////////////////////////////////// | |
638 | ||
639 | /** field size of fAttribute */ | |
2ff24e4c | 640 | const int gkAliHLTBlockDAttributeCount = 8; |
8f81abf4 | 641 | |
642 | /** field size of fCommonHeader */ | |
a3c9b745 | 643 | const int gkAliHLTCommonHeaderCount = 8; |
8f81abf4 | 644 | |
32db4144 | 645 | /** size of the DDL list */ |
2ff24e4c | 646 | const int gkAliHLTDDLListSize = 30; |
647 | ||
648 | /** Number of Trigger Classes of CTP in CDH */ | |
649 | const int gkNCTPTriggerClasses = 50; | |
32db4144 | 650 | |
651 | /** | |
652 | * @struct AliHLTEventDDL | |
653 | * DDL list event. | |
654 | * The struct is send with the DDLLIST event. | |
8f81abf4 | 655 | * Used in the trigger structure for internal apperance of |
656 | * the DLLs as well as for the HLT readout list send to DAQ | |
511b2509 | 657 | * ( as DataType : kAliHLTDataTypeDDL ) |
32db4144 | 658 | */ |
659 | struct AliHLTEventDDL | |
660 | { | |
b4c0ba41 | 661 | AliHLTUInt32_t fCount; /// Indicates the number of words in fList. |
662 | AliHLTUInt32_t fList[gkAliHLTDDLListSize]; /// The list of DDL enable/disable bits. | |
32db4144 | 663 | }; |
664 | ||
8f81abf4 | 665 | /** |
666 | * @struct AliHLTEventTriggerData | |
8f81abf4 | 667 | */ |
668 | struct AliHLTEventTriggerData | |
669 | { | |
b4c0ba41 | 670 | AliHLTUInt8_t fAttributes[gkAliHLTBlockDAttributeCount]; /// List of data block attibutes. |
671 | AliHLTUInt64_t fHLTStatus; /// Bit field | |
672 | AliHLTUInt32_t fCommonHeaderWordCnt; /// Number of words in fCommonHeader. | |
673 | AliHLTUInt32_t fCommonHeader[gkAliHLTCommonHeaderCount]; /// The common header words. | |
674 | AliHLTEventDDL fReadoutList; /// The readout list structure. | |
8f81abf4 | 675 | }; |
676 | ||
677 | /** | |
678 | * @struct AliHLTComponentTriggerData | |
679 | * Trigger data | |
680 | */ | |
681 | struct AliHLTComponentTriggerData | |
682 | { | |
b4c0ba41 | 683 | AliHLTUInt32_t fStructSize; /// Size of this structure in bytes. |
684 | AliHLTUInt32_t fDataSize; /// Size of the data section (following this data member) in bytes. | |
685 | void* fData; /// Start of the data section. | |
8f81abf4 | 686 | }; |
687 | ||
9d9ffd37 | 688 | ////////////////////////////////////////////////////////////////////////// |
689 | // | |
690 | // HLT Event Type Specification | |
691 | // | |
692 | ////////////////////////////////////////////////////////////////////////// | |
693 | ||
694 | /** Unknown eventType specification */ | |
2ff24e4c | 695 | const AliHLTUInt32_t gkAliEventTypeUnknown = ~(AliHLTUInt32_t)0; |
9d9ffd37 | 696 | /** SOR eventType specification */ |
2ff24e4c | 697 | const AliHLTUInt32_t gkAliEventTypeStartOfRun=1; |
9d9ffd37 | 698 | /** Data eventType specification */ |
2ff24e4c | 699 | const AliHLTUInt32_t gkAliEventTypeData=2; |
9d9ffd37 | 700 | /** EOR eventType specification */ |
2ff24e4c | 701 | const AliHLTUInt32_t gkAliEventTypeEndOfRun=4; |
9d9ffd37 | 702 | /** Corrupt eventType specification */ |
2ff24e4c | 703 | const AliHLTUInt32_t gkAliEventTypeCorruptID=8; |
9d9ffd37 | 704 | /** Calibration eventType specification */ |
2ff24e4c | 705 | const AliHLTUInt32_t gkAliEventTypeCalibration=16; |
9d9ffd37 | 706 | /** DataReplay eventType specification */ |
2ff24e4c | 707 | const AliHLTUInt32_t gkAliEventTypeDataReplay=32; |
b543e186 | 708 | /** Configuration eventType specification */ |
2ff24e4c | 709 | const AliHLTUInt32_t gkAliEventTypeConfiguration=34; |
d6b69874 | 710 | /** Update DCS eventType specification */ |
2ff24e4c | 711 | const AliHLTUInt32_t gkAliEventTypeReadPreprocessor=35; |
9d9ffd37 | 712 | /** Tick eventType specification */ |
2ff24e4c | 713 | const AliHLTUInt32_t gkAliEventTypeTick=64; |
9d9ffd37 | 714 | /** Max eventType specification */ |
2ff24e4c | 715 | const AliHLTUInt32_t gkAliEventTypeMax=64; |
9d9ffd37 | 716 | |
32db4144 | 717 | ////////////////////////////////////////////////////////////////////////// |
718 | // | |
719 | // HLT defines and defaults | |
720 | // | |
721 | ////////////////////////////////////////////////////////////////////////// | |
722 | ||
1ac82ce6 | 723 | /** invalid event id |
724 | * @ingroup alihlt_component_datatypes | |
725 | */ | |
32db4144 | 726 | const AliHLTEventID_t kAliHLTVoidEventID=~(AliHLTEventID_t)0; |
727 | ||
1ac82ce6 | 728 | /** invalid data specification |
729 | * @ingroup alihlt_component_datatypes | |
730 | */ | |
32db4144 | 731 | const AliHLTUInt32_t kAliHLTVoidDataSpec = ~(AliHLTUInt32_t)0; |
732 | ||
45c0a780 | 733 | /** invalid run no |
734 | * @ingroup alihlt_component_datatypes | |
735 | */ | |
736 | const AliHLTUInt32_t kAliHLTVoidRunNo = ~(AliHLTUInt32_t)0; | |
737 | ||
738 | /** invalid run type | |
739 | * @ingroup alihlt_component_datatypes | |
740 | */ | |
741 | const AliHLTUInt32_t kAliHLTVoidRunType = ~(AliHLTUInt32_t)0; | |
742 | ||
743 | /** invalid run descriptor | |
744 | * @ingroup alihlt_component_datatypes | |
745 | */ | |
746 | const AliHLTRunDesc kAliHLTVoidRunDesc={sizeof(AliHLTRunDesc), kAliHLTVoidRunNo, kAliHLTVoidRunType}; | |
747 | ||
32db4144 | 748 | /** invalid shared memory type */ |
749 | const AliHLTUInt32_t gkAliHLTComponentInvalidShmType = 0; | |
750 | ||
751 | /** invalid shared memory id */ | |
752 | const AliHLTUInt64_t gkAliHLTComponentInvalidShmID = ~(AliHLTUInt64_t)0; | |
753 | ||
1ac82ce6 | 754 | /** invalid data type |
755 | * @ingroup alihlt_component_datatypes | |
756 | */ | |
32db4144 | 757 | const AliHLTComponentDataType kAliHLTVoidDataType = { |
758 | sizeof(AliHLTComponentDataType), | |
759 | kAliHLTVoidDataTypeID, | |
3f850585 | 760 | kAliHLTDataOriginVoid |
32db4144 | 761 | }; |
762 | ||
3dd8541e | 763 | /** all data types, means any + void data type |
764 | * @ingroup alihlt_component_datatypes | |
765 | */ | |
766 | const AliHLTComponentDataType kAliHLTAllDataTypes = { | |
767 | sizeof(AliHLTComponentDataType), | |
768 | kAliHLTAllDataTypesID, | |
769 | kAliHLTDataOriginAny | |
770 | }; | |
771 | ||
32db4144 | 772 | // there is currently a problem with rootcint if the predefined ids |
773 | // (commented below) are used. rootcint does not find the id if they | |
774 | // are char arrays defined with {} and individual chars. If strings | |
775 | // are used it works fine | |
1ac82ce6 | 776 | /** any data type |
777 | * @ingroup alihlt_component_datatypes | |
778 | */ | |
32db4144 | 779 | const AliHLTComponentDataType kAliHLTAnyDataType = { |
780 | sizeof(AliHLTComponentDataType), | |
781 | kAliHLTAnyDataTypeID, | |
3f850585 | 782 | kAliHLTDataOriginAny |
32db4144 | 783 | }; |
784 | ||
1ac82ce6 | 785 | /** multiple output data types |
786 | * @ingroup alihlt_component_datatypes | |
787 | */ | |
de6593d0 | 788 | extern const AliHLTComponentDataType kAliHLTMultipleDataType; |
789 | ||
1ac82ce6 | 790 | /** data to file exchange subscriber |
791 | * @ingroup alihlt_component_datatypes | |
792 | */ | |
32db4144 | 793 | extern const AliHLTComponentDataType kAliHLTDataTypeFXSCalib; |
794 | ||
1ac82ce6 | 795 | /** DDL list data type |
796 | * @ingroup alihlt_component_datatypes | |
797 | */ | |
32db4144 | 798 | extern const AliHLTComponentDataType kAliHLTDataTypeDDL; |
799 | ||
8761de93 | 800 | /** CLUSTERS data |
801 | * Common data type for the output of cluster finders, the exact | |
802 | * format depends on the origin (detector) | |
803 | * @ingroup alihlt_component_datatypes | |
804 | */ | |
805 | extern const AliHLTComponentDataType kAliHLTDataTypeClusters; | |
806 | ||
1ac82ce6 | 807 | /** SOR data type |
808 | * @ingroup alihlt_component_datatypes | |
809 | */ | |
32db4144 | 810 | extern const AliHLTComponentDataType kAliHLTDataTypeSOR; |
811 | ||
1ac82ce6 | 812 | /** EOR data type |
813 | * @ingroup alihlt_component_datatypes | |
814 | */ | |
32db4144 | 815 | extern const AliHLTComponentDataType kAliHLTDataTypeEOR; |
5ec8e281 | 816 | |
45c0a780 | 817 | /** Run type data block |
818 | * @ingroup alihlt_component_datatypes | |
819 | */ | |
820 | extern const AliHLTComponentDataType kAliHLTDataTypeRunType; | |
821 | ||
1ac82ce6 | 822 | /** Event type specification |
823 | * @ingroup alihlt_component_datatypes | |
824 | */ | |
77405890 | 825 | extern const AliHLTComponentDataType kAliHLTDataTypeEvent; |
826 | ||
8761de93 | 827 | /** ECS parameter event |
828 | * - sent during the SOR event by the framework | |
829 | * - contains the full ECS parameter string | |
830 | * @ingroup alihlt_component_datatypes | |
831 | */ | |
832 | extern const AliHLTComponentDataType kAliHLTDataTypeECSParam; // {ECSPARAM:PRIV} | |
833 | ||
1ac82ce6 | 834 | /** Configuration event data type |
835 | * @ingroup alihlt_component_datatypes | |
836 | */ | |
853121af | 837 | extern const AliHLTComponentDataType kAliHLTDataTypeComConf; |
838 | ||
1ac82ce6 | 839 | /** DCS value update event |
840 | * @ingroup alihlt_component_datatypes | |
841 | */ | |
b543e186 | 842 | extern const AliHLTComponentDataType kAliHLTDataTypeUpdtDCS; |
843 | ||
1ac82ce6 | 844 | /** RAW DDL data specification, origin is 'any', data publisher origin correctly |
845 | * @ingroup alihlt_component_datatypes | |
846 | */ | |
3f850585 | 847 | extern const AliHLTComponentDataType kAliHLTDataTypeDDLRaw; |
848 | ||
fa5e8413 | 849 | /** AliMCEvent object data specification, origin is 'OFFL' |
850 | * @ingroup alihlt_component_datatypes | |
851 | */ | |
852 | extern const AliHLTComponentDataType kAliHLTDataTypeMCObject; | |
853 | ||
1ac82ce6 | 854 | /** ESD object data specification, origin is 'any' |
855 | * @ingroup alihlt_component_datatypes | |
856 | */ | |
a978c0d5 | 857 | extern const AliHLTComponentDataType kAliHLTDataTypeESDObject; |
858 | ||
1ac82ce6 | 859 | /** ESD Tree data specification, origin is 'any' |
fa5e8413 | 860 | * @ingroup alihlt_component_datatypes |
861 | */ | |
c704e290 | 862 | extern const AliHLTComponentDataType kAliHLTDataTypeESDTree; |
863 | ||
1ac82ce6 | 864 | /** AliRoot TreeD data specification, origin is 'any' |
865 | * @ingroup alihlt_component_datatypes | |
866 | */ | |
867 | extern const AliHLTComponentDataType kAliHLTDataTypeAliTreeD; | |
868 | ||
869 | /** AliRoot TreeR data specification, origin is 'any' | |
870 | * @ingroup alihlt_component_datatypes | |
871 | */ | |
872 | extern const AliHLTComponentDataType kAliHLTDataTypeAliTreeR; | |
873 | ||
874 | /** 16 bit Hardware address selection data specification, origin is 'any' | |
875 | * @ingroup alihlt_component_datatypes | |
876 | */ | |
64defa03 | 877 | extern const AliHLTComponentDataType kAliHLTDataTypeHwAddr16; |
878 | ||
1ac82ce6 | 879 | /** Event statistics |
880 | * @ingroup alihlt_component_datatypes | |
881 | */ | |
2ff24e4c | 882 | extern const AliHLTComponentDataType kAliHLTDataTypeEventStatistics; |
883 | ||
1ac82ce6 | 884 | /** Event summary |
885 | * @ingroup alihlt_component_datatypes | |
886 | */ | |
2ff24e4c | 887 | extern const AliHLTComponentDataType kAliHLTDataTypeEventSummary; |
888 | ||
1ac82ce6 | 889 | /** Event statistics |
890 | * @ingroup alihlt_component_datatypes | |
891 | */ | |
2ff24e4c | 892 | extern const AliHLTComponentDataType kAliHLTDataTypeRunStatistics; |
893 | ||
1ac82ce6 | 894 | /** Event summary |
895 | * @ingroup alihlt_component_datatypes | |
896 | */ | |
2ff24e4c | 897 | extern const AliHLTComponentDataType kAliHLTDataTypeRunSummary; |
898 | ||
a0aeb701 | 899 | /** Component block statistics |
900 | * @ingroup alihlt_component_datatypes | |
901 | */ | |
902 | extern const AliHLTComponentDataType kAliHLTDataTypeComponentStatistics; | |
903 | ||
904 | /** Component table | |
905 | * To be sent on SOR event, each component adds it's chain id string | |
906 | * and a generated 32bit identifier to the table | |
907 | * @ingroup alihlt_component_datatypes | |
908 | */ | |
909 | extern const AliHLTComponentDataType kAliHLTDataTypeComponentTable; | |
910 | ||
c736de25 | 911 | ////////////////////////////////////////////////////////////////////////// |
912 | // | |
913 | // Data Types for Monitoring objects | |
914 | // | |
915 | ////////////////////////////////////////////////////////////////////////// | |
916 | ||
1ac82ce6 | 917 | /** general ROOT TObject |
918 | * @ingroup alihlt_component_datatypes | |
919 | */ | |
c736de25 | 920 | extern const AliHLTComponentDataType kAliHLTDataTypeTObject; // {ROOTTOBJ,"***"} |
921 | ||
1ac82ce6 | 922 | /** ROOT TObjArray |
923 | * @ingroup alihlt_component_datatypes | |
924 | */ | |
c736de25 | 925 | extern const AliHLTComponentDataType kAliHLTDataTypeTObjArray; // {ROOTOBAR,"***"} |
926 | ||
1ac82ce6 | 927 | /** ROOT TTree |
928 | * @ingroup alihlt_component_datatypes | |
929 | */ | |
c736de25 | 930 | extern const AliHLTComponentDataType kAliHLTDataTypeTTree; // {ROOTTREE,"***"} |
931 | ||
1ac82ce6 | 932 | /** ROOT TH1 (can be used for all histograms, they derive from TH1) |
933 | * @ingroup alihlt_component_datatypes | |
934 | */ | |
c736de25 | 935 | extern const AliHLTComponentDataType kAliHLTDataTypeHistogram; // {ROOTHIST,"***"} |
936 | ||
1ac82ce6 | 937 | /** ROOT TNtuple |
938 | * @ingroup alihlt_component_datatypes | |
939 | */ | |
c736de25 | 940 | extern const AliHLTComponentDataType kAliHLTDataTypeTNtuple; // {ROOTTUPL,"***"} |
941 | ||
7398abba | 942 | /** General track array for the barrel tracks based on AliExternalTrackParam |
943 | * Data format defined by AliHLTTracksData | |
944 | * | |
945 | * We follow the naming scheme of AliESDEvent where 'Tracks' denote the | |
946 | * barrel tracks and detector tracks get names 'DETTracks' | |
947 | * @ingroup alihlt_component_datatypes | |
948 | */ | |
5341a1bf | 949 | extern const AliHLTComponentDataType kAliHLTDataTypeTrack; // {HLTTRACK,"***"} |
7398abba | 950 | |
951 | /** TClonesArray of AliExternalTrackParam | |
952 | * @ingroup alihlt_component_datatypes | |
953 | */ | |
5341a1bf | 954 | extern const AliHLTComponentDataType kAliHLTDataTypeExternalTrackParam; // {TCAEXTTR,"***"} |
955 | ||
956 | /** Container containing jets (AliHLTJETJets) | |
957 | * Containing TClonesArray of AliAODJets | |
958 | * @ingroup alihlt_component_datatypes | |
959 | */ | |
960 | extern const AliHLTComponentDataType kAliHLTDataTypeJet; // {HLTJETV0,"***"} | |
7398abba | 961 | |
32db4144 | 962 | ////////////////////////////////////////////////////////////////////////// |
963 | // | |
964 | // FXS subscriber meta information | |
965 | // | |
966 | ////////////////////////////////////////////////////////////////////////// | |
967 | ||
2ff24e4c | 968 | const int gkAliHLTFXSHeaderfOriginSize = 4; |
969 | const int gkAliHLTFXSHeaderfFileIDSize = 128; | |
970 | const int gkAliHLTFXSHeaderfDDLNumberSize = 64; | |
32db4144 | 971 | |
972 | /** Header in front of the data payload, in order to sent data to the FXS. */ | |
973 | struct AliHLTFXSHeader | |
974 | { | |
b4c0ba41 | 975 | AliHLTUInt32_t fHeaderVersion; /// HLT software version number. |
976 | AliHLTUInt32_t fRunNumber; /// The current run number. | |
977 | char fOrigin[gkAliHLTFXSHeaderfOriginSize]; /// The detector from which the FXS data is received. | |
978 | char fFileID[gkAliHLTFXSHeaderfFileIDSize]; /// File identifier for the stored data. | |
979 | char fDDLNumber[gkAliHLTFXSHeaderfDDLNumberSize]; /// The DDL bits. | |
32db4144 | 980 | }; |
981 | ||
982 | ////////////////////////////////////////////////////////////////////////// | |
983 | // | |
984 | // Component running environment | |
985 | // | |
986 | ////////////////////////////////////////////////////////////////////////// | |
987 | ||
988 | /** logging function */ | |
989 | typedef int (*AliHLTfctLogging)( void* param, | |
990 | AliHLTComponentLogSeverity severity, | |
991 | const char* origin, | |
992 | const char* keyword, | |
993 | const char* message); | |
994 | ||
995 | /** | |
a3c9b745 | 996 | * @struct AliHLTAnalysisEnvironment |
32db4144 | 997 | * Running environment for analysis components. |
a3c9b745 | 998 | * The struct describes function callbacks for actions to be |
999 | * carried out by the calling framework, like memory allocation, | |
1000 | * property callbecks, logging, etc. | |
1001 | * | |
1002 | * @ingroup alihlt_wrapper_interface | |
32db4144 | 1003 | */ |
a3c9b745 | 1004 | struct AliHLTAnalysisEnvironment |
f23a6e1a | 1005 | { |
a3c9b745 | 1006 | /** size of the structure */ |
f23a6e1a | 1007 | AliHLTUInt32_t fStructSize; |
a3c9b745 | 1008 | |
b4c0ba41 | 1009 | /** the component parameter given by the framework on creation */ |
f23a6e1a | 1010 | void* fParam; |
a3c9b745 | 1011 | |
b4c0ba41 | 1012 | /** allocated memory */ |
f23a6e1a | 1013 | void* (*fAllocMemoryFunc)( void* param, unsigned long size ); |
a3c9b745 | 1014 | |
b4c0ba41 | 1015 | /** allocate an EventDoneData structure. */ |
a3c9b745 | 1016 | int (*fGetEventDoneDataFunc)( void* param, AliHLTEventID_t eventID, unsigned long size, AliHLTComponentEventDoneData** edd ); |
1017 | ||
b4c0ba41 | 1018 | /** logging callback */ |
a3c9b745 | 1019 | AliHLTfctLogging fLoggingFunc; |
1020 | }; | |
f23a6e1a | 1021 | #if 0 |
a3c9b745 | 1022 | // I just keep this as a note pad. Has to be added to the end of the structure |
1023 | // future addition already foreseen/envisioned | |
1024 | // IMPORTANT: don not just remove the defines as this breaks the binary | |
1025 | // compatibility | |
1026 | int (*fAllocShmMemoryFunc)( void* param, unsigned long size, AliHLTComponentBlockData* blockLocation ); | |
f23a6e1a | 1027 | #endif |
a3c9b745 | 1028 | |
1029 | /** | |
1030 | * @struct AliHLTComponentEnvironment | |
1031 | * This was the original definition of the running environment. | |
1032 | * Due to a bug in the AliRootWrapperSubscriber/SimpleComponentWrapper, | |
1033 | * this structure can not be used any longer but is kept for backward | |
1034 | * compatibility. | |
1035 | * @note The external interface provided by the libHLTbase is now kept | |
1036 | * frozen but should not be used any more. Use the interface provided | |
1037 | * by the libHLTinterface library. | |
1038 | * | |
1039 | * @ingroup alihlt_wrapper_interface_deprecated | |
1040 | */ | |
1041 | struct AliHLTComponentEnvironment | |
1042 | { | |
1043 | AliHLTUInt32_t fStructSize; | |
1044 | void* fParam; | |
1045 | void* (*fAllocMemoryFunc)( void* param, unsigned long size ); | |
8ede8717 | 1046 | int (*fGetEventDoneDataFunc)( void* param, AliHLTEventID_t eventID, unsigned long size, AliHLTComponentEventDoneData** edd ); |
5ec8e281 | 1047 | AliHLTfctLogging fLoggingFunc; |
f23a6e1a | 1048 | }; |
a3c9b745 | 1049 | |
1050 | ////////////////////////////////////////////////////////////////////////// | |
1051 | // | |
1052 | // The external interface definition | |
1053 | // | |
1054 | ////////////////////////////////////////////////////////////////////////// | |
1055 | ||
1056 | /** | |
1057 | * The component handle. | |
1058 | * Used as indification in the outside world. | |
1059 | * @ingroup alihlt_wrapper_interface | |
1060 | */ | |
1061 | typedef void* AliHLTComponentHandle; | |
1062 | ||
1063 | /** @ingroup alihlt_wrapper_interface */ | |
1064 | const AliHLTComponentHandle kEmptyHLTComponentHandle = 0; | |
1065 | ||
1066 | /** | |
1067 | * Get a system call of the interface. | |
1068 | * @param function signature | |
1069 | * @return pointer to system call | |
1070 | * @ingroup alihlt_wrapper_interface | |
1071 | */ | |
1072 | typedef void* (*AliHLTAnalysisFctGetInterfaceCall)(const char*); | |
1073 | ||
1074 | # define ALIHLTANALYSIS_INTERFACE_LIBRARY "libHLTinterface.so" | |
1075 | # define ALIHLTANALYSIS_FCT_GETINTERFACECALL "AliHLTAnalysisGetInterfaceCall" | |
1076 | ||
1077 | /** @ingroup alihlt_wrapper_interface */ | |
1078 | typedef int (*AliHLTExtFctInitSystem)( unsigned long version, AliHLTAnalysisEnvironment* externalEnv, unsigned long runNo, const char* runType ); | |
1079 | ||
1080 | /** @ingroup alihlt_wrapper_interface */ | |
1081 | typedef int (*AliHLTExtFctDeinitSystem)(); | |
1082 | ||
1083 | /** @ingroup alihlt_wrapper_interface */ | |
1084 | typedef int (*AliHLTExtFctLoadLibrary)( const char* ); | |
1085 | ||
1086 | /** @ingroup alihlt_wrapper_interface */ | |
1087 | typedef int (*AliHLTExtFctUnloadLibrary)( const char* ); | |
1088 | ||
1089 | /** @ingroup alihlt_wrapper_interface */ | |
1090 | typedef int (*AliHLTExtFctCreateComponent)( const char*, void*, int, const char**, AliHLTComponentHandle*, const char* description ); | |
1091 | ||
1092 | /** @ingroup alihlt_wrapper_interface */ | |
1093 | typedef int (*AliHLTExtFctDestroyComponent)( AliHLTComponentHandle ); | |
1094 | ||
1095 | /** @ingroup alihlt_wrapper_interface */ | |
1096 | typedef int (*AliHLTExtFctProcessEvent)( AliHLTComponentHandle, const AliHLTComponentEventData*, const AliHLTComponentBlockData*, | |
1097 | AliHLTComponentTriggerData*, AliHLTUInt8_t*, | |
1098 | AliHLTUInt32_t*, AliHLTUInt32_t*, | |
1099 | AliHLTComponentBlockData**, | |
1100 | AliHLTComponentEventDoneData** ); | |
1101 | ||
1102 | /** @ingroup alihlt_wrapper_interface */ | |
1103 | typedef int (*AliHLTExtFctGetOutputDataType)( AliHLTComponentHandle, AliHLTComponentDataType* ); | |
1104 | ||
1105 | /** @ingroup alihlt_wrapper_interface */ | |
1106 | typedef int (*AliHLTExtFctGetOutputSize)( AliHLTComponentHandle, unsigned long*, double* ); | |
1107 | ||
f23a6e1a | 1108 | } |
1109 | ||
32db4144 | 1110 | ////////////////////////////////////////////////////////////////////////// |
1111 | // | |
1112 | // Data type helper functions | |
1113 | // | |
1114 | ////////////////////////////////////////////////////////////////////////// | |
1115 | ||
3dd8541e | 1116 | /** exact comparison of HLT component data types |
1117 | * @ingroup alihlt_component_datatypes | |
1118 | */ | |
1119 | inline bool MatchExactly( const AliHLTComponentDataType& dt1, const AliHLTComponentDataType& dt2 ) | |
1120 | { | |
1121 | for ( int i = 0; i < kAliHLTComponentDataTypefIDsize; i++ ) | |
1122 | if ( dt1.fID[i] != dt2.fID[i] ) | |
1123 | return false; | |
1124 | for ( int i = 0; i < kAliHLTComponentDataTypefOriginSize; i++ ) | |
1125 | if ( dt1.fOrigin[i] != dt2.fOrigin[i] ) | |
1126 | return false; | |
1127 | return true; | |
1128 | } | |
1129 | ||
1ac82ce6 | 1130 | /** Comparison operator for HLT component data types. |
1131 | * The operator takes wildcards into account, i.e. the ::kAliHLTAnyDataType, | |
1132 | * ::kAliHLTAnyDataTypeID and ::kAliHLTDataOriginAny definitions. | |
1133 | * @ingroup alihlt_component_datatypes | |
1134 | */ | |
8ede8717 | 1135 | inline bool operator==( const AliHLTComponentDataType& dt1, const AliHLTComponentDataType& dt2 ) |
853121af | 1136 | { |
3dd8541e | 1137 | if (MatchExactly(dt1, kAliHLTAllDataTypes)) return true; |
1138 | if (MatchExactly(dt2, kAliHLTAllDataTypes)) return true; | |
1139 | ||
853121af | 1140 | bool any1=true, any2=true, void1=true, void2=true, match=true; |
1141 | for ( int i = 0; i < kAliHLTComponentDataTypefOriginSize; i++ ) { | |
1142 | any1&=(dt1.fOrigin[i]==kAliHLTDataOriginAny[i]); | |
1143 | any2&=(dt2.fOrigin[i]==kAliHLTDataOriginAny[i]); | |
1144 | void1&=(dt1.fOrigin[i]==kAliHLTDataOriginVoid[i]); | |
1145 | void2&=(dt2.fOrigin[i]==kAliHLTDataOriginVoid[i]); | |
1146 | match&=dt1.fOrigin[i]==dt2.fOrigin[i]; | |
1147 | if (!(match || (any2 && !void1) || (any1 && !void2))) | |
1148 | return false; | |
1149 | } | |
1150 | ||
1151 | any1=true, any2=true, match=true; | |
1152 | for ( int i = 0; i < kAliHLTComponentDataTypefIDsize; i++ ) { | |
1153 | any1&=(dt1.fID[i]==kAliHLTAnyDataTypeID[i]); | |
1154 | any2&=(dt2.fID[i]==kAliHLTAnyDataTypeID[i]); | |
1155 | void1&=(dt1.fID[i]==kAliHLTVoidDataTypeID[i]); | |
1156 | void2&=(dt2.fID[i]==kAliHLTVoidDataTypeID[i]); | |
1157 | match&=dt1.fID[i]==dt2.fID[i]; | |
1158 | if (!(match || (any2 && !void1) || (any1 && !void2))) | |
1159 | return false; | |
1160 | } | |
1161 | return true; | |
1162 | } | |
71d7c760 | 1163 | |
1ac82ce6 | 1164 | /** Comparison operator for HLT component data types |
297174de | 1165 | * Invers of operator== |
1ac82ce6 | 1166 | * @ingroup alihlt_component_datatypes |
1167 | */ | |
8ede8717 | 1168 | inline bool operator!=( const AliHLTComponentDataType& dt1, const AliHLTComponentDataType& dt2 ) |
853121af | 1169 | { |
1170 | return !(dt1==dt2); | |
1171 | } | |
71d7c760 | 1172 | |
1ac82ce6 | 1173 | /** merge operator for HLT component data types and origins |
1174 | * @ingroup alihlt_component_datatypes | |
1175 | */ | |
69347e0d | 1176 | inline AliHLTComponentDataType operator|(const AliHLTComponentDataType srcdt, const char origin[kAliHLTComponentDataTypefOriginSize]) |
853121af | 1177 | { |
1178 | AliHLTComponentDataType dt=srcdt; | |
1179 | for ( int i = 0; i < kAliHLTComponentDataTypefOriginSize; i++ ) | |
1180 | dt.fOrigin[i]=origin[i]; | |
1181 | return dt; | |
1182 | } | |
32db4144 | 1183 | |
e5c0542d | 1184 | /** |
1185 | * Helper function to initialize a data type from an id char array and origin string. | |
1186 | * @return data type structure initialized with the specified id and origin | |
1187 | * @ingroup alihlt_component_datatypes | |
1188 | */ | |
1189 | inline AliHLTComponentDataType AliHLTComponentDataTypeInitializer(const char id[kAliHLTComponentDataTypefIDsize], const char* origin) | |
1190 | { | |
1191 | AliHLTComponentDataType dt=kAliHLTVoidDataType; | |
1192 | int i=0; | |
1193 | for (i = 0; i < kAliHLTComponentDataTypefIDsize; i++) | |
1194 | dt.fID[i]=id[i]; | |
1195 | for (i = 0; i < kAliHLTComponentDataTypefOriginSize && origin[i]!=0; i++ ) | |
1196 | dt.fOrigin[i]=origin[i]; | |
1197 | return dt; | |
1198 | } | |
1199 | ||
1200 | /** | |
1201 | * Helper function to initialize a data type from a default data type and | |
1202 | * an origin string. Basically it merges the specified origin into the data | |
1203 | * type. | |
1204 | * @return data type structure initialized with the id from specified data type | |
1205 | * and origin | |
1206 | * @ingroup alihlt_component_datatypes | |
1207 | */ | |
1208 | inline AliHLTComponentDataType AliHLTComponentDataTypeInitializer(const AliHLTComponentDataType src, const char* origin) | |
1209 | { | |
1210 | return AliHLTComponentDataTypeInitializer(src.fID, origin); | |
1211 | } | |
1212 | ||
f23a6e1a | 1213 | #endif |