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