3 #ifndef ALIHLTDATATYPES_H
4 #define ALIHLTDATATYPES_H
5 /* This file is property of and copyright by the ALICE HLT Project *
6 * ALICE Experiment at CERN, All rights reserved. *
7 * See cxx source for full Copyright notice */
9 /** @file AliHLTDataTypes.h
10 @author Matthias Richter, Timm Steinbeck, Jochen Thaeder
12 @brief Data type declaration for the HLT module.
15 //////////////////////////////////////////////////////////////////////////
17 // version no of HLT data types
19 //////////////////////////////////////////////////////////////////////////
21 /* Version Description
22 * 1 first version until June 07; implicite, not tagged
23 * 2 introduced June 07, enhanced/cleaned/arranged structure
24 * 3 2007-11-15 RAW DDL data type added; some inconsistencies fixed
25 * ('void' and 'any' origins); added signed HLT basic data types
26 * 2007-11-23 origin defines have become variables in conjunction
27 * to be used with the operator| (AliHLTComponentDataType)
28 * 2007-11-24 added trigger structs and ESD tree data type
29 * 4 Component configuration and DCS update events added
30 * gkAliHLTDDLListSize set from 29 to 30 according to new PubSub
32 * 5 Data types for Run and Event summary, and for monitoring added
33 * 6 Common data types for TreeD and TreeR defined
34 * kAliHLTAllDataTypes and kAliHLTDataOriginSample added
35 * kAliHLTDataOriginEMCAL added
36 * kAliHLTDataTypeRunType added
37 * 7 kAliHLTDataTypeComponentStatistics, kAliHLTDataTypeComponentTable,
38 * and AliHLTComponentStatistics have been added for optional
39 * component block statistics
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
45 * 9 added data types for arrays of AliHLTExternalTrackParam sets and
46 * TClonesArrays of AliExternalTrackParam objects.
47 * 10 Changes for information objects neededfor running with offline
48 * chains and analysis tasks.
49 * kAliHLTMCObjectDataType added
50 * kAliHLTDataOriginOffline added
51 * kAliHLTDataOriginHLT added
52 * 11 extended AliHLTComponentStatistics: one more member to store the
53 * cycle time between events per component.
54 * 12 added common data type id 'CLUSTERS'
55 * added data type 'ECSPARAM' for the full ECS parameter string to
57 * added kAliHLTDataTypeTrackMC (TRACK_MC) data type
58 * added data types (note: interface version stays the same
59 * kAliHLTDataTypeDAQRDOUT (DAQRDOUT)
60 * kAliHLTDataTypeTriggerDecision (TRIG_DEC)
61 * kAliHLTDataTypeGlobalTrigger (GLOBTRIG)
62 * kAliHLTDataTypeStreamerInfo (ROOTSTRI)
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.
65 * 14 Adding new data block type for HLT global trigger counters.
66 * Adding data block type for ESD content
67 * Adding data block type for forwarded component table blocks
68 * Adding new event type for software triggers.
69 * 15 Modifying data block types for trigger counter blocks.
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
74 #define ALIHLT_DATA_TYPES_VERSION 16
76 //////////////////////////////////////////////////////////////////////////
78 // HLT data origin variables.
80 // By converting from defines to variables, the origins can be used with
83 // AliHLTComponentDataType dt;
84 // dt = kAliHLTDataTypeDDLRaw | kAliHLTDataOriginTPC;
86 //////////////////////////////////////////////////////////////////////////
88 /** field size of datat type origin
89 * @ingroup alihlt_component_datatypes
91 const int kAliHLTComponentDataTypefOriginSize=4;
94 /** invalid data origin
95 * @ingroup alihlt_component_datatypes
97 # define kAliHLTDataOriginVoid "\0\0\0"
98 /** old invalid data origin, kept for backward compatibility */
99 # define kAliHLTVoidDataOrigin "\0\0\0"
101 /** wildcard data type origin
102 * @ingroup alihlt_component_datatypes
104 # define kAliHLTDataOriginAny "***"
105 /** old wildcard data type origin, kept for backward compatibility */
106 # define kAliHLTAnyDataOrigin "***"
108 /** Data origin HLT out
109 * @ingroup alihlt_component_datatypes
111 extern const char kAliHLTDataOriginOut[kAliHLTComponentDataTypefOriginSize];
113 /** Data origin HLT, used for HLT specifc data
114 * in offline chains. This not a bug!
115 * @ingroup alihlt_component_datatypes
117 extern const char kAliHLTDataOriginHLT[kAliHLTComponentDataTypefOriginSize];
119 /** Data origin Offline
120 * @ingroup alihlt_component_datatypes
122 extern const char kAliHLTDataOriginOffline[kAliHLTComponentDataTypefOriginSize];
124 /** Data origin HLT/PubSub private internal
125 * @ingroup alihlt_component_datatypes
127 extern const char kAliHLTDataOriginPrivate[kAliHLTComponentDataTypefOriginSize];
130 * @ingroup alihlt_component_datatypes
132 extern const char kAliHLTDataOriginTPC[kAliHLTComponentDataTypefOriginSize];
135 * @ingroup alihlt_component_datatypes
137 extern const char kAliHLTDataOriginPHOS[kAliHLTComponentDataTypefOriginSize];
140 * @ingroup alihlt_component_datatypes
142 extern const char kAliHLTDataOriginFMD[kAliHLTComponentDataTypefOriginSize];
145 * @ingroup alihlt_component_datatypes
147 extern const char kAliHLTDataOriginMUON[kAliHLTComponentDataTypefOriginSize];
150 * @ingroup alihlt_component_datatypes
152 extern const char kAliHLTDataOriginTRD[kAliHLTComponentDataTypefOriginSize];
155 * @ingroup alihlt_component_datatypes
157 extern const char kAliHLTDataOriginITS[kAliHLTComponentDataTypefOriginSize];
159 /** Data origin ITSOut
160 * @ingroup alihlt_component_datatypes
162 extern const char kAliHLTDataOriginITSOut[kAliHLTComponentDataTypefOriginSize];
164 /** Data origin ITS SPD
165 * @ingroup alihlt_component_datatypes
167 extern const char kAliHLTDataOriginITSSPD[kAliHLTComponentDataTypefOriginSize];
169 /** Data origin ITS SDD
170 * @ingroup alihlt_component_datatypes
172 extern const char kAliHLTDataOriginITSSDD[kAliHLTComponentDataTypefOriginSize];
174 /** Data origin ITS SSD
175 * @ingroup alihlt_component_datatypes
177 extern const char kAliHLTDataOriginITSSSD[kAliHLTComponentDataTypefOriginSize];
179 /** Data origin for examples
180 * @ingroup alihlt_component_datatypes
182 extern const char kAliHLTDataOriginSample[kAliHLTComponentDataTypefOriginSize];
184 /** Data origin EMCAL
185 * @ingroup alihlt_component_datatypes
187 extern const char kAliHLTDataOriginEMCAL[kAliHLTComponentDataTypefOriginSize];
190 * @ingroup alihlt_component_datatypes
192 extern const char kAliHLTDataOriginTOF[kAliHLTComponentDataTypefOriginSize];
194 /** Data origin HMPID
195 * @ingroup alihlt_component_datatypes
197 extern const char kAliHLTDataOriginHMPID[kAliHLTComponentDataTypefOriginSize];
200 * @ingroup alihlt_component_datatypes
202 extern const char kAliHLTDataOriginCPV[kAliHLTComponentDataTypefOriginSize];
205 * @ingroup alihlt_component_datatypes
207 extern const char kAliHLTDataOriginPMD[kAliHLTComponentDataTypefOriginSize];
210 * @ingroup alihlt_component_datatypes
212 extern const char kAliHLTDataOriginT0[kAliHLTComponentDataTypefOriginSize];
214 /** Data origin VZERO
215 * @ingroup alihlt_component_datatypes
217 extern const char kAliHLTDataOriginVZERO[kAliHLTComponentDataTypefOriginSize];
220 * @ingroup alihlt_component_datatypes
222 extern const char kAliHLTDataOriginZDC[kAliHLTComponentDataTypefOriginSize];
224 /** Data origin ACORDE
225 * @ingroup alihlt_component_datatypes
228 extern const char kAliHLTDataOriginACORDE[kAliHLTComponentDataTypefOriginSize];
231 * @ingroup alihlt_component_datatypes
233 extern const char kAliHLTDataOriginTRG[kAliHLTComponentDataTypefOriginSize];
235 //////////////////////////////////////////////////////////////////////////
237 // HLT common data type defines
239 //////////////////////////////////////////////////////////////////////////
241 /** field size of data type id
242 * @ingroup alihlt_component_datatypes
244 const int kAliHLTComponentDataTypefIDsize=8;
247 /** invalid data type id
248 * @ingroup alihlt_component_datatypes
250 # define kAliHLTVoidDataTypeID "\0\0\0\0\0\0\0"
252 /** special id for all data types: any + void
253 * @ingroup alihlt_component_datatypes
255 # define kAliHLTAllDataTypesID "ALLDATA"
257 /** special id for any valid data type id
258 * @ingroup alihlt_component_datatypes
260 # define kAliHLTAnyDataTypeID "*******"
263 * @ingroup alihlt_component_datatypes
265 # define kAliHLTDDLRawDataTypeID {'D','D','L','_','R','A','W',' '}
268 * Common data type for the output of cluster finders, the exact
269 * format depends on the origin (detector)
270 * @ingroup alihlt_component_datatypes
272 # define kAliHLTClustersDataTypeID {'C','L','U','S','T','E','R','S'}
274 /** calibration data for file exchange subscriber
275 * @ingroup alihlt_component_datatypes
277 # define kAliHLTFXSCalibDataTypeID {'F','X','S','_','C','A','L',' '}
279 /** start of run (SOR) event
281 * @ingroup alihlt_component_datatypes
283 # define kAliHLTSORDataTypeID {'S','T','A','R','T','O','F','R'}
285 /** end of run (EOR) event
287 * @ingroup alihlt_component_datatypes
289 # define kAliHLTEORDataTypeID {'E','N','D','O','F','R','U','N'}
291 /** run type data block
292 * string with run type as payload
293 * @ingroup alihlt_component_datatypes
295 # define kAliHLTRunTypeDataTypeID {'R','U','N','T','Y','P','E',' '}
298 * @ref AliHLTEventDDL
299 * @ingroup alihlt_component_datatypes
301 # define kAliHLTDDLDataTypeID {'D','D','L','L','I','S','T',' '}
304 * @ingroup alihlt_component_datatypes
306 # define kAliHLTDAQRDOUTDataTypeID "DAQRDOUT"
308 /** HLT readout list.
309 * @ingroup alihlt_component_datatypes
311 # define kAliHLTReadoutListDataTypeID {'H','L','T','R','D','L','S','T'}
314 * - empty payload, specification gives eventType
315 * @ingroup alihlt_component_datatypes
317 # define kAliHLTEventDataTypeID {'E','V','E','N','T','T','Y','P'}
319 /** ECS parameter event
320 * - sent during the SOR event by the framework
321 * - contains the full ECS parameter string
322 * @ingroup alihlt_component_datatypes
324 # define kAliHLTECSParamDataTypeID {'E','C','S','P','A','R','A','M'}
326 /** ComponentConfiguration event
327 * - payload contains the CDB path as string
328 * @ingroup alihlt_component_datatypes
330 # define kAliHLTComConfDataTypeID {'C','O','M','_','C','O','N','F'}
332 /** DCS value update event
333 * - payload contains string of relevant detectors
334 * @ingroup alihlt_component_datatypes
336 # define kAliHLTUpdtDCSDataTypeID {'U','P','D','T','_','D','C','S'}
339 * an AliMCEvent object of varying origin
340 * The 'V0' at the end allows a versioning
341 * @ingroup alihlt_component_datatypes
343 # define kAliHLTMCObjectDataTypeID {'A','L','I','M','C','_','V','0'}
345 /** ESDVertex data block
346 * an AliESDVertex object of varying origin
347 * The 'V0' at the end allows a versioning
348 * @ingroup alihlt_component_datatypes
350 # define kAliHLTESDVertexDataTypeID {'E','S','D','V','T','X','V','0'}
352 /** KFVertex data block
353 * an AliKFVertex object of varying origin
354 * The 'V0' at the end allows a versioning
355 * @ingroup alihlt_component_datatypes
357 # define kAliHLTKFVertexDataTypeID {'A','L','I','K','F','V','V','0'}
360 /** output of the GlobalVertexer data block
361 * The 'V0' at the end allows a versioning
362 * @ingroup alihlt_component_datatypes
364 # define kAliHLTDataTypeGlobalVertexerID {'G','L','B','V','T','X','V','0'}
366 /** output of the PrimaryFinder data block
367 * The 'V0' at the end allows a versioning
368 * @ingroup alihlt_component_datatypes
370 # define kAliHLTDataTypePrimaryFinderID {'P','R','I','V','T','X','V','0'}
372 /** output of the V0Finder data block
373 * The 'V0' at the end allows a versioning
374 * @ingroup alihlt_component_datatypes
376 # define kAliHLTDataTypeV0FinderID {'V','0','S','V','T','X','V','0'}
379 * an AliESD object of varying origin
380 * The 'V0' at the end allows a versioning
381 * @ingroup alihlt_component_datatypes
383 # define kAliHLTESDObjectDataTypeID {'A','L','I','E','S','D','V','0'}
386 * data blocks designated for the ESD
387 * @ingroup alihlt_component_datatypes
389 # define kAliHLTESDContentDataTypeID {'E','S','D','_','C','O','N','T'}
391 /** ESD tree data block
392 * TTree with an AliESD object of varying origin
393 * @ingroup alihlt_component_datatypes
395 # define kAliHLTESDTreeDataTypeID {'E','S','D','_','T','R','E','E'}
398 * - the digits tree of an AliRoot module
399 * @ingroup alihlt_component_datatypes
401 #define kAliHLTTreeDDataTypeID {'A','L','I','T','R','E','E','D'}
404 * - the rec points tree of an AliRoot module
405 * @ingroup alihlt_component_datatypes
407 #define kAliHLTTreeRDataTypeID {'A','L','I','T','R','E','E','R'}
409 /** HW Address selection data block
410 * - a selection list for 16 bit HW addresses
412 * @ingroup alihlt_component_datatypes
414 # define kAliHLTHwAddr16DataTypeID {'H','W','A','D','D','R','1','6'}
417 * - event statistics for given detectors
419 * @ingroup alihlt_component_datatypes
421 # define kAliHLTEventStatisticsDataTypeID {'E','V','_','S','T','A','T','I'}
425 * - origin : kAliHLTDataOriginOut ( HLT )
426 * @ingroup alihlt_component_datatypes
428 # define kAliHLTEventSummaryDataTypeID {'E','V','_','S','U','M','M','A'}
431 * - run statistics for given detectors
433 * @ingroup alihlt_component_datatypes
435 # define kAliHLTRunStatisticsDataTypeID {'R','U','N','S','T','A','T','I'}
439 * - origin : kAliHLTDataOriginOut ( HLT )
440 * @ingroup alihlt_component_datatypes
442 # define kAliHLTRunSummaryDataTypeID {'R','U','N','S','U','M','M','A'}
445 * - origin : kAliHLTDataOriginOut ( HLT )
446 * @ingroup alihlt_component_datatypes
448 # define kAliHLTTriggerDecisionDataTypeID {'T','R','I','G','_','D','E','C'}
450 /** Global trigger decision
451 * - origin : kAliHLTDataOriginOut ( HLT )
452 * @ingroup alihlt_component_datatypes
454 # define kAliHLTGlobalTriggerDataTypeID {'G','L','O','B','T','R','I','G'}
457 * - small block statistics info added to the data stream by
458 * the component base class
459 * - origin kAliHLTDataOriginPrivate
460 * @ingroup alihlt_component_datatypes
462 # define kAliHLTComponentStatisticsDataTypeID {'C','O','M','P','S','T','A','T'}
465 * - list of components in the chain to be percolated through the chain
466 * - each component adds it's chain id string and a generated 32bit id
467 * @ingroup alihlt_component_datatypes
469 # define kAliHLTComponentTableDataTypeID {'C','O','M','P','T','A','B','L'}
471 /** Forwarded component table
472 * @ingroup alihlt_component_datatypes
474 # define kAliHLTComponentFwdTableDataTypeID {'C','O','M','P','T','A','B','F'}
476 /** general ROOT TObject
477 * - a general TObject exported from the HLT analysis
479 * @ingroup alihlt_component_datatypes
481 #define kAliHLTTObjectDataTypeID {'R','O','O','T','T','O','B','J'}
483 /** ROOT streamer info
484 * - used for the transmission of streamer info for objects in the HLTOUT
485 * - origin kAliHLTDataOriginOut ( HLT )
486 * @ingroup alihlt_component_datatypes
488 #define kAliHLTStreamerInfoDataTypeID {'R','O','O','T','S','T','R','I'}
491 * - a TObjArray exported from the HLT analysis
493 * @ingroup alihlt_component_datatypes
495 #define kAliHLTTObjArrayDataTypeID {'R','O','O','T','O','B','A','R'}
498 * - a TTree object exported from the HLT analysis
500 * @ingroup alihlt_component_datatypes
502 #define kAliHLTTTreeDataTypeID {'R','O','O','T','T','R','E','E'}
505 * - a histogram object exported from the HLT analysis
506 * - class derives from TH1 (directly or indirectly) and inherits all common functionality
508 * @ingroup alihlt_component_datatypes
510 #define kAliHLTHistogramDataTypeID {'R','O','O','T','H','I','S','T'}
513 * - a TNtupl object exported from the HLT analysis
515 * @ingroup alihlt_component_datatypes
517 #define kAliHLTTNtupleDataTypeID {'R','O','O','T','T','U','P','L'}
520 * - Struct for Tracks based on AliExternalTrackParam
522 * @ingroup alihlt_component_datatypes
524 #define kAliHLTTrackDataTypeID {'H','L','T','T','R','A','C','K'}
526 /** Track Monte Carlo information
527 * @ingroup alihlt_component_datatypes
529 #define kAliHLTTrackMCDataTypeID {'T','R','A','C','K','_','M','C'}
531 /** TClonesArray of AliExternalTrackParam
532 * @ingroup alihlt_component_datatypes
534 #define kAliHLTExternalTrackParamDataTypeID {'T','C','A','E','X','T','T','R'}
537 * - Struct for jets based on AliHLTJETJets
539 * @ingroup alihlt_component_datatypes
541 #define kAliHLTJetDataTypeID {'H','L','T','J','E','T','V','0'}
544 * Common data type for the dEdx
545 * format depends on the origin (detector)
546 * @ingroup alihlt_component_datatypes
548 # define kAliHLTdEdxDataTypeID {'D','E','D','X',' ',' ',' ',' '}
551 * Common data type for the dNdPt output object
552 * @ingroup alihlt_component_datatypes
554 # define kAliHLTdNdPtDataTypeID {'D','N','D','P','T',' ',' ',' '}
556 /** Global input trigger counters data block type.
557 * @ingroup alihlt_component_datatypes
559 # define kAliHLTInputTriggerCountersDataTypeID {'I','N','T','R','G','C','N','T'}
561 /** Global output trigger counters data block type.
562 * @ingroup alihlt_component_datatypes
564 # define kAliHLTOutputTriggerCountersDataTypeID {'O','T','T','R','G','C','N','T'}
566 /** Generic meta data block type ID.
567 * @ingroup alihlt_component_datatypes
569 # define kAliHLTMetaDataTypeID {'M','E','T','A','D','A','T','A'}
572 //////////////////////////////////////////////////////////////////////////
574 // Basic HLT data types
576 //////////////////////////////////////////////////////////////////////////
578 typedef unsigned char AliHLTUInt8_t;
580 typedef signed char AliHLTInt8_t;
582 typedef unsigned short AliHLTUInt16_t;
584 typedef signed short AliHLTInt16_t;
586 typedef unsigned int AliHLTUInt32_t;
588 typedef signed int AliHLTInt32_t;
590 typedef unsigned long long AliHLTUInt64_t;
592 typedef signed long long AliHLTInt64_t;
594 typedef float AliHLTFloat32_t;
596 typedef double AliHLTFloat64_t;
598 typedef AliHLTUInt64_t AliHLTEventID_t;
600 //////////////////////////////////////////////////////////////////////////
602 // HLT logging levels
604 //////////////////////////////////////////////////////////////////////////
607 * Logging severities of the HLT
609 enum AliHLTComponentLogSeverity {
612 /** benchmark messages */
613 kHLTLogBenchmark = 0x1,
614 /** debug messages */
618 /** warning messages */
619 kHLTLogWarning = 0x8,
620 /** error messages */
622 /** fatal error messages */
624 /** few important messages not to be filtered out.
625 * redirected to kHLTLogInfo in AliRoot
627 kHLTLogImportant = 0x40,
628 /** special value to enable all messages */
630 /** the default logging filter */
631 kHLTLogDefault = 0x79
634 //////////////////////////////////////////////////////////////////////////
636 // HLT data structures for data exchange and external interface
638 //////////////////////////////////////////////////////////////////////////
641 * @struct AliHLTComponentEventData
644 struct AliHLTComponentEventData
646 AliHLTUInt32_t fStructSize; /// Size of this structure in bytes.
647 AliHLTEventID_t fEventID; /// 64 bit event ID number.
648 AliHLTUInt32_t fEventCreation_s; /// Event creation time in seconds (Should be added to fEventCreation_us*1e6).
649 AliHLTUInt32_t fEventCreation_us; /// Fractional event creation time in micro seconds.
650 AliHLTUInt32_t fBlockCnt; /// The number of raw data blocks received by the component.
654 * @struct AliHLTComponentShmData
655 * Shared memory descriptor.
656 * Irrelevant for analysis components.
658 struct AliHLTComponentShmData
660 AliHLTUInt32_t fStructSize; /// Size of this structure in bytes.
661 AliHLTUInt32_t fShmType; /// The type code of the shared memory.
662 AliHLTUInt64_t fShmID; /// The shared memory identifier.
666 * @defgroup alihlt_component_datatypes Common Component Data Types
667 * The analysis framework defines a number of common data types for
668 * usage in the detector modules, like e.g. ::kAliHLTAnyDataType
669 * and ::kAliHLTDataTypeDDLRaw. Those data types always have
670 * origin ::kAliHLTDataOriginAny. The correct detector origin can be
671 * set by using operator '|'
673 * AliHLTComponentDataType dt=kAliHLTDDLRawDataTypeID|kAliHLTDataOriginTPC
675 * @ingroup alihlt_component
679 * @struct AliHLTComponentDataType
680 * Data type descriptor for data blocks transferred through the processing
682 * @ingroup alihlt_component_datatypes
684 struct AliHLTComponentDataType
686 AliHLTUInt32_t fStructSize; /// Size of this structure in bytes.
687 char fID[kAliHLTComponentDataTypefIDsize]; /// Data type identifier.
688 char fOrigin[kAliHLTComponentDataTypefOriginSize]; /// Subsystem or detector origin of the data.
692 * @struct AliHLTComponentBlockData
693 * This is the decription of data blocks exchanged between components.
694 * \b IMPORTANT: The validity of fPtr and fOffset is different for input and
696 * - input blocks: The \em fPtr member always points to the beginning of the data
697 * of size \em fSize. fOffset is ignored and should be in most
699 * - output blocks: The \em fPtr member is ignored by the framework. \em fOffset
700 * must specify the start of the data relative to the output
701 * buffer. The data block has size \em fSize.
703 struct AliHLTComponentBlockData
705 /** size and version of the struct */
706 AliHLTUInt32_t fStructSize;
707 /** shared memory key, ignored by processing components */
708 AliHLTComponentShmData fShmKey;
709 /** offset of output data relative to the output buffer */
710 AliHLTUInt32_t fOffset;
711 /** start of the data for input data blocks, fOffset to be ignored*/
713 /** size of the data block */
714 AliHLTUInt32_t fSize;
715 /** data type of the data block */
716 AliHLTComponentDataType fDataType;
717 /** data specification of the data block */
718 AliHLTUInt32_t fSpecification;
720 AliHLTComponentDataType GetDataType() const {return fDataType;}
721 AliHLTUInt32_t GetSpecification() const {return fSpecification;}
725 * @struct AliHLTComponentEventDoneData
728 struct AliHLTComponentEventDoneData
730 AliHLTUInt32_t fStructSize; /// Size of this structure in bytes.
731 AliHLTUInt32_t fDataSize; /// Size of the data section (following this data member) in bytes.
732 void* fData; /// Start of the data section.
736 * @struct AliHLTRunDesc
738 * The struct is sent with the SOR and EOR events.
741 * The name of the member fRunType is a bit misleading. This is not
742 * the ALICE Run Type given by the ECS to the sub-system. The member
743 * is an internal HLT run type and a combination of the HLT running
744 * mode and the beam type.
746 * Bit 0-2: beam type identifier
752 AliHLTUInt32_t fStructSize; /// Size of this structure in bytes.
753 AliHLTUInt32_t fRunNo; /// The run number for the current active run.
754 AliHLTUInt32_t fRunType; /// The HLT run type.
758 * @struct AliHLTComponentStatistics
759 * Small block size summary added by the AliHLTComponent base class
760 * if component statistics are enabled (--enable-compstat).
762 * fLevel is retrieved from incoming block statistics and incremented.
763 * Incoming block statistics are appended to the newly added one if
764 * --enable-compstat=full has been chosen.
767 * 2009-01-14 fComponentCycleTime added
769 struct AliHLTComponentStatistics
771 AliHLTUInt32_t fStructSize; /// Size of this structure in bytes.
772 AliHLTUInt32_t fLevel; /// Indicates from which processing stage this information is from.
773 AliHLTUInt32_t fId; /// Unique identifier for the chain based on CRC code.
774 AliHLTUInt32_t fTime; /// Real wall time used to process the data (micro seconds).
775 AliHLTUInt32_t fCTime; /// CPU time used to process the data (micro seconds).
776 AliHLTUInt32_t fInputBlockCount; /// Number of input data blocks.
777 AliHLTUInt32_t fTotalInputSize; /// Total size in bytes of input data.
778 AliHLTUInt32_t fOutputBlockCount; /// Number of output data blocks.
779 AliHLTUInt32_t fTotalOutputSize; /// Total size in bytes of output data.
780 AliHLTUInt32_t fComponentCycleTime; /// Real wall time indicating the start of the data processing (micro seconds).
784 * @struct AliHLTComponentTableEntry
785 * Structure to be send on SOR event through the chain.
786 * The 'length' of the structure is variable and depends on the length
787 * of the buffer at the end.
789 * ComponentTableEntries are sent with data type @ref kAliHLTDataTypeComponentTable
790 * and are identified by a 32bit Id specification generated by a CRC
791 * algorithm from the chain Id of the component. This is not a 100% unique
792 * id but with a high probability. This approach accounts for the fact
793 * that all components are separated processes.
795 * The buffer consists of an array of 32bit Ids containing the Ids of
796 * all direct parents taken from the specification of the data blocks.
797 * The number of parents is stored in fNofParents. Each component forwards the
798 * incoming component table entries with data type @ref kAliHLTDataTypeComponentFwdTable
799 * by that the direct parents can be identified.
801 * Following this array a description string contains the chain id, component args, and
802 * maybe more properties in the future. The current format is
803 * 'chain_id{component_id:component args}' e.g. TPC-CF_00_0{TPCClusterFinder32Bit:-deconvolute-time}
805 struct AliHLTComponentTableEntry
807 AliHLTUInt32_t fStructSize; /// Size of this structure in bytes.
808 AliHLTUInt32_t fLevel; /// Indicates from which processing stage this information is from.
809 AliHLTUInt16_t fNofParents; /// size of the array of parent ids
810 AliHLTUInt8_t fSizeDescription; /// size of the description string in the appended buffer
811 AliHLTUInt8_t fBuffer[1]; /// the strings: chain id, component args, reserved
814 //////////////////////////////////////////////////////////////////////////
816 // Trigger meta information
818 //////////////////////////////////////////////////////////////////////////
820 /** field size of fAttribute */
821 const int gkAliHLTBlockDAttributeCount = 8;
823 /** field size of fCommonHeader */
824 const int gkAliHLTCommonHeaderCount = 8;
826 /** size of the DDL list first version */
827 const int gkAliHLTDDLListSizeV0 = 30;
829 /** size of the DDL list after DCAL added to EMCAL */
830 const int gkAliHLTDDLListSizeV1 = 31;
832 /** size of the DDL list */
833 const int gkAliHLTDDLListSize = gkAliHLTDDLListSizeV1;
835 /** Number of Trigger Classes of CTP in CDH */
836 const int gkNCTPTriggerClasses = 50;
839 * @struct AliHLTEventDDLV0
840 * First version of the DDL list event.
841 * The struct is send with the DDLLIST event.
842 * Used in the trigger structure for internal apperance of
843 * the DLLs as well as for the HLT readout list send to DAQ
844 * ( as DataType : kAliHLTDataTypeDDL )
846 struct AliHLTEventDDLV0
848 AliHLTUInt32_t fCount; /// Indicates the number of words in fList.
849 AliHLTUInt32_t fList[gkAliHLTDDLListSizeV0]; /// The list of DDL enable/disable bits.
853 * @struct AliHLTEventDDLV1
854 * DDL list event structure with extra word for DCAL bits.
856 struct AliHLTEventDDLV1
858 AliHLTUInt32_t fCount; /// Indicates the number of words in fList.
859 AliHLTUInt32_t fList[gkAliHLTDDLListSizeV1]; /// The list of DDL enable/disable bits.
863 * @typedef AliHLTEventDDL
864 * Current used default version of the AliHLTEventDDL structure.
866 typedef AliHLTEventDDLV1 AliHLTEventDDL;
869 * @struct AliHLTEventTriggerData
871 struct AliHLTEventTriggerData
873 AliHLTUInt8_t fAttributes[gkAliHLTBlockDAttributeCount]; /// List of data block attibutes.
874 AliHLTUInt64_t fHLTStatus; /// Bit field
875 AliHLTUInt32_t fCommonHeaderWordCnt; /// Number of words in fCommonHeader.
876 AliHLTUInt32_t fCommonHeader[gkAliHLTCommonHeaderCount]; /// The common header words.
879 AliHLTEventDDL fReadoutList; /// The default readout list structure.
880 AliHLTEventDDLV0 fReadoutListV0; /// Access to the old version of the readout list structure.
881 AliHLTEventDDLV1 fReadoutListV1; /// Access to the readout list structure with DCAL included.
886 * @struct AliHLTComponentTriggerData
889 struct AliHLTComponentTriggerData
891 AliHLTUInt32_t fStructSize; /// Size of this structure in bytes.
892 AliHLTUInt32_t fDataSize; /// Size of the data section (following this data member) in bytes.
893 void* fData; /// Start of the data section.
896 //////////////////////////////////////////////////////////////////////////
898 // HLT Event Type Specification
900 //////////////////////////////////////////////////////////////////////////
902 /** Unknown eventType specification */
903 const AliHLTUInt32_t gkAliEventTypeUnknown = ~(AliHLTUInt32_t)0;
904 /** SOR eventType specification */
905 const AliHLTUInt32_t gkAliEventTypeStartOfRun=1;
906 /** Data eventType specification */
907 const AliHLTUInt32_t gkAliEventTypeData=2;
908 /** EOR eventType specification */
909 const AliHLTUInt32_t gkAliEventTypeEndOfRun=4;
910 /** Corrupt eventType specification */
911 const AliHLTUInt32_t gkAliEventTypeCorruptID=8;
912 /** Calibration eventType specification */
913 const AliHLTUInt32_t gkAliEventTypeCalibration=16;
914 /** Software eventType specification */
915 const AliHLTUInt32_t gkAliEventTypeSoftware=24;
916 /** DataReplay eventType specification */
917 const AliHLTUInt32_t gkAliEventTypeDataReplay=32;
918 /** Configuration eventType specification */
919 const AliHLTUInt32_t gkAliEventTypeConfiguration=34;
920 /** Update DCS eventType specification */
921 const AliHLTUInt32_t gkAliEventTypeReadPreprocessor=35;
922 /** Tick eventType specification */
923 const AliHLTUInt32_t gkAliEventTypeTick=64;
924 /** Max eventType specification */
925 const AliHLTUInt32_t gkAliEventTypeMax=64;
927 //////////////////////////////////////////////////////////////////////////
929 // HLT defines and defaults
931 //////////////////////////////////////////////////////////////////////////
934 * @ingroup alihlt_component_datatypes
936 const AliHLTEventID_t kAliHLTVoidEventID=~(AliHLTEventID_t)0;
938 /** invalid data specification
939 * @ingroup alihlt_component_datatypes
941 const AliHLTUInt32_t kAliHLTVoidDataSpec = ~(AliHLTUInt32_t)0;
944 * @ingroup alihlt_component_datatypes
946 const AliHLTUInt32_t kAliHLTVoidRunNo = ~(AliHLTUInt32_t)0;
949 * @ingroup alihlt_component_datatypes
951 const AliHLTUInt32_t kAliHLTVoidRunType = ~(AliHLTUInt32_t)0;
953 /** invalid run descriptor
954 * @ingroup alihlt_component_datatypes
956 const AliHLTRunDesc kAliHLTVoidRunDesc={sizeof(AliHLTRunDesc), kAliHLTVoidRunNo, kAliHLTVoidRunType};
958 /** invalid shared memory type */
959 const AliHLTUInt32_t gkAliHLTComponentInvalidShmType = 0;
961 /** invalid shared memory id */
962 const AliHLTUInt64_t gkAliHLTComponentInvalidShmID = ~(AliHLTUInt64_t)0;
964 /** invalid data type
965 * @ingroup alihlt_component_datatypes
967 const AliHLTComponentDataType kAliHLTVoidDataType = {
968 sizeof(AliHLTComponentDataType),
969 kAliHLTVoidDataTypeID,
970 kAliHLTDataOriginVoid
973 /** all data types, means any + void data type
974 * @ingroup alihlt_component_datatypes
976 const AliHLTComponentDataType kAliHLTAllDataTypes = {
977 sizeof(AliHLTComponentDataType),
978 kAliHLTAllDataTypesID,
982 // there is currently a problem with rootcint if the predefined ids
983 // (commented below) are used. rootcint does not find the id if they
984 // are char arrays defined with {} and individual chars. If strings
985 // are used it works fine
987 * @ingroup alihlt_component_datatypes
989 const AliHLTComponentDataType kAliHLTAnyDataType = {
990 sizeof(AliHLTComponentDataType),
991 kAliHLTAnyDataTypeID,
995 /** multiple output data types
996 * @ingroup alihlt_component_datatypes
998 extern const AliHLTComponentDataType kAliHLTMultipleDataType;
1000 /** data to file exchange subscriber
1001 * @ingroup alihlt_component_datatypes
1003 extern const AliHLTComponentDataType kAliHLTDataTypeFXSCalib;
1005 /** DDL list data type
1006 * @ingroup alihlt_component_datatypes
1008 extern const AliHLTComponentDataType kAliHLTDataTypeDDL;
1010 /** DAQ readout list
1011 * @ingroup alihlt_component_datatypes
1013 extern const AliHLTComponentDataType kAliHLTDataTypeDAQRDOUT;
1016 * Common data type for the output of cluster finders, the exact
1017 * format depends on the origin (detector)
1018 * @ingroup alihlt_component_datatypes
1020 extern const AliHLTComponentDataType kAliHLTDataTypeClusters;
1023 * @ingroup alihlt_component_datatypes
1025 extern const AliHLTComponentDataType kAliHLTDataTypeSOR;
1028 * @ingroup alihlt_component_datatypes
1030 extern const AliHLTComponentDataType kAliHLTDataTypeEOR;
1032 /** Run type data block
1033 * @ingroup alihlt_component_datatypes
1035 extern const AliHLTComponentDataType kAliHLTDataTypeRunType;
1037 /** Event type specification
1038 * @ingroup alihlt_component_datatypes
1040 extern const AliHLTComponentDataType kAliHLTDataTypeEvent;
1042 /** ECS parameter event
1043 * - sent during the SOR event by the framework
1044 * - contains the full ECS parameter string
1045 * @ingroup alihlt_component_datatypes
1047 extern const AliHLTComponentDataType kAliHLTDataTypeECSParam; // {ECSPARAM:PRIV}
1049 /** Configuration event data type
1050 * @ingroup alihlt_component_datatypes
1052 extern const AliHLTComponentDataType kAliHLTDataTypeComConf;
1054 /** DCS value update event
1055 * @ingroup alihlt_component_datatypes
1057 extern const AliHLTComponentDataType kAliHLTDataTypeUpdtDCS;
1059 /** RAW DDL data specification, origin is 'any', data publisher origin correctly
1060 * @ingroup alihlt_component_datatypes
1062 extern const AliHLTComponentDataType kAliHLTDataTypeDDLRaw;
1064 /** AliMCEvent object data specification, origin is 'OFFL'
1065 * @ingroup alihlt_component_datatypes
1067 extern const AliHLTComponentDataType kAliHLTDataTypeMCObject;
1069 /** ESD vertex object data specification, origin is 'any'
1070 * @ingroup alihlt_component_datatypes
1072 extern const AliHLTComponentDataType kAliHLTDataTypeESDVertex;
1074 /** KF vertex object data specification, origin is 'any'
1075 * @ingroup alihlt_component_datatypes
1077 extern const AliHLTComponentDataType kAliHLTDataTypeKFVertex;
1079 /** global vertexer data specification, origin is 'any'
1080 * @ingroup alihlt_component_datatypes
1082 extern const AliHLTComponentDataType kAliHLTDataTypeGlobalVertexer;
1084 /** primary finder data specification, origin is 'any'
1085 * @ingroup alihlt_component_datatypes
1087 extern const AliHLTComponentDataType kAliHLTDataTypePrimaryFinder;
1089 /** primary finder data specification, origin is 'any'
1090 * @ingroup alihlt_component_datatypes
1092 extern const AliHLTComponentDataType kAliHLTDataTypeV0Finder;
1094 /** ESD object data specification, origin is 'any'
1095 * @ingroup alihlt_component_datatypes
1097 extern const AliHLTComponentDataType kAliHLTDataTypeESDObject;
1099 /** ESD content data specification, origin is 'any'
1100 * @ingroup alihlt_component_datatypes
1102 extern const AliHLTComponentDataType kAliHLTDataTypeESDContent;
1104 /** ESD Tree data specification, origin is 'any'
1105 * @ingroup alihlt_component_datatypes
1107 extern const AliHLTComponentDataType kAliHLTDataTypeESDTree;
1109 /** AliRoot TreeD data specification, origin is 'any'
1110 * @ingroup alihlt_component_datatypes
1112 extern const AliHLTComponentDataType kAliHLTDataTypeAliTreeD;
1114 /** AliRoot TreeR data specification, origin is 'any'
1115 * @ingroup alihlt_component_datatypes
1117 extern const AliHLTComponentDataType kAliHLTDataTypeAliTreeR;
1119 /** 16 bit Hardware address selection data specification, origin is 'any'
1120 * @ingroup alihlt_component_datatypes
1122 extern const AliHLTComponentDataType kAliHLTDataTypeHwAddr16;
1124 /** Event statistics
1125 * @ingroup alihlt_component_datatypes
1127 extern const AliHLTComponentDataType kAliHLTDataTypeEventStatistics;
1130 * @ingroup alihlt_component_datatypes
1132 extern const AliHLTComponentDataType kAliHLTDataTypeEventSummary;
1134 /** Event statistics
1135 * @ingroup alihlt_component_datatypes
1137 extern const AliHLTComponentDataType kAliHLTDataTypeRunStatistics;
1140 * @ingroup alihlt_component_datatypes
1142 extern const AliHLTComponentDataType kAliHLTDataTypeRunSummary;
1144 /** Trigger decision
1145 * - origin : kAliHLTDataOriginOut ( HLT )
1146 * @ingroup alihlt_component_datatypes
1148 extern const AliHLTComponentDataType kAliHLTDataTypeTriggerDecision; // {TRIG_DEC:HLT }
1150 /** Trigger decision
1151 * - origin : kAliHLTDataOriginOut ( HLT )
1152 * @ingroup alihlt_component_datatypes
1154 extern const AliHLTComponentDataType kAliHLTDataTypeReadoutList; // {HLTRDLST:HLT }
1156 /** Global trigger decision
1157 * - origin : kAliHLTDataOriginOut ( HLT )
1158 * @ingroup alihlt_component_datatypes
1160 extern const AliHLTComponentDataType kAliHLTDataTypeGlobalTrigger; // {GLOBTRIG:HLT }
1162 /** Component block statistics
1163 * @ingroup alihlt_component_datatypes
1165 extern const AliHLTComponentDataType kAliHLTDataTypeComponentStatistics;
1168 * To be sent on SOR event, each component adds it's chain id string
1169 * and a generated 32bit identifier to the table
1170 * @ingroup alihlt_component_datatypes
1172 extern const AliHLTComponentDataType kAliHLTDataTypeComponentTable;
1174 /** Forwarded component table
1175 * To be sent on SOR event, each component forwards blocks of type
1176 * @ref kAliHLTDataTypeComponentTable was kAliHLTDataTypeComponentFwdTable
1177 * after adding the parent ids to its own table struct.
1178 * @ingroup alihlt_component_datatypes
1180 extern const AliHLTComponentDataType kAliHLTDataTypeComponentFwdTable;
1183 * Data type for the Common Data Header and readout list information sent by TCPDumpSubscriber.
1184 * @ingroup alihlt_component_datatypes
1186 extern const AliHLTComponentDataType kAliHLTDataTypeTriggerMetaBlock; // {METADATA:PRIV}
1188 //////////////////////////////////////////////////////////////////////////
1190 // Data Types for Monitoring objects
1192 //////////////////////////////////////////////////////////////////////////
1194 /** general ROOT TObject
1195 * @ingroup alihlt_component_datatypes
1197 extern const AliHLTComponentDataType kAliHLTDataTypeTObject; // {ROOTTOBJ,"***"}
1199 /** ROOT streamer info
1200 * @ingroup alihlt_component_datatypes
1202 extern const AliHLTComponentDataType kAliHLTDataTypeStreamerInfo; // {ROOTSTRI,HLT }
1205 * @ingroup alihlt_component_datatypes
1207 extern const AliHLTComponentDataType kAliHLTDataTypeTObjArray; // {ROOTOBAR,"***"}
1210 * @ingroup alihlt_component_datatypes
1212 extern const AliHLTComponentDataType kAliHLTDataTypeTTree; // {ROOTTREE,"***"}
1214 /** ROOT TH1 (can be used for all histograms, they derive from TH1)
1215 * @ingroup alihlt_component_datatypes
1217 extern const AliHLTComponentDataType kAliHLTDataTypeHistogram; // {ROOTHIST,"***"}
1220 * @ingroup alihlt_component_datatypes
1222 extern const AliHLTComponentDataType kAliHLTDataTypeTNtuple; // {ROOTTUPL,"***"}
1224 /** Global input trigger counters.
1225 * - origin : kAliHLTDataOriginOut ( HLT )
1226 * @ingroup alihlt_component_datatypes
1228 extern const AliHLTComponentDataType kAliHLTDataTypeInputTriggerCounters; // {INTRGCNT:HLT }
1230 /** Global output trigger counters.
1231 * - origin : kAliHLTDataOriginOut ( HLT )
1232 * @ingroup alihlt_component_datatypes
1234 extern const AliHLTComponentDataType kAliHLTDataTypeOutputTriggerCounters; // {OTTRGCNT:HLT }
1236 /** General track array for the barrel tracks based on AliExternalTrackParam
1237 * Data format defined by AliHLTTracksData
1239 * We follow the naming scheme of AliESDEvent where 'Tracks' denote the
1240 * barrel tracks and detector tracks get names 'DETTracks'
1241 * @ingroup alihlt_component_datatypes
1243 extern const AliHLTComponentDataType kAliHLTDataTypeTrack; // {HLTTRACK,"***"}
1245 /** Track Monte Carlo information
1247 extern const AliHLTComponentDataType kAliHLTDataTypeTrackMC; // {TRACK_MC,"***"}
1249 /** TClonesArray of AliExternalTrackParam
1250 * @ingroup alihlt_component_datatypes
1252 extern const AliHLTComponentDataType kAliHLTDataTypeExternalTrackParam; // {TCAEXTTR,"***"}
1254 /** Container containing jets (AliHLTJETJets)
1255 * Containing TClonesArray of AliAODJets
1256 * @ingroup alihlt_component_datatypes
1258 extern const AliHLTComponentDataType kAliHLTDataTypeJet; // {HLTJETV0,"***"}
1260 /** Container of ITS tracks
1261 * @ingroup alihlt_component_datatypes
1263 extern const AliHLTComponentDataType fgkITSTracksDataType;
1265 /** Container of calorimeter clusters
1266 * @ingroup alihlt_component_datatypes
1268 extern const AliHLTComponentDataType kAliHLTDataTypeCaloCluster;
1270 /** Container of dEdx
1271 * @ingroup alihlt_component_datatypes
1273 extern const AliHLTComponentDataType kAliHLTDataTypedEdx;
1275 /** Container of dNdPt
1276 * @ingroup alihlt_component_datatypes
1278 extern const AliHLTComponentDataType kAliHLTDataTypedNdPt;
1280 //////////////////////////////////////////////////////////////////////////
1282 // FXS subscriber meta information
1284 //////////////////////////////////////////////////////////////////////////
1286 const int gkAliHLTFXSHeaderfOriginSize = 4;
1287 const int gkAliHLTFXSHeaderfFileIDSize = 128;
1288 const int gkAliHLTFXSHeaderfDDLNumberSize = 64;
1290 /** Header in front of the data payload, in order to sent data to the FXS. */
1291 struct AliHLTFXSHeader
1293 AliHLTUInt32_t fHeaderVersion; /// HLT software version number.
1294 AliHLTUInt32_t fRunNumber; /// The current run number.
1295 char fOrigin[gkAliHLTFXSHeaderfOriginSize]; /// The detector from which the FXS data is received.
1296 char fFileID[gkAliHLTFXSHeaderfFileIDSize]; /// File identifier for the stored data.
1297 char fDDLNumber[gkAliHLTFXSHeaderfDDLNumberSize]; /// The DDL bits.
1300 //////////////////////////////////////////////////////////////////////////
1302 // Component running environment
1304 //////////////////////////////////////////////////////////////////////////
1306 /** definition of a void fct pointer */
1307 typedef void (*AliHLTfctVoid)();
1309 /** logging function */
1310 typedef int (*AliHLTfctLogging)( void* param,
1311 AliHLTComponentLogSeverity severity,
1313 const char* keyword,
1314 const char* message);
1317 * @struct AliHLTAnalysisEnvironment
1318 * Running environment for analysis components.
1319 * The struct describes function callbacks for actions to be
1320 * carried out by the calling framework, like memory allocation,
1321 * property callbecks, logging, etc.
1323 * @ingroup alihlt_wrapper_interface
1325 struct AliHLTAnalysisEnvironment
1327 /** size of the structure */
1328 AliHLTUInt32_t fStructSize;
1330 /** the component parameter given by the framework on creation */
1333 /** allocated memory */
1334 void* (*fAllocMemoryFunc)( void* param, unsigned long size );
1336 /** allocate an EventDoneData structure. */
1337 int (*fGetEventDoneDataFunc)( void* param, AliHLTEventID_t eventID, unsigned long size, AliHLTComponentEventDoneData** edd );
1339 /** logging callback */
1340 AliHLTfctLogging fLoggingFunc;
1343 // I just keep this as a note pad. Has to be added to the end of the structure
1344 // future addition already foreseen/envisioned
1345 // IMPORTANT: don not just remove the defines as this breaks the binary
1347 int (*fAllocShmMemoryFunc)( void* param, unsigned long size, AliHLTComponentBlockData* blockLocation );
1351 * @struct AliHLTComponentEnvironment
1352 * This was the original definition of the running environment.
1353 * Due to a bug in the AliRootWrapperSubscriber/SimpleComponentWrapper,
1354 * this structure can not be used any longer but is kept for backward
1356 * @note The external interface provided by the libHLTbase is now kept
1357 * frozen but should not be used any more. Use the interface provided
1358 * by the libHLTinterface library.
1360 * @ingroup alihlt_wrapper_interface_deprecated
1362 struct AliHLTComponentEnvironment
1364 AliHLTUInt32_t fStructSize;
1366 void* (*fAllocMemoryFunc)( void* param, unsigned long size );
1367 int (*fGetEventDoneDataFunc)( void* param, AliHLTEventID_t eventID, unsigned long size, AliHLTComponentEventDoneData** edd );
1368 AliHLTfctLogging fLoggingFunc;
1371 //////////////////////////////////////////////////////////////////////////
1373 // The external interface definition
1375 //////////////////////////////////////////////////////////////////////////
1378 * The component handle.
1379 * Used as indification in the outside world.
1380 * @ingroup alihlt_wrapper_interface
1382 typedef void* AliHLTComponentHandle;
1384 /** @ingroup alihlt_wrapper_interface */
1385 const AliHLTComponentHandle kEmptyHLTComponentHandle = 0;
1388 * Get a system call of the interface.
1389 * @param function signature
1390 * @return pointer to system call
1391 * @ingroup alihlt_wrapper_interface
1393 typedef void* (*AliHLTAnalysisFctGetInterfaceCall)(const char*);
1395 # define ALIHLTANALYSIS_INTERFACE_LIBRARY "libHLTinterface.so"
1396 # define ALIHLTANALYSIS_FCT_GETINTERFACECALL "AliHLTAnalysisGetInterfaceCall"
1398 /** @ingroup alihlt_wrapper_interface */
1399 typedef int (*AliHLTExtFctInitSystem)( unsigned long version, AliHLTAnalysisEnvironment* externalEnv, unsigned long runNo, const char* runType );
1401 /** @ingroup alihlt_wrapper_interface */
1402 typedef int (*AliHLTExtFctDeinitSystem)();
1404 /** @ingroup alihlt_wrapper_interface */
1405 typedef int (*AliHLTExtFctLoadLibrary)( const char* );
1407 /** @ingroup alihlt_wrapper_interface */
1408 typedef int (*AliHLTExtFctUnloadLibrary)( const char* );
1410 /** @ingroup alihlt_wrapper_interface */
1411 typedef int (*AliHLTExtFctCreateComponent)( const char*, void*, int, const char**, AliHLTComponentHandle*, const char* description );
1413 /** @ingroup alihlt_wrapper_interface */
1414 typedef int (*AliHLTExtFctDestroyComponent)( AliHLTComponentHandle );
1416 /** @ingroup alihlt_wrapper_interface */
1417 typedef int (*AliHLTExtFctProcessEvent)( AliHLTComponentHandle, const AliHLTComponentEventData*, const AliHLTComponentBlockData*,
1418 AliHLTComponentTriggerData*, AliHLTUInt8_t*,
1419 AliHLTUInt32_t*, AliHLTUInt32_t*,
1420 AliHLTComponentBlockData**,
1421 AliHLTComponentEventDoneData** );
1423 /** @ingroup alihlt_wrapper_interface */
1424 typedef int (*AliHLTExtFctGetOutputDataType)( AliHLTComponentHandle, AliHLTComponentDataType* );
1426 /** @ingroup alihlt_wrapper_interface */
1427 typedef int (*AliHLTExtFctGetOutputSize)( AliHLTComponentHandle, unsigned long*, double* );
1431 using namespace std;
1433 //////////////////////////////////////////////////////////////////////////
1435 // Data type helper functions
1437 //////////////////////////////////////////////////////////////////////////
1439 /** exact comparison of HLT component data types
1440 * @ingroup alihlt_component_datatypes
1442 inline bool MatchExactly( const AliHLTComponentDataType& dt1, const AliHLTComponentDataType& dt2 )
1444 for ( int i = 0; i < kAliHLTComponentDataTypefIDsize; i++ )
1445 if ( dt1.fID[i] != dt2.fID[i] )
1447 for ( int i = 0; i < kAliHLTComponentDataTypefOriginSize; i++ )
1448 if ( dt1.fOrigin[i] != dt2.fOrigin[i] )
1453 /** Comparison operator for HLT component data types.
1454 * The operator takes wildcards into account, i.e. the ::kAliHLTAnyDataType,
1455 * ::kAliHLTAnyDataTypeID and ::kAliHLTDataOriginAny definitions.
1456 * @ingroup alihlt_component_datatypes
1458 inline bool operator==( const AliHLTComponentDataType& dt1, const AliHLTComponentDataType& dt2 )
1460 if (MatchExactly(dt1, kAliHLTAllDataTypes)) return true;
1461 if (MatchExactly(dt2, kAliHLTAllDataTypes)) return true;
1463 bool any1=true, any2=true, void1=true, void2=true, match=true;
1464 for ( int i = 0; i < kAliHLTComponentDataTypefOriginSize; i++ ) {
1465 any1&=(dt1.fOrigin[i]==kAliHLTDataOriginAny[i]);
1466 any2&=(dt2.fOrigin[i]==kAliHLTDataOriginAny[i]);
1467 void1&=(dt1.fOrigin[i]==kAliHLTDataOriginVoid[i]);
1468 void2&=(dt2.fOrigin[i]==kAliHLTDataOriginVoid[i]);
1469 match&=dt1.fOrigin[i]==dt2.fOrigin[i];
1470 if (!(match || (any2 && !void1) || (any1 && !void2)))
1474 any1=true, any2=true, match=true;
1475 for ( int i = 0; i < kAliHLTComponentDataTypefIDsize; i++ ) {
1476 any1&=(dt1.fID[i]==kAliHLTAnyDataTypeID[i]);
1477 any2&=(dt2.fID[i]==kAliHLTAnyDataTypeID[i]);
1478 void1&=(dt1.fID[i]==kAliHLTVoidDataTypeID[i]);
1479 void2&=(dt2.fID[i]==kAliHLTVoidDataTypeID[i]);
1480 match&=dt1.fID[i]==dt2.fID[i];
1481 if (!(match || (any2 && !void1) || (any1 && !void2)))
1487 /** Comparison operator for HLT component data types
1488 * Invers of operator==
1489 * @ingroup alihlt_component_datatypes
1491 inline bool operator!=( const AliHLTComponentDataType& dt1, const AliHLTComponentDataType& dt2 )
1496 /** merge operator for HLT component data types and origins
1497 * @ingroup alihlt_component_datatypes
1499 inline AliHLTComponentDataType operator|(const AliHLTComponentDataType srcdt, const char origin[kAliHLTComponentDataTypefOriginSize])
1501 AliHLTComponentDataType dt=srcdt;
1502 for ( int i = 0; i < kAliHLTComponentDataTypefOriginSize; i++ )
1503 dt.fOrigin[i]=origin[i];
1508 * Helper function to initialize a data type from an id char array and origin string.
1509 * @return data type structure initialized with the specified id and origin
1510 * @ingroup alihlt_component_datatypes
1512 inline AliHLTComponentDataType AliHLTComponentDataTypeInitializer(const char id[kAliHLTComponentDataTypefIDsize], const char* origin)
1514 AliHLTComponentDataType dt=kAliHLTVoidDataType;
1516 for (i = 0; i < kAliHLTComponentDataTypefIDsize && id[i]!=0; i++)
1518 for (i = 0; i < kAliHLTComponentDataTypefOriginSize && origin[i]!=0; i++ )
1519 dt.fOrigin[i]=origin[i];
1524 * Helper function to initialize a data type from a default data type and
1525 * an origin string. Basically it merges the specified origin into the data
1527 * @return data type structure initialized with the id from specified data type
1529 * @ingroup alihlt_component_datatypes
1531 inline AliHLTComponentDataType AliHLTComponentDataTypeInitializer(const AliHLTComponentDataType src, const char* origin)
1533 return AliHLTComponentDataTypeInitializer(src.fID, origin);