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