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