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