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.
71 #define ALIHLT_DATA_TYPES_VERSION 15
73 //////////////////////////////////////////////////////////////////////////
75 // HLT data origin variables.
77 // By converting from defines to variables, the origins can be used with
80 // AliHLTComponentDataType dt;
81 // dt = kAliHLTDataTypeDDLRaw | kAliHLTDataOriginTPC;
83 //////////////////////////////////////////////////////////////////////////
85 /** field size of datat type origin
86 * @ingroup alihlt_component_datatypes
88 const int kAliHLTComponentDataTypefOriginSize=4;
91 /** invalid data origin
92 * @ingroup alihlt_component_datatypes
94 # define kAliHLTDataOriginVoid "\0\0\0"
95 /** old invalid data origin, kept for backward compatibility */
96 # define kAliHLTVoidDataOrigin "\0\0\0"
98 /** wildcard data type origin
99 * @ingroup alihlt_component_datatypes
101 # define kAliHLTDataOriginAny "***"
102 /** old wildcard data type origin, kept for backward compatibility */
103 # define kAliHLTAnyDataOrigin "***"
105 /** Data origin HLT out
106 * @ingroup alihlt_component_datatypes
108 extern const char kAliHLTDataOriginOut[kAliHLTComponentDataTypefOriginSize];
110 /** Data origin HLT, used for HLT specifc data
111 * in offline chains. This not a bug!
112 * @ingroup alihlt_component_datatypes
114 extern const char kAliHLTDataOriginHLT[kAliHLTComponentDataTypefOriginSize];
116 /** Data origin Offline
117 * @ingroup alihlt_component_datatypes
119 extern const char kAliHLTDataOriginOffline[kAliHLTComponentDataTypefOriginSize];
121 /** Data origin HLT/PubSub private internal
122 * @ingroup alihlt_component_datatypes
124 extern const char kAliHLTDataOriginPrivate[kAliHLTComponentDataTypefOriginSize];
127 * @ingroup alihlt_component_datatypes
129 extern const char kAliHLTDataOriginTPC[kAliHLTComponentDataTypefOriginSize];
132 * @ingroup alihlt_component_datatypes
134 extern const char kAliHLTDataOriginPHOS[kAliHLTComponentDataTypefOriginSize];
137 * @ingroup alihlt_component_datatypes
139 extern const char kAliHLTDataOriginFMD[kAliHLTComponentDataTypefOriginSize];
142 * @ingroup alihlt_component_datatypes
144 extern const char kAliHLTDataOriginMUON[kAliHLTComponentDataTypefOriginSize];
147 * @ingroup alihlt_component_datatypes
149 extern const char kAliHLTDataOriginTRD[kAliHLTComponentDataTypefOriginSize];
152 * @ingroup alihlt_component_datatypes
154 extern const char kAliHLTDataOriginITS[kAliHLTComponentDataTypefOriginSize];
156 /** Data origin ITSOut
157 * @ingroup alihlt_component_datatypes
159 extern const char kAliHLTDataOriginITSOut[kAliHLTComponentDataTypefOriginSize];
161 /** Data origin ITS SPD
162 * @ingroup alihlt_component_datatypes
164 extern const char kAliHLTDataOriginITSSPD[kAliHLTComponentDataTypefOriginSize];
166 /** Data origin ITS SDD
167 * @ingroup alihlt_component_datatypes
169 extern const char kAliHLTDataOriginITSSDD[kAliHLTComponentDataTypefOriginSize];
171 /** Data origin ITS SSD
172 * @ingroup alihlt_component_datatypes
174 extern const char kAliHLTDataOriginITSSSD[kAliHLTComponentDataTypefOriginSize];
176 /** Data origin for examples
177 * @ingroup alihlt_component_datatypes
179 extern const char kAliHLTDataOriginSample[kAliHLTComponentDataTypefOriginSize];
181 /** Data origin EMCAL
182 * @ingroup alihlt_component_datatypes
184 extern const char kAliHLTDataOriginEMCAL[kAliHLTComponentDataTypefOriginSize];
187 * @ingroup alihlt_component_datatypes
189 extern const char kAliHLTDataOriginTOF[kAliHLTComponentDataTypefOriginSize];
191 /** Data origin HMPID
192 * @ingroup alihlt_component_datatypes
194 extern const char kAliHLTDataOriginHMPID[kAliHLTComponentDataTypefOriginSize];
197 * @ingroup alihlt_component_datatypes
199 extern const char kAliHLTDataOriginCPV[kAliHLTComponentDataTypefOriginSize];
202 * @ingroup alihlt_component_datatypes
204 extern const char kAliHLTDataOriginPMD[kAliHLTComponentDataTypefOriginSize];
207 * @ingroup alihlt_component_datatypes
209 extern const char kAliHLTDataOriginT0[kAliHLTComponentDataTypefOriginSize];
211 /** Data origin VZERO
212 * @ingroup alihlt_component_datatypes
214 extern const char kAliHLTDataOriginVZERO[kAliHLTComponentDataTypefOriginSize];
217 * @ingroup alihlt_component_datatypes
219 extern const char kAliHLTDataOriginZDC[kAliHLTComponentDataTypefOriginSize];
221 /** Data origin ACORDE
222 * @ingroup alihlt_component_datatypes
225 extern const char kAliHLTDataOriginACORDE[kAliHLTComponentDataTypefOriginSize];
228 * @ingroup alihlt_component_datatypes
230 extern const char kAliHLTDataOriginTRG[kAliHLTComponentDataTypefOriginSize];
232 //////////////////////////////////////////////////////////////////////////
234 // HLT common data type defines
236 //////////////////////////////////////////////////////////////////////////
238 /** field size of data type id
239 * @ingroup alihlt_component_datatypes
241 const int kAliHLTComponentDataTypefIDsize=8;
244 /** invalid data type id
245 * @ingroup alihlt_component_datatypes
247 # define kAliHLTVoidDataTypeID "\0\0\0\0\0\0\0"
249 /** special id for all data types: any + void
250 * @ingroup alihlt_component_datatypes
252 # define kAliHLTAllDataTypesID "ALLDATA"
254 /** special id for any valid data type id
255 * @ingroup alihlt_component_datatypes
257 # define kAliHLTAnyDataTypeID "*******"
260 * @ingroup alihlt_component_datatypes
262 # define kAliHLTDDLRawDataTypeID {'D','D','L','_','R','A','W',' '}
265 * Common data type for the output of cluster finders, the exact
266 * format depends on the origin (detector)
267 * @ingroup alihlt_component_datatypes
269 # define kAliHLTClustersDataTypeID {'C','L','U','S','T','E','R','S'}
271 /** calibration data for file exchange subscriber
272 * @ingroup alihlt_component_datatypes
274 # define kAliHLTFXSCalibDataTypeID {'F','X','S','_','C','A','L',' '}
276 /** start of run (SOR) event
278 * @ingroup alihlt_component_datatypes
280 # define kAliHLTSORDataTypeID {'S','T','A','R','T','O','F','R'}
282 /** end of run (EOR) event
284 * @ingroup alihlt_component_datatypes
286 # define kAliHLTEORDataTypeID {'E','N','D','O','F','R','U','N'}
288 /** run type data block
289 * string with run type as payload
290 * @ingroup alihlt_component_datatypes
292 # define kAliHLTRunTypeDataTypeID {'R','U','N','T','Y','P','E',' '}
295 * @ref AliHLTEventDDL
296 * @ingroup alihlt_component_datatypes
298 # define kAliHLTDDLDataTypeID {'D','D','L','L','I','S','T',' '}
301 * @ingroup alihlt_component_datatypes
303 # define kAliHLTDAQRDOUTDataTypeID "DAQRDOUT"
305 /** HLT readout list.
306 * @ingroup alihlt_component_datatypes
308 # define kAliHLTReadoutListDataTypeID {'H','L','T','R','D','L','S','T'}
311 * - empty payload, specification gives eventType
312 * @ingroup alihlt_component_datatypes
314 # define kAliHLTEventDataTypeID {'E','V','E','N','T','T','Y','P'}
316 /** ECS parameter event
317 * - sent during the SOR event by the framework
318 * - contains the full ECS parameter string
319 * @ingroup alihlt_component_datatypes
321 # define kAliHLTECSParamDataTypeID {'E','C','S','P','A','R','A','M'}
323 /** ComponentConfiguration event
324 * - payload contains the CDB path as string
325 * @ingroup alihlt_component_datatypes
327 # define kAliHLTComConfDataTypeID {'C','O','M','_','C','O','N','F'}
329 /** DCS value update event
330 * - payload contains string of relevant detectors
331 * @ingroup alihlt_component_datatypes
333 # define kAliHLTUpdtDCSDataTypeID {'U','P','D','T','_','D','C','S'}
336 * an AliMCEvent object of varying origin
337 * The 'V0' at the end allows a versioning
338 * @ingroup alihlt_component_datatypes
340 # define kAliHLTMCObjectDataTypeID {'A','L','I','M','C','_','V','0'}
342 /** ESDVertex data block
343 * an AliESDVertex object of varying origin
344 * The 'V0' at the end allows a versioning
345 * @ingroup alihlt_component_datatypes
347 # define kAliHLTESDVertexDataTypeID {'E','S','D','V','T','X','V','0'}
349 /** KFVertex data block
350 * an AliKFVertex object of varying origin
351 * The 'V0' at the end allows a versioning
352 * @ingroup alihlt_component_datatypes
354 # define kAliHLTKFVertexDataTypeID {'A','L','I','K','F','V','V','0'}
357 /** output of the GlobalVertexer data block
358 * The 'V0' at the end allows a versioning
359 * @ingroup alihlt_component_datatypes
361 # define kAliHLTDataTypeGlobalVertexerID {'G','L','B','V','T','X','V','0'}
363 /** output of the PrimaryFinder data block
364 * The 'V0' at the end allows a versioning
365 * @ingroup alihlt_component_datatypes
367 # define kAliHLTDataTypePrimaryFinderID {'P','R','I','V','T','X','V','0'}
369 /** output of the V0Finder data block
370 * The 'V0' at the end allows a versioning
371 * @ingroup alihlt_component_datatypes
373 # define kAliHLTDataTypeV0FinderID {'V','0','S','V','T','X','V','0'}
376 * an AliESD object of varying origin
377 * The 'V0' at the end allows a versioning
378 * @ingroup alihlt_component_datatypes
380 # define kAliHLTESDObjectDataTypeID {'A','L','I','E','S','D','V','0'}
383 * data blocks designated for the ESD
384 * @ingroup alihlt_component_datatypes
386 # define kAliHLTESDContentDataTypeID {'E','S','D','_','C','O','N','T'}
388 /** ESD tree data block
389 * TTree with an AliESD object of varying origin
390 * @ingroup alihlt_component_datatypes
392 # define kAliHLTESDTreeDataTypeID {'E','S','D','_','T','R','E','E'}
395 * - the digits tree of an AliRoot module
396 * @ingroup alihlt_component_datatypes
398 #define kAliHLTTreeDDataTypeID {'A','L','I','T','R','E','E','D'}
401 * - the rec points tree of an AliRoot module
402 * @ingroup alihlt_component_datatypes
404 #define kAliHLTTreeRDataTypeID {'A','L','I','T','R','E','E','R'}
406 /** HW Address selection data block
407 * - a selection list for 16 bit HW addresses
409 * @ingroup alihlt_component_datatypes
411 # define kAliHLTHwAddr16DataTypeID {'H','W','A','D','D','R','1','6'}
414 * - event statistics for given detectors
416 * @ingroup alihlt_component_datatypes
418 # define kAliHLTEventStatisticsDataTypeID {'E','V','_','S','T','A','T','I'}
422 * - origin : kAliHLTDataOriginOut ( HLT )
423 * @ingroup alihlt_component_datatypes
425 # define kAliHLTEventSummaryDataTypeID {'E','V','_','S','U','M','M','A'}
428 * - run statistics for given detectors
430 * @ingroup alihlt_component_datatypes
432 # define kAliHLTRunStatisticsDataTypeID {'R','U','N','S','T','A','T','I'}
436 * - origin : kAliHLTDataOriginOut ( HLT )
437 * @ingroup alihlt_component_datatypes
439 # define kAliHLTRunSummaryDataTypeID {'R','U','N','S','U','M','M','A'}
442 * - origin : kAliHLTDataOriginOut ( HLT )
443 * @ingroup alihlt_component_datatypes
445 # define kAliHLTTriggerDecisionDataTypeID {'T','R','I','G','_','D','E','C'}
447 /** Global trigger decision
448 * - origin : kAliHLTDataOriginOut ( HLT )
449 * @ingroup alihlt_component_datatypes
451 # define kAliHLTGlobalTriggerDataTypeID {'G','L','O','B','T','R','I','G'}
454 * - small block statistics info added to the data stream by
455 * the component base class
456 * - origin kAliHLTDataOriginPrivate
457 * @ingroup alihlt_component_datatypes
459 # define kAliHLTComponentStatisticsDataTypeID {'C','O','M','P','S','T','A','T'}
462 * - list of components in the chain to be percolated through the chain
463 * - each component adds it's chain id string and a generated 32bit id
464 * @ingroup alihlt_component_datatypes
466 # define kAliHLTComponentTableDataTypeID {'C','O','M','P','T','A','B','L'}
468 /** Forwarded component table
469 * @ingroup alihlt_component_datatypes
471 # define kAliHLTComponentFwdTableDataTypeID {'C','O','M','P','T','A','B','F'}
473 /** general ROOT TObject
474 * - a general TObject exported from the HLT analysis
476 * @ingroup alihlt_component_datatypes
478 #define kAliHLTTObjectDataTypeID {'R','O','O','T','T','O','B','J'}
480 /** ROOT streamer info
481 * - used for the transmission of streamer info for objects in the HLTOUT
482 * - origin kAliHLTDataOriginOut ( HLT )
483 * @ingroup alihlt_component_datatypes
485 #define kAliHLTStreamerInfoDataTypeID {'R','O','O','T','S','T','R','I'}
488 * - a TObjArray exported from the HLT analysis
490 * @ingroup alihlt_component_datatypes
492 #define kAliHLTTObjArrayDataTypeID {'R','O','O','T','O','B','A','R'}
495 * - a TTree object exported from the HLT analysis
497 * @ingroup alihlt_component_datatypes
499 #define kAliHLTTTreeDataTypeID {'R','O','O','T','T','R','E','E'}
502 * - a histogram object exported from the HLT analysis
503 * - class derives from TH1 (directly or indirectly) and inherits all common functionality
505 * @ingroup alihlt_component_datatypes
507 #define kAliHLTHistogramDataTypeID {'R','O','O','T','H','I','S','T'}
510 * - a TNtupl object exported from the HLT analysis
512 * @ingroup alihlt_component_datatypes
514 #define kAliHLTTNtupleDataTypeID {'R','O','O','T','T','U','P','L'}
517 * - Struct for Tracks based on AliExternalTrackParam
519 * @ingroup alihlt_component_datatypes
521 #define kAliHLTTrackDataTypeID {'H','L','T','T','R','A','C','K'}
523 /** Track Monte Carlo information
524 * @ingroup alihlt_component_datatypes
526 #define kAliHLTTrackMCDataTypeID {'T','R','A','C','K','_','M','C'}
528 /** TClonesArray of AliExternalTrackParam
529 * @ingroup alihlt_component_datatypes
531 #define kAliHLTExternalTrackParamDataTypeID {'T','C','A','E','X','T','T','R'}
534 * - Struct for jets based on AliHLTJETJets
536 * @ingroup alihlt_component_datatypes
538 #define kAliHLTJetDataTypeID {'H','L','T','J','E','T','V','0'}
541 * Common data type for the dEdx
542 * format depends on the origin (detector)
543 * @ingroup alihlt_component_datatypes
545 # define kAliHLTdEdxDataTypeID {'D','E','D','X',' ',' ',' ',' '}
548 * Common data type for the dNdPt output object
549 * @ingroup alihlt_component_datatypes
551 # define kAliHLTdNdPtDataTypeID {'D','N','D','P','T',' ',' ',' '}
553 /** Global input trigger counters data block type.
554 * @ingroup alihlt_component_datatypes
556 # define kAliHLTInputTriggerCountersDataTypeID {'I','N','T','R','G','C','N','T'}
558 /** Global output trigger counters data block type.
559 * @ingroup alihlt_component_datatypes
561 # define kAliHLTOutputTriggerCountersDataTypeID {'O','T','T','R','G','C','N','T'}
566 //////////////////////////////////////////////////////////////////////////
568 // Basic HLT data types
570 //////////////////////////////////////////////////////////////////////////
572 typedef unsigned char AliHLTUInt8_t;
574 typedef signed char AliHLTInt8_t;
576 typedef unsigned short AliHLTUInt16_t;
578 typedef signed short AliHLTInt16_t;
580 typedef unsigned int AliHLTUInt32_t;
582 typedef signed int AliHLTInt32_t;
584 typedef unsigned long long AliHLTUInt64_t;
586 typedef signed long long AliHLTInt64_t;
588 typedef float AliHLTFloat32_t;
590 typedef double AliHLTFloat64_t;
592 typedef AliHLTUInt64_t AliHLTEventID_t;
594 //////////////////////////////////////////////////////////////////////////
596 // HLT logging levels
598 //////////////////////////////////////////////////////////////////////////
601 * Logging severities of the HLT
603 enum AliHLTComponentLogSeverity {
606 /** benchmark messages */
607 kHLTLogBenchmark = 0x1,
608 /** debug messages */
612 /** warning messages */
613 kHLTLogWarning = 0x8,
614 /** error messages */
616 /** fatal error messages */
618 /** few important messages not to be filtered out.
619 * redirected to kHLTLogInfo in AliRoot
621 kHLTLogImportant = 0x40,
622 /** special value to enable all messages */
624 /** the default logging filter */
625 kHLTLogDefault = 0x79
628 //////////////////////////////////////////////////////////////////////////
630 // HLT data structures for data exchange and external interface
632 //////////////////////////////////////////////////////////////////////////
635 * @struct AliHLTComponentEventData
638 struct AliHLTComponentEventData
640 AliHLTUInt32_t fStructSize; /// Size of this structure in bytes.
641 AliHLTEventID_t fEventID; /// 64 bit event ID number.
642 AliHLTUInt32_t fEventCreation_s; /// Event creation time in seconds (Should be added to fEventCreation_us*1e6).
643 AliHLTUInt32_t fEventCreation_us; /// Fractional event creation time in micro seconds.
644 AliHLTUInt32_t fBlockCnt; /// The number of raw data blocks received by the component.
648 * @struct AliHLTComponentShmData
649 * Shared memory descriptor.
650 * Irrelevant for analysis components.
652 struct AliHLTComponentShmData
654 AliHLTUInt32_t fStructSize; /// Size of this structure in bytes.
655 AliHLTUInt32_t fShmType; /// The type code of the shared memory.
656 AliHLTUInt64_t fShmID; /// The shared memory identifier.
660 * @defgroup alihlt_component_datatypes Common Component Data Types
661 * The analysis framework defines a number of common data types for
662 * usage in the detector modules, like e.g. ::kAliHLTAnyDataType
663 * and ::kAliHLTDataTypeDDLRaw. Those data types always have
664 * origin ::kAliHLTDataOriginAny. The correct detector origin can be
665 * set by using operator '|'
667 * AliHLTComponentDataType dt=kAliHLTDDLRawDataTypeID|kAliHLTDataOriginTPC
669 * @ingroup alihlt_component
673 * @struct AliHLTComponentDataType
674 * Data type descriptor for data blocks transferred through the processing
676 * @ingroup alihlt_component_datatypes
678 struct AliHLTComponentDataType
680 AliHLTUInt32_t fStructSize; /// Size of this structure in bytes.
681 char fID[kAliHLTComponentDataTypefIDsize]; /// Data type identifier.
682 char fOrigin[kAliHLTComponentDataTypefOriginSize]; /// Subsystem or detector origin of the data.
686 * @struct AliHLTComponentBlockData
687 * This is the decription of data blocks exchanged between components.
688 * \b IMPORTANT: The validity of fPtr and fOffset is different for input and
690 * - input blocks: The \em fPtr member always points to the beginning of the data
691 * of size \em fSize. fOffset is ignored and should be in most
693 * - output blocks: The \em fPtr member is ignored by the framework. \em fOffset
694 * must specify the start of the data relative to the output
695 * buffer. The data block has size \em fSize.
697 struct AliHLTComponentBlockData
699 /** size and version of the struct */
700 AliHLTUInt32_t fStructSize;
701 /** shared memory key, ignored by processing components */
702 AliHLTComponentShmData fShmKey;
703 /** offset of output data relative to the output buffer */
704 AliHLTUInt32_t fOffset;
705 /** start of the data for input data blocks, fOffset to be ignored*/
707 /** size of the data block */
708 AliHLTUInt32_t fSize;
709 /** data type of the data block */
710 AliHLTComponentDataType fDataType;
711 /** data specification of the data block */
712 AliHLTUInt32_t fSpecification;
716 * @struct AliHLTComponentEventDoneData
719 struct AliHLTComponentEventDoneData
721 AliHLTUInt32_t fStructSize; /// Size of this structure in bytes.
722 AliHLTUInt32_t fDataSize; /// Size of the data section (following this data member) in bytes.
723 void* fData; /// Start of the data section.
727 * @struct AliHLTRunDesc
729 * The struct is sent with the SOR and EOR events.
732 * The name of the member fRunType is a bit misleading. This is not
733 * the ALICE Run Type given by the ECS to the sub-system. The member
734 * is an internal HLT run type and a combination of the HLT running
735 * mode and the beam type.
737 * Bit 0-2: beam type identifier
743 AliHLTUInt32_t fStructSize; /// Size of this structure in bytes.
744 AliHLTUInt32_t fRunNo; /// The run number for the current active run.
745 AliHLTUInt32_t fRunType; /// The HLT run type.
749 * @struct AliHLTComponentStatistics
750 * Small block size summary added by the AliHLTComponent base class
751 * if component statistics are enabled (--enable-compstat).
753 * fLevel is retrieved from incoming block statistics and incremented.
754 * Incoming block statistics are appended to the newly added one if
755 * --enable-compstat=full has been chosen.
758 * 2009-01-14 fComponentCycleTime added
760 struct AliHLTComponentStatistics
762 AliHLTUInt32_t fStructSize; /// Size of this structure in bytes.
763 AliHLTUInt32_t fLevel; /// Indicates from which processing stage this information is from.
764 AliHLTUInt32_t fId; /// Unique identifier for the chain based on CRC code.
765 AliHLTUInt32_t fTime; /// Real wall time used to process the data (micro seconds).
766 AliHLTUInt32_t fCTime; /// CPU time used to process the data (micro seconds).
767 AliHLTUInt32_t fInputBlockCount; /// Number of input data blocks.
768 AliHLTUInt32_t fTotalInputSize; /// Total size in bytes of input data.
769 AliHLTUInt32_t fOutputBlockCount; /// Number of output data blocks.
770 AliHLTUInt32_t fTotalOutputSize; /// Total size in bytes of output data.
771 AliHLTUInt32_t fComponentCycleTime; /// Real wall time indicating the start of the data processing (micro seconds).
775 * @struct AliHLTComponentTableEntry
776 * Structure to be send on SOR event through the chain.
777 * The 'length' of the structure is variable and depends on the length
778 * of the buffer at the end.
780 * ComponentTableEntries are sent with data type @ref kAliHLTDataTypeComponentTable
781 * and are identified by a 32bit Id specification generated by a CRC
782 * algorithm from the chain Id of the component. This is not a 100% unique
783 * id but with a high probability. This approach accounts for the fact
784 * that all components are separated processes.
786 * The buffer consists of an array of 32bit Ids containing the Ids of
787 * all direct parents taken from the specification of the data blocks.
788 * The number of parents is stored in fNofParents. Each component forwards the
789 * incoming component table entries with data type @ref kAliHLTDataTypeComponentFwdTable
790 * by that the direct parents can be identified.
792 * Following this array a description string contains the chain id, component args, and
793 * maybe more properties in the future. The current format is
794 * 'chain_id{component_id:component args}' e.g. TPC-CF_00_0{TPCClusterFinder32Bit:-deconvolute-time}
796 struct AliHLTComponentTableEntry
798 AliHLTUInt32_t fStructSize; /// Size of this structure in bytes.
799 AliHLTUInt32_t fLevel; /// Indicates from which processing stage this information is from.
800 AliHLTUInt16_t fNofParents; /// size of the array of parent ids
801 AliHLTUInt8_t fSizeDescription; /// size of the description string in the appended buffer
802 AliHLTUInt8_t fBuffer[1]; /// the strings: chain id, component args, reserved
805 //////////////////////////////////////////////////////////////////////////
807 // Trigger meta information
809 //////////////////////////////////////////////////////////////////////////
811 /** field size of fAttribute */
812 const int gkAliHLTBlockDAttributeCount = 8;
814 /** field size of fCommonHeader */
815 const int gkAliHLTCommonHeaderCount = 8;
817 /** size of the DDL list first version */
818 const int gkAliHLTDDLListSizeV0 = 30;
820 /** size of the DDL list after DCAL added to EMCAL */
821 const int gkAliHLTDDLListSizeV1 = 31;
823 /** size of the DDL list */
824 const int gkAliHLTDDLListSize = gkAliHLTDDLListSizeV1;
826 /** Number of Trigger Classes of CTP in CDH */
827 const int gkNCTPTriggerClasses = 50;
830 * @struct AliHLTEventDDLV0
831 * First version of the DDL list event.
832 * The struct is send with the DDLLIST event.
833 * Used in the trigger structure for internal apperance of
834 * the DLLs as well as for the HLT readout list send to DAQ
835 * ( as DataType : kAliHLTDataTypeDDL )
837 struct AliHLTEventDDLV0
839 AliHLTUInt32_t fCount; /// Indicates the number of words in fList.
840 AliHLTUInt32_t fList[gkAliHLTDDLListSizeV0]; /// The list of DDL enable/disable bits.
844 * @struct AliHLTEventDDLV1
845 * DDL list event structure with extra word for DCAL bits.
847 struct AliHLTEventDDLV1
849 AliHLTUInt32_t fCount; /// Indicates the number of words in fList.
850 AliHLTUInt32_t fList[gkAliHLTDDLListSizeV1]; /// The list of DDL enable/disable bits.
854 * @typedef AliHLTEventDDL
855 * Current used default version of the AliHLTEventDDL structure.
857 typedef AliHLTEventDDLV1 AliHLTEventDDL;
860 * @struct AliHLTEventTriggerData
862 struct AliHLTEventTriggerData
864 AliHLTUInt8_t fAttributes[gkAliHLTBlockDAttributeCount]; /// List of data block attibutes.
865 AliHLTUInt64_t fHLTStatus; /// Bit field
866 AliHLTUInt32_t fCommonHeaderWordCnt; /// Number of words in fCommonHeader.
867 AliHLTUInt32_t fCommonHeader[gkAliHLTCommonHeaderCount]; /// The common header words.
870 AliHLTEventDDL fReadoutList; /// The default readout list structure.
871 AliHLTEventDDLV0 fReadoutListV0; /// Access to the old version of the readout list structure.
872 AliHLTEventDDLV1 fReadoutListV1; /// Access to the readout list structure with DCAL included.
877 * @struct AliHLTComponentTriggerData
880 struct AliHLTComponentTriggerData
882 AliHLTUInt32_t fStructSize; /// Size of this structure in bytes.
883 AliHLTUInt32_t fDataSize; /// Size of the data section (following this data member) in bytes.
884 void* fData; /// Start of the data section.
887 //////////////////////////////////////////////////////////////////////////
889 // HLT Event Type Specification
891 //////////////////////////////////////////////////////////////////////////
893 /** Unknown eventType specification */
894 const AliHLTUInt32_t gkAliEventTypeUnknown = ~(AliHLTUInt32_t)0;
895 /** SOR eventType specification */
896 const AliHLTUInt32_t gkAliEventTypeStartOfRun=1;
897 /** Data eventType specification */
898 const AliHLTUInt32_t gkAliEventTypeData=2;
899 /** EOR eventType specification */
900 const AliHLTUInt32_t gkAliEventTypeEndOfRun=4;
901 /** Corrupt eventType specification */
902 const AliHLTUInt32_t gkAliEventTypeCorruptID=8;
903 /** Calibration eventType specification */
904 const AliHLTUInt32_t gkAliEventTypeCalibration=16;
905 /** Software eventType specification */
906 const AliHLTUInt32_t gkAliEventTypeSoftware=24;
907 /** DataReplay eventType specification */
908 const AliHLTUInt32_t gkAliEventTypeDataReplay=32;
909 /** Configuration eventType specification */
910 const AliHLTUInt32_t gkAliEventTypeConfiguration=34;
911 /** Update DCS eventType specification */
912 const AliHLTUInt32_t gkAliEventTypeReadPreprocessor=35;
913 /** Tick eventType specification */
914 const AliHLTUInt32_t gkAliEventTypeTick=64;
915 /** Max eventType specification */
916 const AliHLTUInt32_t gkAliEventTypeMax=64;
918 //////////////////////////////////////////////////////////////////////////
920 // HLT defines and defaults
922 //////////////////////////////////////////////////////////////////////////
925 * @ingroup alihlt_component_datatypes
927 const AliHLTEventID_t kAliHLTVoidEventID=~(AliHLTEventID_t)0;
929 /** invalid data specification
930 * @ingroup alihlt_component_datatypes
932 const AliHLTUInt32_t kAliHLTVoidDataSpec = ~(AliHLTUInt32_t)0;
935 * @ingroup alihlt_component_datatypes
937 const AliHLTUInt32_t kAliHLTVoidRunNo = ~(AliHLTUInt32_t)0;
940 * @ingroup alihlt_component_datatypes
942 const AliHLTUInt32_t kAliHLTVoidRunType = ~(AliHLTUInt32_t)0;
944 /** invalid run descriptor
945 * @ingroup alihlt_component_datatypes
947 const AliHLTRunDesc kAliHLTVoidRunDesc={sizeof(AliHLTRunDesc), kAliHLTVoidRunNo, kAliHLTVoidRunType};
949 /** invalid shared memory type */
950 const AliHLTUInt32_t gkAliHLTComponentInvalidShmType = 0;
952 /** invalid shared memory id */
953 const AliHLTUInt64_t gkAliHLTComponentInvalidShmID = ~(AliHLTUInt64_t)0;
955 /** invalid data type
956 * @ingroup alihlt_component_datatypes
958 const AliHLTComponentDataType kAliHLTVoidDataType = {
959 sizeof(AliHLTComponentDataType),
960 kAliHLTVoidDataTypeID,
961 kAliHLTDataOriginVoid
964 /** all data types, means any + void data type
965 * @ingroup alihlt_component_datatypes
967 const AliHLTComponentDataType kAliHLTAllDataTypes = {
968 sizeof(AliHLTComponentDataType),
969 kAliHLTAllDataTypesID,
973 // there is currently a problem with rootcint if the predefined ids
974 // (commented below) are used. rootcint does not find the id if they
975 // are char arrays defined with {} and individual chars. If strings
976 // are used it works fine
978 * @ingroup alihlt_component_datatypes
980 const AliHLTComponentDataType kAliHLTAnyDataType = {
981 sizeof(AliHLTComponentDataType),
982 kAliHLTAnyDataTypeID,
986 /** multiple output data types
987 * @ingroup alihlt_component_datatypes
989 extern const AliHLTComponentDataType kAliHLTMultipleDataType;
991 /** data to file exchange subscriber
992 * @ingroup alihlt_component_datatypes
994 extern const AliHLTComponentDataType kAliHLTDataTypeFXSCalib;
996 /** DDL list data type
997 * @ingroup alihlt_component_datatypes
999 extern const AliHLTComponentDataType kAliHLTDataTypeDDL;
1001 /** DAQ readout list
1002 * @ingroup alihlt_component_datatypes
1004 extern const AliHLTComponentDataType kAliHLTDataTypeDAQRDOUT;
1007 * Common data type for the output of cluster finders, the exact
1008 * format depends on the origin (detector)
1009 * @ingroup alihlt_component_datatypes
1011 extern const AliHLTComponentDataType kAliHLTDataTypeClusters;
1014 * @ingroup alihlt_component_datatypes
1016 extern const AliHLTComponentDataType kAliHLTDataTypeSOR;
1019 * @ingroup alihlt_component_datatypes
1021 extern const AliHLTComponentDataType kAliHLTDataTypeEOR;
1023 /** Run type data block
1024 * @ingroup alihlt_component_datatypes
1026 extern const AliHLTComponentDataType kAliHLTDataTypeRunType;
1028 /** Event type specification
1029 * @ingroup alihlt_component_datatypes
1031 extern const AliHLTComponentDataType kAliHLTDataTypeEvent;
1033 /** ECS parameter event
1034 * - sent during the SOR event by the framework
1035 * - contains the full ECS parameter string
1036 * @ingroup alihlt_component_datatypes
1038 extern const AliHLTComponentDataType kAliHLTDataTypeECSParam; // {ECSPARAM:PRIV}
1040 /** Configuration event data type
1041 * @ingroup alihlt_component_datatypes
1043 extern const AliHLTComponentDataType kAliHLTDataTypeComConf;
1045 /** DCS value update event
1046 * @ingroup alihlt_component_datatypes
1048 extern const AliHLTComponentDataType kAliHLTDataTypeUpdtDCS;
1050 /** RAW DDL data specification, origin is 'any', data publisher origin correctly
1051 * @ingroup alihlt_component_datatypes
1053 extern const AliHLTComponentDataType kAliHLTDataTypeDDLRaw;
1055 /** AliMCEvent object data specification, origin is 'OFFL'
1056 * @ingroup alihlt_component_datatypes
1058 extern const AliHLTComponentDataType kAliHLTDataTypeMCObject;
1060 /** ESD vertex object data specification, origin is 'any'
1061 * @ingroup alihlt_component_datatypes
1063 extern const AliHLTComponentDataType kAliHLTDataTypeESDVertex;
1065 /** KF vertex object data specification, origin is 'any'
1066 * @ingroup alihlt_component_datatypes
1068 extern const AliHLTComponentDataType kAliHLTDataTypeKFVertex;
1070 /** global vertexer data specification, origin is 'any'
1071 * @ingroup alihlt_component_datatypes
1073 extern const AliHLTComponentDataType kAliHLTDataTypeGlobalVertexer;
1075 /** primary finder data specification, origin is 'any'
1076 * @ingroup alihlt_component_datatypes
1078 extern const AliHLTComponentDataType kAliHLTDataTypePrimaryFinder;
1080 /** primary finder data specification, origin is 'any'
1081 * @ingroup alihlt_component_datatypes
1083 extern const AliHLTComponentDataType kAliHLTDataTypeV0Finder;
1085 /** ESD object data specification, origin is 'any'
1086 * @ingroup alihlt_component_datatypes
1088 extern const AliHLTComponentDataType kAliHLTDataTypeESDObject;
1090 /** ESD content data specification, origin is 'any'
1091 * @ingroup alihlt_component_datatypes
1093 extern const AliHLTComponentDataType kAliHLTDataTypeESDContent;
1095 /** ESD Tree data specification, origin is 'any'
1096 * @ingroup alihlt_component_datatypes
1098 extern const AliHLTComponentDataType kAliHLTDataTypeESDTree;
1100 /** AliRoot TreeD data specification, origin is 'any'
1101 * @ingroup alihlt_component_datatypes
1103 extern const AliHLTComponentDataType kAliHLTDataTypeAliTreeD;
1105 /** AliRoot TreeR data specification, origin is 'any'
1106 * @ingroup alihlt_component_datatypes
1108 extern const AliHLTComponentDataType kAliHLTDataTypeAliTreeR;
1110 /** 16 bit Hardware address selection data specification, origin is 'any'
1111 * @ingroup alihlt_component_datatypes
1113 extern const AliHLTComponentDataType kAliHLTDataTypeHwAddr16;
1115 /** Event statistics
1116 * @ingroup alihlt_component_datatypes
1118 extern const AliHLTComponentDataType kAliHLTDataTypeEventStatistics;
1121 * @ingroup alihlt_component_datatypes
1123 extern const AliHLTComponentDataType kAliHLTDataTypeEventSummary;
1125 /** Event statistics
1126 * @ingroup alihlt_component_datatypes
1128 extern const AliHLTComponentDataType kAliHLTDataTypeRunStatistics;
1131 * @ingroup alihlt_component_datatypes
1133 extern const AliHLTComponentDataType kAliHLTDataTypeRunSummary;
1135 /** Trigger decision
1136 * - origin : kAliHLTDataOriginOut ( HLT )
1137 * @ingroup alihlt_component_datatypes
1139 extern const AliHLTComponentDataType kAliHLTDataTypeTriggerDecision; // {TRIG_DEC:HLT }
1141 /** Trigger decision
1142 * - origin : kAliHLTDataOriginOut ( HLT )
1143 * @ingroup alihlt_component_datatypes
1145 extern const AliHLTComponentDataType kAliHLTDataTypeReadoutList; // {HLTRDLST:HLT }
1147 /** Global trigger decision
1148 * - origin : kAliHLTDataOriginOut ( HLT )
1149 * @ingroup alihlt_component_datatypes
1151 extern const AliHLTComponentDataType kAliHLTDataTypeGlobalTrigger; // {GLOBTRIG:HLT }
1153 /** Component block statistics
1154 * @ingroup alihlt_component_datatypes
1156 extern const AliHLTComponentDataType kAliHLTDataTypeComponentStatistics;
1159 * To be sent on SOR event, each component adds it's chain id string
1160 * and a generated 32bit identifier to the table
1161 * @ingroup alihlt_component_datatypes
1163 extern const AliHLTComponentDataType kAliHLTDataTypeComponentTable;
1165 /** Forwarded component table
1166 * To be sent on SOR event, each component forwards blocks of type
1167 * @ref kAliHLTDataTypeComponentTable was kAliHLTDataTypeComponentFwdTable
1168 * after adding the parent ids to its own table struct.
1169 * @ingroup alihlt_component_datatypes
1171 extern const AliHLTComponentDataType kAliHLTDataTypeComponentFwdTable;
1173 //////////////////////////////////////////////////////////////////////////
1175 // Data Types for Monitoring objects
1177 //////////////////////////////////////////////////////////////////////////
1179 /** general ROOT TObject
1180 * @ingroup alihlt_component_datatypes
1182 extern const AliHLTComponentDataType kAliHLTDataTypeTObject; // {ROOTTOBJ,"***"}
1184 /** ROOT streamer info
1185 * @ingroup alihlt_component_datatypes
1187 extern const AliHLTComponentDataType kAliHLTDataTypeStreamerInfo; // {ROOTSTRI,HLT }
1190 * @ingroup alihlt_component_datatypes
1192 extern const AliHLTComponentDataType kAliHLTDataTypeTObjArray; // {ROOTOBAR,"***"}
1195 * @ingroup alihlt_component_datatypes
1197 extern const AliHLTComponentDataType kAliHLTDataTypeTTree; // {ROOTTREE,"***"}
1199 /** ROOT TH1 (can be used for all histograms, they derive from TH1)
1200 * @ingroup alihlt_component_datatypes
1202 extern const AliHLTComponentDataType kAliHLTDataTypeHistogram; // {ROOTHIST,"***"}
1205 * @ingroup alihlt_component_datatypes
1207 extern const AliHLTComponentDataType kAliHLTDataTypeTNtuple; // {ROOTTUPL,"***"}
1209 /** Global input trigger counters.
1210 * - origin : kAliHLTDataOriginOut ( HLT )
1211 * @ingroup alihlt_component_datatypes
1213 extern const AliHLTComponentDataType kAliHLTDataTypeInputTriggerCounters; // {INTRGCNT:HLT }
1215 /** Global output trigger counters.
1216 * - origin : kAliHLTDataOriginOut ( HLT )
1217 * @ingroup alihlt_component_datatypes
1219 extern const AliHLTComponentDataType kAliHLTDataTypeOutputTriggerCounters; // {OTTRGCNT:HLT }
1221 /** General track array for the barrel tracks based on AliExternalTrackParam
1222 * Data format defined by AliHLTTracksData
1224 * We follow the naming scheme of AliESDEvent where 'Tracks' denote the
1225 * barrel tracks and detector tracks get names 'DETTracks'
1226 * @ingroup alihlt_component_datatypes
1228 extern const AliHLTComponentDataType kAliHLTDataTypeTrack; // {HLTTRACK,"***"}
1230 /** Track Monte Carlo information
1232 extern const AliHLTComponentDataType kAliHLTDataTypeTrackMC; // {TRACK_MC,"***"}
1234 /** TClonesArray of AliExternalTrackParam
1235 * @ingroup alihlt_component_datatypes
1237 extern const AliHLTComponentDataType kAliHLTDataTypeExternalTrackParam; // {TCAEXTTR,"***"}
1239 /** Container containing jets (AliHLTJETJets)
1240 * Containing TClonesArray of AliAODJets
1241 * @ingroup alihlt_component_datatypes
1243 extern const AliHLTComponentDataType kAliHLTDataTypeJet; // {HLTJETV0,"***"}
1245 /** Container of ITS tracks
1246 * @ingroup alihlt_component_datatypes
1248 extern const AliHLTComponentDataType fgkITSTracksDataType;
1250 /** Container of calorimeter clusters
1251 * @ingroup alihlt_component_datatypes
1253 extern const AliHLTComponentDataType kAliHLTDataTypeCaloCluster;
1255 /** Container of dEdx
1256 * @ingroup alihlt_component_datatypes
1258 extern const AliHLTComponentDataType kAliHLTDataTypedEdx;
1260 /** Container of dNdPt
1261 * @ingroup alihlt_component_datatypes
1263 extern const AliHLTComponentDataType kAliHLTDataTypedNdPt;
1265 //////////////////////////////////////////////////////////////////////////
1267 // FXS subscriber meta information
1269 //////////////////////////////////////////////////////////////////////////
1271 const int gkAliHLTFXSHeaderfOriginSize = 4;
1272 const int gkAliHLTFXSHeaderfFileIDSize = 128;
1273 const int gkAliHLTFXSHeaderfDDLNumberSize = 64;
1275 /** Header in front of the data payload, in order to sent data to the FXS. */
1276 struct AliHLTFXSHeader
1278 AliHLTUInt32_t fHeaderVersion; /// HLT software version number.
1279 AliHLTUInt32_t fRunNumber; /// The current run number.
1280 char fOrigin[gkAliHLTFXSHeaderfOriginSize]; /// The detector from which the FXS data is received.
1281 char fFileID[gkAliHLTFXSHeaderfFileIDSize]; /// File identifier for the stored data.
1282 char fDDLNumber[gkAliHLTFXSHeaderfDDLNumberSize]; /// The DDL bits.
1285 //////////////////////////////////////////////////////////////////////////
1287 // Component running environment
1289 //////////////////////////////////////////////////////////////////////////
1291 /** definition of a void fct pointer */
1292 typedef void (*AliHLTfctVoid)();
1294 /** logging function */
1295 typedef int (*AliHLTfctLogging)( void* param,
1296 AliHLTComponentLogSeverity severity,
1298 const char* keyword,
1299 const char* message);
1302 * @struct AliHLTAnalysisEnvironment
1303 * Running environment for analysis components.
1304 * The struct describes function callbacks for actions to be
1305 * carried out by the calling framework, like memory allocation,
1306 * property callbecks, logging, etc.
1308 * @ingroup alihlt_wrapper_interface
1310 struct AliHLTAnalysisEnvironment
1312 /** size of the structure */
1313 AliHLTUInt32_t fStructSize;
1315 /** the component parameter given by the framework on creation */
1318 /** allocated memory */
1319 void* (*fAllocMemoryFunc)( void* param, unsigned long size );
1321 /** allocate an EventDoneData structure. */
1322 int (*fGetEventDoneDataFunc)( void* param, AliHLTEventID_t eventID, unsigned long size, AliHLTComponentEventDoneData** edd );
1324 /** logging callback */
1325 AliHLTfctLogging fLoggingFunc;
1328 // I just keep this as a note pad. Has to be added to the end of the structure
1329 // future addition already foreseen/envisioned
1330 // IMPORTANT: don not just remove the defines as this breaks the binary
1332 int (*fAllocShmMemoryFunc)( void* param, unsigned long size, AliHLTComponentBlockData* blockLocation );
1336 * @struct AliHLTComponentEnvironment
1337 * This was the original definition of the running environment.
1338 * Due to a bug in the AliRootWrapperSubscriber/SimpleComponentWrapper,
1339 * this structure can not be used any longer but is kept for backward
1341 * @note The external interface provided by the libHLTbase is now kept
1342 * frozen but should not be used any more. Use the interface provided
1343 * by the libHLTinterface library.
1345 * @ingroup alihlt_wrapper_interface_deprecated
1347 struct AliHLTComponentEnvironment
1349 AliHLTUInt32_t fStructSize;
1351 void* (*fAllocMemoryFunc)( void* param, unsigned long size );
1352 int (*fGetEventDoneDataFunc)( void* param, AliHLTEventID_t eventID, unsigned long size, AliHLTComponentEventDoneData** edd );
1353 AliHLTfctLogging fLoggingFunc;
1356 //////////////////////////////////////////////////////////////////////////
1358 // The external interface definition
1360 //////////////////////////////////////////////////////////////////////////
1363 * The component handle.
1364 * Used as indification in the outside world.
1365 * @ingroup alihlt_wrapper_interface
1367 typedef void* AliHLTComponentHandle;
1369 /** @ingroup alihlt_wrapper_interface */
1370 const AliHLTComponentHandle kEmptyHLTComponentHandle = 0;
1373 * Get a system call of the interface.
1374 * @param function signature
1375 * @return pointer to system call
1376 * @ingroup alihlt_wrapper_interface
1378 typedef void* (*AliHLTAnalysisFctGetInterfaceCall)(const char*);
1380 # define ALIHLTANALYSIS_INTERFACE_LIBRARY "libHLTinterface.so"
1381 # define ALIHLTANALYSIS_FCT_GETINTERFACECALL "AliHLTAnalysisGetInterfaceCall"
1383 /** @ingroup alihlt_wrapper_interface */
1384 typedef int (*AliHLTExtFctInitSystem)( unsigned long version, AliHLTAnalysisEnvironment* externalEnv, unsigned long runNo, const char* runType );
1386 /** @ingroup alihlt_wrapper_interface */
1387 typedef int (*AliHLTExtFctDeinitSystem)();
1389 /** @ingroup alihlt_wrapper_interface */
1390 typedef int (*AliHLTExtFctLoadLibrary)( const char* );
1392 /** @ingroup alihlt_wrapper_interface */
1393 typedef int (*AliHLTExtFctUnloadLibrary)( const char* );
1395 /** @ingroup alihlt_wrapper_interface */
1396 typedef int (*AliHLTExtFctCreateComponent)( const char*, void*, int, const char**, AliHLTComponentHandle*, const char* description );
1398 /** @ingroup alihlt_wrapper_interface */
1399 typedef int (*AliHLTExtFctDestroyComponent)( AliHLTComponentHandle );
1401 /** @ingroup alihlt_wrapper_interface */
1402 typedef int (*AliHLTExtFctProcessEvent)( AliHLTComponentHandle, const AliHLTComponentEventData*, const AliHLTComponentBlockData*,
1403 AliHLTComponentTriggerData*, AliHLTUInt8_t*,
1404 AliHLTUInt32_t*, AliHLTUInt32_t*,
1405 AliHLTComponentBlockData**,
1406 AliHLTComponentEventDoneData** );
1408 /** @ingroup alihlt_wrapper_interface */
1409 typedef int (*AliHLTExtFctGetOutputDataType)( AliHLTComponentHandle, AliHLTComponentDataType* );
1411 /** @ingroup alihlt_wrapper_interface */
1412 typedef int (*AliHLTExtFctGetOutputSize)( AliHLTComponentHandle, unsigned long*, double* );
1416 //////////////////////////////////////////////////////////////////////////
1418 // Data type helper functions
1420 //////////////////////////////////////////////////////////////////////////
1422 /** exact comparison of HLT component data types
1423 * @ingroup alihlt_component_datatypes
1425 inline bool MatchExactly( const AliHLTComponentDataType& dt1, const AliHLTComponentDataType& dt2 )
1427 for ( int i = 0; i < kAliHLTComponentDataTypefIDsize; i++ )
1428 if ( dt1.fID[i] != dt2.fID[i] )
1430 for ( int i = 0; i < kAliHLTComponentDataTypefOriginSize; i++ )
1431 if ( dt1.fOrigin[i] != dt2.fOrigin[i] )
1436 /** Comparison operator for HLT component data types.
1437 * The operator takes wildcards into account, i.e. the ::kAliHLTAnyDataType,
1438 * ::kAliHLTAnyDataTypeID and ::kAliHLTDataOriginAny definitions.
1439 * @ingroup alihlt_component_datatypes
1441 inline bool operator==( const AliHLTComponentDataType& dt1, const AliHLTComponentDataType& dt2 )
1443 if (MatchExactly(dt1, kAliHLTAllDataTypes)) return true;
1444 if (MatchExactly(dt2, kAliHLTAllDataTypes)) return true;
1446 bool any1=true, any2=true, void1=true, void2=true, match=true;
1447 for ( int i = 0; i < kAliHLTComponentDataTypefOriginSize; i++ ) {
1448 any1&=(dt1.fOrigin[i]==kAliHLTDataOriginAny[i]);
1449 any2&=(dt2.fOrigin[i]==kAliHLTDataOriginAny[i]);
1450 void1&=(dt1.fOrigin[i]==kAliHLTDataOriginVoid[i]);
1451 void2&=(dt2.fOrigin[i]==kAliHLTDataOriginVoid[i]);
1452 match&=dt1.fOrigin[i]==dt2.fOrigin[i];
1453 if (!(match || (any2 && !void1) || (any1 && !void2)))
1457 any1=true, any2=true, match=true;
1458 for ( int i = 0; i < kAliHLTComponentDataTypefIDsize; i++ ) {
1459 any1&=(dt1.fID[i]==kAliHLTAnyDataTypeID[i]);
1460 any2&=(dt2.fID[i]==kAliHLTAnyDataTypeID[i]);
1461 void1&=(dt1.fID[i]==kAliHLTVoidDataTypeID[i]);
1462 void2&=(dt2.fID[i]==kAliHLTVoidDataTypeID[i]);
1463 match&=dt1.fID[i]==dt2.fID[i];
1464 if (!(match || (any2 && !void1) || (any1 && !void2)))
1470 /** Comparison operator for HLT component data types
1471 * Invers of operator==
1472 * @ingroup alihlt_component_datatypes
1474 inline bool operator!=( const AliHLTComponentDataType& dt1, const AliHLTComponentDataType& dt2 )
1479 /** merge operator for HLT component data types and origins
1480 * @ingroup alihlt_component_datatypes
1482 inline AliHLTComponentDataType operator|(const AliHLTComponentDataType srcdt, const char origin[kAliHLTComponentDataTypefOriginSize])
1484 AliHLTComponentDataType dt=srcdt;
1485 for ( int i = 0; i < kAliHLTComponentDataTypefOriginSize; i++ )
1486 dt.fOrigin[i]=origin[i];
1491 * Helper function to initialize a data type from an id char array and origin string.
1492 * @return data type structure initialized with the specified id and origin
1493 * @ingroup alihlt_component_datatypes
1495 inline AliHLTComponentDataType AliHLTComponentDataTypeInitializer(const char id[kAliHLTComponentDataTypefIDsize], const char* origin)
1497 AliHLTComponentDataType dt=kAliHLTVoidDataType;
1499 for (i = 0; i < kAliHLTComponentDataTypefIDsize && id[i]!=0; i++)
1501 for (i = 0; i < kAliHLTComponentDataTypefOriginSize && origin[i]!=0; i++ )
1502 dt.fOrigin[i]=origin[i];
1507 * Helper function to initialize a data type from a default data type and
1508 * an origin string. Basically it merges the specified origin into the data
1510 * @return data type structure initialized with the id from specified data type
1512 * @ingroup alihlt_component_datatypes
1514 inline AliHLTComponentDataType AliHLTComponentDataTypeInitializer(const AliHLTComponentDataType src, const char* origin)
1516 return AliHLTComponentDataTypeInitializer(src.fID, origin);