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