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