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
73 * 17 New CDH v3 (10 32bit words, 100 trigger classes, etc.)
74 * 18 Added AD detector in AliHLTEventDDLV2
76 #define ALIHLT_DATA_TYPES_VERSION 18
78 //////////////////////////////////////////////////////////////////////////
80 // HLT data origin variables.
82 // By converting from defines to variables, the origins can be used with
85 // AliHLTComponentDataType dt;
86 // dt = kAliHLTDataTypeDDLRaw | kAliHLTDataOriginTPC;
88 //////////////////////////////////////////////////////////////////////////
90 /** field size of datat type origin
91 * @ingroup alihlt_component_datatypes
93 const int kAliHLTComponentDataTypefOriginSize=4;
96 /** invalid data origin
97 * @ingroup alihlt_component_datatypes
99 # define kAliHLTDataOriginVoid "\0\0\0"
100 /** old invalid data origin, kept for backward compatibility */
101 # define kAliHLTVoidDataOrigin "\0\0\0"
103 /** wildcard data type origin
104 * @ingroup alihlt_component_datatypes
106 # define kAliHLTDataOriginAny "***"
107 /** old wildcard data type origin, kept for backward compatibility */
108 # define kAliHLTAnyDataOrigin "***"
110 /** Data origin HLT out
111 * @ingroup alihlt_component_datatypes
113 extern const char kAliHLTDataOriginOut[kAliHLTComponentDataTypefOriginSize];
115 /** Data origin HLT, used for HLT specifc data
116 * in offline chains. This not a bug!
117 * @ingroup alihlt_component_datatypes
119 extern const char kAliHLTDataOriginHLT[kAliHLTComponentDataTypefOriginSize];
121 /** Data origin Offline
122 * @ingroup alihlt_component_datatypes
124 extern const char kAliHLTDataOriginOffline[kAliHLTComponentDataTypefOriginSize];
126 /** Data origin HLT/PubSub private internal
127 * @ingroup alihlt_component_datatypes
129 extern const char kAliHLTDataOriginPrivate[kAliHLTComponentDataTypefOriginSize];
132 * @ingroup alihlt_component_datatypes
134 extern const char kAliHLTDataOriginTPC[kAliHLTComponentDataTypefOriginSize];
137 * @ingroup alihlt_component_datatypes
139 extern const char kAliHLTDataOriginPHOS[kAliHLTComponentDataTypefOriginSize];
142 * @ingroup alihlt_component_datatypes
144 extern const char kAliHLTDataOriginFMD[kAliHLTComponentDataTypefOriginSize];
147 * @ingroup alihlt_component_datatypes
149 extern const char kAliHLTDataOriginMUON[kAliHLTComponentDataTypefOriginSize];
152 * @ingroup alihlt_component_datatypes
154 extern const char kAliHLTDataOriginTRD[kAliHLTComponentDataTypefOriginSize];
157 * @ingroup alihlt_component_datatypes
159 extern const char kAliHLTDataOriginITS[kAliHLTComponentDataTypefOriginSize];
161 /** Data origin ITSOut
162 * @ingroup alihlt_component_datatypes
164 extern const char kAliHLTDataOriginITSOut[kAliHLTComponentDataTypefOriginSize];
166 /** Data origin ITS SPD
167 * @ingroup alihlt_component_datatypes
169 extern const char kAliHLTDataOriginITSSPD[kAliHLTComponentDataTypefOriginSize];
171 /** Data origin ITS SDD
172 * @ingroup alihlt_component_datatypes
174 extern const char kAliHLTDataOriginITSSDD[kAliHLTComponentDataTypefOriginSize];
176 /** Data origin ITS SSD
177 * @ingroup alihlt_component_datatypes
179 extern const char kAliHLTDataOriginITSSSD[kAliHLTComponentDataTypefOriginSize];
181 /** Data origin for examples
182 * @ingroup alihlt_component_datatypes
184 extern const char kAliHLTDataOriginSample[kAliHLTComponentDataTypefOriginSize];
186 /** Data origin EMCAL
187 * @ingroup alihlt_component_datatypes
189 extern const char kAliHLTDataOriginEMCAL[kAliHLTComponentDataTypefOriginSize];
192 * @ingroup alihlt_component_datatypes
194 extern const char kAliHLTDataOriginTOF[kAliHLTComponentDataTypefOriginSize];
196 /** Data origin HMPID
197 * @ingroup alihlt_component_datatypes
199 extern const char kAliHLTDataOriginHMPID[kAliHLTComponentDataTypefOriginSize];
202 * @ingroup alihlt_component_datatypes
204 extern const char kAliHLTDataOriginCPV[kAliHLTComponentDataTypefOriginSize];
207 * @ingroup alihlt_component_datatypes
209 extern const char kAliHLTDataOriginPMD[kAliHLTComponentDataTypefOriginSize];
212 * @ingroup alihlt_component_datatypes
214 extern const char kAliHLTDataOriginT0[kAliHLTComponentDataTypefOriginSize];
216 /** Data origin VZERO
217 * @ingroup alihlt_component_datatypes
219 extern const char kAliHLTDataOriginVZERO[kAliHLTComponentDataTypefOriginSize];
222 * @ingroup alihlt_component_datatypes
224 extern const char kAliHLTDataOriginZDC[kAliHLTComponentDataTypefOriginSize];
226 /** Data origin ACORDE
227 * @ingroup alihlt_component_datatypes
230 extern const char kAliHLTDataOriginACORDE[kAliHLTComponentDataTypefOriginSize];
233 * @ingroup alihlt_component_datatypes
235 extern const char kAliHLTDataOriginTRG[kAliHLTComponentDataTypefOriginSize];
237 //////////////////////////////////////////////////////////////////////////
239 // HLT common data type defines
241 //////////////////////////////////////////////////////////////////////////
243 /** field size of data type id
244 * @ingroup alihlt_component_datatypes
246 const int kAliHLTComponentDataTypefIDsize=8;
249 /** invalid data type id
250 * @ingroup alihlt_component_datatypes
252 # define kAliHLTVoidDataTypeID "\0\0\0\0\0\0\0"
254 /** special id for all data types: any + void
255 * @ingroup alihlt_component_datatypes
257 # define kAliHLTAllDataTypesID "ALLDATA"
259 /** special id for any valid data type id
260 * @ingroup alihlt_component_datatypes
262 # define kAliHLTAnyDataTypeID "*******"
265 * @ingroup alihlt_component_datatypes
267 # define kAliHLTDDLRawDataTypeID {'D','D','L','_','R','A','W',' '}
270 * Common data type for the output of cluster finders, the exact
271 * format depends on the origin (detector)
272 * @ingroup alihlt_component_datatypes
274 # define kAliHLTClustersDataTypeID {'C','L','U','S','T','E','R','S'}
276 /** calibration data for file exchange subscriber
277 * @ingroup alihlt_component_datatypes
279 # define kAliHLTFXSCalibDataTypeID {'F','X','S','_','C','A','L',' '}
281 /** start of run (SOR) event
283 * @ingroup alihlt_component_datatypes
285 # define kAliHLTSORDataTypeID {'S','T','A','R','T','O','F','R'}
287 /** end of run (EOR) event
289 * @ingroup alihlt_component_datatypes
291 # define kAliHLTEORDataTypeID {'E','N','D','O','F','R','U','N'}
293 /** run type data block
294 * string with run type as payload
295 * @ingroup alihlt_component_datatypes
297 # define kAliHLTRunTypeDataTypeID {'R','U','N','T','Y','P','E',' '}
300 * @ref AliHLTEventDDL
301 * @ingroup alihlt_component_datatypes
303 # define kAliHLTDDLDataTypeID {'D','D','L','L','I','S','T',' '}
306 * @ingroup alihlt_component_datatypes
308 # define kAliHLTDAQRDOUTDataTypeID "DAQRDOUT"
310 /** HLT readout list.
311 * @ingroup alihlt_component_datatypes
313 # define kAliHLTReadoutListDataTypeID {'H','L','T','R','D','L','S','T'}
316 * - empty payload, specification gives eventType
317 * @ingroup alihlt_component_datatypes
319 # define kAliHLTEventDataTypeID {'E','V','E','N','T','T','Y','P'}
321 /** ECS parameter event
322 * - sent during the SOR event by the framework
323 * - contains the full ECS parameter string
324 * @ingroup alihlt_component_datatypes
326 # define kAliHLTECSParamDataTypeID {'E','C','S','P','A','R','A','M'}
328 /** ComponentConfiguration event
329 * - payload contains the CDB path as string
330 * @ingroup alihlt_component_datatypes
332 # define kAliHLTComConfDataTypeID {'C','O','M','_','C','O','N','F'}
334 /** DCS value update event
335 * - payload contains string of relevant detectors
336 * @ingroup alihlt_component_datatypes
338 # define kAliHLTUpdtDCSDataTypeID {'U','P','D','T','_','D','C','S'}
341 * an AliMCEvent object of varying origin
342 * The 'V0' at the end allows a versioning
343 * @ingroup alihlt_component_datatypes
345 # define kAliHLTMCObjectDataTypeID {'A','L','I','M','C','_','V','0'}
347 /** ESDVertex data block
348 * an AliESDVertex object of varying origin
349 * The 'V0' at the end allows a versioning
350 * @ingroup alihlt_component_datatypes
352 # define kAliHLTESDVertexDataTypeID {'E','S','D','V','T','X','V','0'}
354 /** KFVertex data block
355 * an AliKFVertex object of varying origin
356 * The 'V0' at the end allows a versioning
357 * @ingroup alihlt_component_datatypes
359 # define kAliHLTKFVertexDataTypeID {'A','L','I','K','F','V','V','0'}
362 /** output of the GlobalVertexer data block
363 * The 'V0' at the end allows a versioning
364 * @ingroup alihlt_component_datatypes
366 # define kAliHLTDataTypeGlobalVertexerID {'G','L','B','V','T','X','V','0'}
368 /** output of the PrimaryFinder data block
369 * The 'V0' at the end allows a versioning
370 * @ingroup alihlt_component_datatypes
372 # define kAliHLTDataTypePrimaryFinderID {'P','R','I','V','T','X','V','0'}
374 /** output of the V0Finder data block
375 * The 'V0' at the end allows a versioning
376 * @ingroup alihlt_component_datatypes
378 # define kAliHLTDataTypeV0FinderID {'V','0','S','V','T','X','V','0'}
381 * an AliESD object of varying origin
382 * The 'V0' at the end allows a versioning
383 * @ingroup alihlt_component_datatypes
385 # define kAliHLTESDObjectDataTypeID {'A','L','I','E','S','D','V','0'}
387 /** ESD friend data block
388 * an AliESDfriend object of varying origin
389 * The 'V0' at the end allows a versioning
390 * @ingroup alihlt_component_datatypes
392 # define kAliHLTESDfriendObjectDataTypeID {'E','S','D','F','R','N','D','0'}
394 /** Flat ESD Vertex data block
395 * The '0' at the end allows a versioning
396 * @ingroup alihlt_component_datatypes
398 # define kAliHLTFlatESDVertexDataTypeID {'F','L','A','T','V','T','X','0'}
400 /** Flat ESD data block
401 * an AliFlatESD object of varying origin
402 * The '0' at the end allows a versioning
403 * @ingroup alihlt_component_datatypes
405 # define kAliHLTFlatESDDataTypeID {'F','L','A','T','E','S','D','0'}
407 /** Flat ESD data block
408 * an AliFlatESDFriend object of varying origin
409 * @ingroup alihlt_component_datatypes
411 # define kAliHLTFlatESDFriendDataTypeID {'F','L','A','T','F','R','N','D'}
414 * data blocks designated for the ESD
415 * @ingroup alihlt_component_datatypes
417 # define kAliHLTESDContentDataTypeID {'E','S','D','_','C','O','N','T'}
419 /** ESD tree data block
420 * TTree with an AliESD object of varying origin
421 * @ingroup alihlt_component_datatypes
423 # define kAliHLTESDTreeDataTypeID {'E','S','D','_','T','R','E','E'}
426 * - the digits tree of an AliRoot module
427 * @ingroup alihlt_component_datatypes
429 #define kAliHLTTreeDDataTypeID {'A','L','I','T','R','E','E','D'}
432 * - the rec points tree of an AliRoot module
433 * @ingroup alihlt_component_datatypes
435 #define kAliHLTTreeRDataTypeID {'A','L','I','T','R','E','E','R'}
437 /** HW Address selection data block
438 * - a selection list for 16 bit HW addresses
440 * @ingroup alihlt_component_datatypes
442 # define kAliHLTHwAddr16DataTypeID {'H','W','A','D','D','R','1','6'}
445 * - event statistics for given detectors
447 * @ingroup alihlt_component_datatypes
449 # define kAliHLTEventStatisticsDataTypeID {'E','V','_','S','T','A','T','I'}
453 * - origin : kAliHLTDataOriginOut ( HLT )
454 * @ingroup alihlt_component_datatypes
456 # define kAliHLTEventSummaryDataTypeID {'E','V','_','S','U','M','M','A'}
459 * - run statistics for given detectors
461 * @ingroup alihlt_component_datatypes
463 # define kAliHLTRunStatisticsDataTypeID {'R','U','N','S','T','A','T','I'}
467 * - origin : kAliHLTDataOriginOut ( HLT )
468 * @ingroup alihlt_component_datatypes
470 # define kAliHLTRunSummaryDataTypeID {'R','U','N','S','U','M','M','A'}
473 * - origin : kAliHLTDataOriginOut ( HLT )
474 * @ingroup alihlt_component_datatypes
476 # define kAliHLTTriggerDecisionDataTypeID {'T','R','I','G','_','D','E','C'}
478 /** Global trigger decision
479 * - origin : kAliHLTDataOriginOut ( HLT )
480 * @ingroup alihlt_component_datatypes
482 # define kAliHLTGlobalTriggerDataTypeID {'G','L','O','B','T','R','I','G'}
485 * - small block statistics info added to the data stream by
486 * the component base class
487 * - origin kAliHLTDataOriginPrivate
488 * @ingroup alihlt_component_datatypes
490 # define kAliHLTComponentStatisticsDataTypeID {'C','O','M','P','S','T','A','T'}
493 * - list of components in the chain to be percolated through the chain
494 * - each component adds it's chain id string and a generated 32bit id
495 * @ingroup alihlt_component_datatypes
497 # define kAliHLTComponentTableDataTypeID {'C','O','M','P','T','A','B','L'}
499 /** Forwarded component table
500 * @ingroup alihlt_component_datatypes
502 # define kAliHLTComponentFwdTableDataTypeID {'C','O','M','P','T','A','B','F'}
504 /** general ROOT TObject
505 * - a general TObject exported from the HLT analysis
507 * @ingroup alihlt_component_datatypes
509 #define kAliHLTTObjectDataTypeID {'R','O','O','T','T','O','B','J'}
511 /** ROOT streamer info
512 * - used for the transmission of streamer info for objects in the HLTOUT
513 * - origin kAliHLTDataOriginOut ( HLT )
514 * @ingroup alihlt_component_datatypes
516 #define kAliHLTStreamerInfoDataTypeID {'R','O','O','T','S','T','R','I'}
519 * - a TObjArray exported from the HLT analysis
521 * @ingroup alihlt_component_datatypes
523 #define kAliHLTTObjArrayDataTypeID {'R','O','O','T','O','B','A','R'}
526 * - a TTree object exported from the HLT analysis
528 * @ingroup alihlt_component_datatypes
530 #define kAliHLTTTreeDataTypeID {'R','O','O','T','T','R','E','E'}
533 * - a histogram object exported from the HLT analysis
534 * - class derives from TH1 (directly or indirectly) and inherits all common functionality
536 * @ingroup alihlt_component_datatypes
538 #define kAliHLTHistogramDataTypeID {'R','O','O','T','H','I','S','T'}
541 * - a TNtupl object exported from the HLT analysis
543 * @ingroup alihlt_component_datatypes
545 #define kAliHLTTNtupleDataTypeID {'R','O','O','T','T','U','P','L'}
548 * - Struct for Tracks based on AliExternalTrackParam
550 * @ingroup alihlt_component_datatypes
552 #define kAliHLTTrackDataTypeID {'H','L','T','T','R','A','C','K'}
554 /** Track Monte Carlo information
555 * @ingroup alihlt_component_datatypes
557 #define kAliHLTTrackMCDataTypeID {'T','R','A','C','K','_','M','C'}
559 /** TClonesArray of AliExternalTrackParam
560 * @ingroup alihlt_component_datatypes
562 #define kAliHLTExternalTrackParamDataTypeID {'T','C','A','E','X','T','T','R'}
565 * - Struct for jets based on AliHLTJETJets
567 * @ingroup alihlt_component_datatypes
569 #define kAliHLTJetDataTypeID {'H','L','T','J','E','T','V','0'}
572 * Common data type for the dEdx
573 * format depends on the origin (detector)
574 * @ingroup alihlt_component_datatypes
576 # define kAliHLTdEdxDataTypeID {'D','E','D','X',' ',' ',' ',' '}
579 * Common data type for the dNdPt output object
580 * @ingroup alihlt_component_datatypes
582 # define kAliHLTdNdPtDataTypeID {'D','N','D','P','T',' ',' ',' '}
584 /** Global input trigger counters data block type.
585 * @ingroup alihlt_component_datatypes
587 # define kAliHLTInputTriggerCountersDataTypeID {'I','N','T','R','G','C','N','T'}
589 /** Global output trigger counters data block type.
590 * @ingroup alihlt_component_datatypes
592 # define kAliHLTOutputTriggerCountersDataTypeID {'O','T','T','R','G','C','N','T'}
594 /** Generic meta data block type ID.
595 * @ingroup alihlt_component_datatypes
597 # define kAliHLTMetaDataTypeID {'M','E','T','A','D','A','T','A'}
600 //////////////////////////////////////////////////////////////////////////
602 // Basic HLT data types
604 //////////////////////////////////////////////////////////////////////////
606 typedef unsigned char AliHLTUInt8_t;
608 typedef signed char AliHLTInt8_t;
610 typedef unsigned short AliHLTUInt16_t;
612 typedef signed short AliHLTInt16_t;
614 typedef unsigned int AliHLTUInt32_t;
616 typedef signed int AliHLTInt32_t;
618 typedef unsigned long long AliHLTUInt64_t;
620 typedef signed long long AliHLTInt64_t;
622 typedef float AliHLTFloat32_t;
624 typedef double AliHLTFloat64_t;
626 typedef AliHLTUInt64_t AliHLTEventID_t;
628 //////////////////////////////////////////////////////////////////////////
630 // HLT logging levels
632 //////////////////////////////////////////////////////////////////////////
635 * Logging severities of the HLT
637 enum AliHLTComponentLogSeverity {
640 /** benchmark messages */
641 kHLTLogBenchmark = 0x1,
642 /** debug messages */
646 /** warning messages */
647 kHLTLogWarning = 0x8,
648 /** error messages */
650 /** fatal error messages */
652 /** few important messages not to be filtered out.
653 * redirected to kHLTLogInfo in AliRoot
655 kHLTLogImportant = 0x40,
656 /** special value to enable all messages */
658 /** the default logging filter */
659 kHLTLogDefault = 0x79
662 //////////////////////////////////////////////////////////////////////////
664 // HLT data structures for data exchange and external interface
666 //////////////////////////////////////////////////////////////////////////
669 * @struct AliHLTComponentEventData
672 struct AliHLTComponentEventData
674 AliHLTUInt32_t fStructSize; /// Size of this structure in bytes.
675 AliHLTEventID_t fEventID; /// 64 bit event ID number.
676 AliHLTUInt32_t fEventCreation_s; /// Event creation time in seconds (Should be added to fEventCreation_us*1e6).
677 AliHLTUInt32_t fEventCreation_us; /// Fractional event creation time in micro seconds.
678 AliHLTUInt32_t fBlockCnt; /// The number of raw data blocks received by the component.
682 * @struct AliHLTComponentShmData
683 * Shared memory descriptor.
684 * Irrelevant for analysis components.
686 struct AliHLTComponentShmData
688 AliHLTUInt32_t fStructSize; /// Size of this structure in bytes.
689 AliHLTUInt32_t fShmType; /// The type code of the shared memory.
690 AliHLTUInt64_t fShmID; /// The shared memory identifier.
694 * @defgroup alihlt_component_datatypes Common Component Data Types
695 * The analysis framework defines a number of common data types for
696 * usage in the detector modules, like e.g. ::kAliHLTAnyDataType
697 * and ::kAliHLTDataTypeDDLRaw. Those data types always have
698 * origin ::kAliHLTDataOriginAny. The correct detector origin can be
699 * set by using operator '|'
701 * AliHLTComponentDataType dt=kAliHLTDDLRawDataTypeID|kAliHLTDataOriginTPC
703 * @ingroup alihlt_component
707 * @struct AliHLTComponentDataType
708 * Data type descriptor for data blocks transferred through the processing
710 * @ingroup alihlt_component_datatypes
712 struct AliHLTComponentDataType
714 AliHLTUInt32_t fStructSize; /// Size of this structure in bytes.
715 char fID[kAliHLTComponentDataTypefIDsize]; /// Data type identifier.
716 char fOrigin[kAliHLTComponentDataTypefOriginSize]; /// Subsystem or detector origin of the data.
720 * @struct AliHLTComponentBlockData
721 * This is the decription of data blocks exchanged between components.
722 * \b IMPORTANT: The validity of fPtr and fOffset is different for input and
724 * - input blocks: The \em fPtr member always points to the beginning of the data
725 * of size \em fSize. fOffset is ignored and should be in most
727 * - output blocks: The \em fPtr member is ignored by the framework. \em fOffset
728 * must specify the start of the data relative to the output
729 * buffer. The data block has size \em fSize.
731 struct AliHLTComponentBlockData
733 /** size and version of the struct */
734 AliHLTUInt32_t fStructSize;
735 /** shared memory key, ignored by processing components */
736 AliHLTComponentShmData fShmKey;
737 /** offset of output data relative to the output buffer */
738 AliHLTUInt32_t fOffset;
739 /** start of the data for input data blocks, fOffset to be ignored*/
741 /** size of the data block */
742 AliHLTUInt32_t fSize;
743 /** data type of the data block */
744 AliHLTComponentDataType fDataType;
745 /** data specification of the data block */
746 AliHLTUInt32_t fSpecification;
748 AliHLTComponentDataType GetDataType() const {return fDataType;}
749 AliHLTUInt32_t GetSpecification() const {return fSpecification;}
753 * @struct AliHLTComponentEventDoneData
756 struct AliHLTComponentEventDoneData
758 AliHLTUInt32_t fStructSize; /// Size of this structure in bytes.
759 AliHLTUInt32_t fDataSize; /// Size of the data section (following this data member) in bytes.
760 void* fData; /// Start of the data section.
764 * @struct AliHLTRunDesc
766 * The struct is sent with the SOR and EOR events.
769 * The name of the member fRunType is a bit misleading. This is not
770 * the ALICE Run Type given by the ECS to the sub-system. The member
771 * is an internal HLT run type and a combination of the HLT running
772 * mode and the beam type.
774 * Bit 0-2: beam type identifier
780 AliHLTUInt32_t fStructSize; /// Size of this structure in bytes.
781 AliHLTUInt32_t fRunNo; /// The run number for the current active run.
782 AliHLTUInt32_t fRunType; /// The HLT run type.
786 * @struct AliHLTComponentStatistics
787 * Small block size summary added by the AliHLTComponent base class
788 * if component statistics are enabled (--enable-compstat).
790 * fLevel is retrieved from incoming block statistics and incremented.
791 * Incoming block statistics are appended to the newly added one if
792 * --enable-compstat=full has been chosen.
795 * 2009-01-14 fComponentCycleTime added
797 struct AliHLTComponentStatistics
799 AliHLTUInt32_t fStructSize; /// Size of this structure in bytes.
800 AliHLTUInt32_t fLevel; /// Indicates from which processing stage this information is from.
801 AliHLTUInt32_t fId; /// Unique identifier for the chain based on CRC code.
802 AliHLTUInt32_t fTime; /// Real wall time used to process the data (micro seconds).
803 AliHLTUInt32_t fCTime; /// CPU time used to process the data (micro seconds).
804 AliHLTUInt32_t fInputBlockCount; /// Number of input data blocks.
805 AliHLTUInt32_t fTotalInputSize; /// Total size in bytes of input data.
806 AliHLTUInt32_t fOutputBlockCount; /// Number of output data blocks.
807 AliHLTUInt32_t fTotalOutputSize; /// Total size in bytes of output data.
808 AliHLTUInt32_t fComponentCycleTime; /// Real wall time indicating the start of the data processing (micro seconds).
812 * @struct AliHLTComponentTableEntry
813 * Structure to be send on SOR event through the chain.
814 * The 'length' of the structure is variable and depends on the length
815 * of the buffer at the end.
817 * ComponentTableEntries are sent with data type @ref kAliHLTDataTypeComponentTable
818 * and are identified by a 32bit Id specification generated by a CRC
819 * algorithm from the chain Id of the component. This is not a 100% unique
820 * id but with a high probability. This approach accounts for the fact
821 * that all components are separated processes.
823 * The buffer consists of an array of 32bit Ids containing the Ids of
824 * all direct parents taken from the specification of the data blocks.
825 * The number of parents is stored in fNofParents. Each component forwards the
826 * incoming component table entries with data type @ref kAliHLTDataTypeComponentFwdTable
827 * by that the direct parents can be identified.
829 * Following this array a description string contains the chain id, component args, and
830 * maybe more properties in the future. The current format is
831 * 'chain_id{component_id:component args}' e.g. TPC-CF_00_0{TPCClusterFinder32Bit:-deconvolute-time}
833 struct AliHLTComponentTableEntry
835 AliHLTUInt32_t fStructSize; /// Size of this structure in bytes.
836 AliHLTUInt32_t fLevel; /// Indicates from which processing stage this information is from.
837 AliHLTUInt16_t fNofParents; /// size of the array of parent ids
838 AliHLTUInt8_t fSizeDescription; /// size of the description string in the appended buffer
839 AliHLTUInt8_t fBuffer[1]; /// the strings: chain id, component args, reserved
842 //////////////////////////////////////////////////////////////////////////
844 // Trigger meta information
846 //////////////////////////////////////////////////////////////////////////
848 /** field size of fAttribute */
849 const int gkAliHLTBlockDAttributeCount = 8;
851 /** field size of fCommonHeader */
852 const int gkAliHLTCommonHeaderCountV2 = 8;
853 const int gkAliHLTCommonHeaderCountV3 = 10;
854 const int gkAliHLTCommonHeaderCount = gkAliHLTCommonHeaderCountV3;
856 /** size of the DDL list first version */
857 const int gkAliHLTDDLListSizeV0 = 30;
859 /** size of the DDL list after DCAL added to EMCAL */
860 const int gkAliHLTDDLListSizeV1 = 31;
862 /** size of the DDL list with AD */
863 const int gkAliHLTDDLListSizeV2 =32;
865 /** size of the DDL list */
866 const int gkAliHLTDDLListSize = gkAliHLTDDLListSizeV2;
868 /** Number of Trigger Classes of CTP in CDH */
869 const int gkNCTPTriggerClassesV2 = 50;
870 const int gkNCTPTriggerClassesV3 = 100;
871 const int gkNCTPTriggerClasses = gkNCTPTriggerClassesV3;
873 // make it also available as define for templates
874 #define NCTPTRIGGERCLASSES 100
877 * @struct AliHLTEventDDLV0
878 * First version of the DDL list event.
879 * The struct is send with the DDLLIST event.
880 * Used in the trigger structure for internal apperance of
881 * the DLLs as well as for the HLT readout list send to DAQ
882 * ( as DataType : kAliHLTDataTypeDDL )
884 struct AliHLTEventDDLV0
886 AliHLTUInt32_t fCount; /// Indicates the number of words in fList.
887 AliHLTUInt32_t fList[gkAliHLTDDLListSizeV0]; /// The list of DDL enable/disable bits.
891 * @struct AliHLTEventDDLV1
892 * DDL list event structure with extra word for DCAL bits.
894 struct AliHLTEventDDLV1
896 AliHLTUInt32_t fCount; /// Indicates the number of words in fList.
897 AliHLTUInt32_t fList[gkAliHLTDDLListSizeV1]; /// The list of DDL enable/disable bits.
901 * @struct AliHLTEventDDLV2
902 * DDL list event structure with extra word for AD bits.
904 struct AliHLTEventDDLV2
906 AliHLTUInt32_t fCount; /// Indicates the number of words in fList.
907 AliHLTUInt32_t fList[gkAliHLTDDLListSizeV2]; /// The list of DDL enable/disable bits.
911 * @typedef AliHLTEventDDL
912 * Current used default version of the AliHLTEventDDL structure.
914 typedef AliHLTEventDDLV2 AliHLTEventDDL;
917 * @struct AliHLTEventTriggerData
919 struct AliHLTEventTriggerData
921 AliHLTUInt8_t fAttributes[gkAliHLTBlockDAttributeCount]; /// List of data block attibutes.
922 AliHLTUInt64_t fHLTStatus; /// Bit field
923 AliHLTUInt32_t fCommonHeaderWordCnt; /// Number of words in fCommonHeader.
924 AliHLTUInt32_t fCommonHeader[gkAliHLTCommonHeaderCount]; /// The common header words.
927 AliHLTEventDDL fReadoutList; /// The default readout list structure.
928 AliHLTEventDDLV0 fReadoutListV0; /// Access to the old version of the readout list structure.
929 AliHLTEventDDLV1 fReadoutListV1; /// Access to the readout list structure with DCAL included.
930 AliHLTEventDDLV2 fReadoutListV2; /// Access to the readout list structure with AD included.
935 * @struct AliHLTComponentTriggerData
938 struct AliHLTComponentTriggerData
940 AliHLTUInt32_t fStructSize; /// Size of this structure in bytes.
941 AliHLTUInt32_t fDataSize; /// Size of the data section (following this data member) in bytes.
942 void* fData; /// Start of the data section.
945 //////////////////////////////////////////////////////////////////////////
947 // HLT Event Type Specification
949 //////////////////////////////////////////////////////////////////////////
951 /** Unknown eventType specification */
952 const AliHLTUInt32_t gkAliEventTypeUnknown = ~(AliHLTUInt32_t)0;
953 /** SOR eventType specification */
954 const AliHLTUInt32_t gkAliEventTypeStartOfRun=1;
955 /** Data eventType specification */
956 const AliHLTUInt32_t gkAliEventTypeData=2;
957 /** EOR eventType specification */
958 const AliHLTUInt32_t gkAliEventTypeEndOfRun=4;
959 /** Corrupt eventType specification */
960 const AliHLTUInt32_t gkAliEventTypeCorruptID=8;
961 /** Calibration eventType specification */
962 const AliHLTUInt32_t gkAliEventTypeCalibration=16;
963 /** Software eventType specification */
964 const AliHLTUInt32_t gkAliEventTypeSoftware=24;
965 /** DataReplay eventType specification */
966 const AliHLTUInt32_t gkAliEventTypeDataReplay=32;
967 /** Configuration eventType specification */
968 const AliHLTUInt32_t gkAliEventTypeConfiguration=34;
969 /** Update DCS eventType specification */
970 const AliHLTUInt32_t gkAliEventTypeReadPreprocessor=35;
971 /** Tick eventType specification */
972 const AliHLTUInt32_t gkAliEventTypeTick=64;
973 /** Max eventType specification */
974 const AliHLTUInt32_t gkAliEventTypeMax=64;
976 //////////////////////////////////////////////////////////////////////////
978 // HLT defines and defaults
980 //////////////////////////////////////////////////////////////////////////
983 * @ingroup alihlt_component_datatypes
985 const AliHLTEventID_t kAliHLTVoidEventID=~(AliHLTEventID_t)0;
987 /** invalid data specification
988 * @ingroup alihlt_component_datatypes
990 const AliHLTUInt32_t kAliHLTVoidDataSpec = ~(AliHLTUInt32_t)0;
993 * @ingroup alihlt_component_datatypes
995 const AliHLTUInt32_t kAliHLTVoidRunNo = ~(AliHLTUInt32_t)0;
998 * @ingroup alihlt_component_datatypes
1000 const AliHLTUInt32_t kAliHLTVoidRunType = ~(AliHLTUInt32_t)0;
1002 /** invalid run descriptor
1003 * @ingroup alihlt_component_datatypes
1005 const AliHLTRunDesc kAliHLTVoidRunDesc={sizeof(AliHLTRunDesc), kAliHLTVoidRunNo, kAliHLTVoidRunType};
1007 /** invalid shared memory type */
1008 const AliHLTUInt32_t gkAliHLTComponentInvalidShmType = 0;
1010 /** invalid shared memory id */
1011 const AliHLTUInt64_t gkAliHLTComponentInvalidShmID = ~(AliHLTUInt64_t)0;
1013 /** invalid data type
1014 * @ingroup alihlt_component_datatypes
1016 const AliHLTComponentDataType kAliHLTVoidDataType = {
1017 sizeof(AliHLTComponentDataType),
1018 kAliHLTVoidDataTypeID,
1019 kAliHLTDataOriginVoid
1022 /** all data types, means any + void data type
1023 * @ingroup alihlt_component_datatypes
1025 const AliHLTComponentDataType kAliHLTAllDataTypes = {
1026 sizeof(AliHLTComponentDataType),
1027 kAliHLTAllDataTypesID,
1028 kAliHLTDataOriginAny
1031 // there is currently a problem with rootcint if the predefined ids
1032 // (commented below) are used. rootcint does not find the id if they
1033 // are char arrays defined with {} and individual chars. If strings
1034 // are used it works fine
1036 * @ingroup alihlt_component_datatypes
1038 const AliHLTComponentDataType kAliHLTAnyDataType = {
1039 sizeof(AliHLTComponentDataType),
1040 kAliHLTAnyDataTypeID,
1041 kAliHLTDataOriginAny
1044 /** multiple output data types
1045 * @ingroup alihlt_component_datatypes
1047 extern const AliHLTComponentDataType kAliHLTMultipleDataType;
1049 /** data to file exchange subscriber
1050 * @ingroup alihlt_component_datatypes
1052 extern const AliHLTComponentDataType kAliHLTDataTypeFXSCalib;
1054 /** DDL list data type
1055 * @ingroup alihlt_component_datatypes
1057 extern const AliHLTComponentDataType kAliHLTDataTypeDDL;
1059 /** DAQ readout list
1060 * @ingroup alihlt_component_datatypes
1062 extern const AliHLTComponentDataType kAliHLTDataTypeDAQRDOUT;
1065 * Common data type for the output of cluster finders, the exact
1066 * format depends on the origin (detector)
1067 * @ingroup alihlt_component_datatypes
1069 extern const AliHLTComponentDataType kAliHLTDataTypeClusters;
1072 * @ingroup alihlt_component_datatypes
1074 extern const AliHLTComponentDataType kAliHLTDataTypeSOR;
1077 * @ingroup alihlt_component_datatypes
1079 extern const AliHLTComponentDataType kAliHLTDataTypeEOR;
1081 /** Run type data block
1082 * @ingroup alihlt_component_datatypes
1084 extern const AliHLTComponentDataType kAliHLTDataTypeRunType;
1086 /** Event type specification
1087 * @ingroup alihlt_component_datatypes
1089 extern const AliHLTComponentDataType kAliHLTDataTypeEvent;
1091 /** ECS parameter event
1092 * - sent during the SOR event by the framework
1093 * - contains the full ECS parameter string
1094 * @ingroup alihlt_component_datatypes
1096 extern const AliHLTComponentDataType kAliHLTDataTypeECSParam; // {ECSPARAM:PRIV}
1098 /** Configuration event data type
1099 * @ingroup alihlt_component_datatypes
1101 extern const AliHLTComponentDataType kAliHLTDataTypeComConf;
1103 /** DCS value update event
1104 * @ingroup alihlt_component_datatypes
1106 extern const AliHLTComponentDataType kAliHLTDataTypeUpdtDCS;
1108 /** RAW DDL data specification, origin is 'any', data publisher origin correctly
1109 * @ingroup alihlt_component_datatypes
1111 extern const AliHLTComponentDataType kAliHLTDataTypeDDLRaw;
1113 /** AliMCEvent object data specification, origin is 'OFFL'
1114 * @ingroup alihlt_component_datatypes
1116 extern const AliHLTComponentDataType kAliHLTDataTypeMCObject;
1118 /** ESD vertex object data specification, origin is 'any'
1119 * @ingroup alihlt_component_datatypes
1121 extern const AliHLTComponentDataType kAliHLTDataTypeESDVertex;
1123 /** KF vertex object data specification, origin is 'any'
1124 * @ingroup alihlt_component_datatypes
1126 extern const AliHLTComponentDataType kAliHLTDataTypeKFVertex;
1128 /** global vertexer data specification, origin is 'any'
1129 * @ingroup alihlt_component_datatypes
1131 extern const AliHLTComponentDataType kAliHLTDataTypeGlobalVertexer;
1133 /** primary finder data specification, origin is 'any'
1134 * @ingroup alihlt_component_datatypes
1136 extern const AliHLTComponentDataType kAliHLTDataTypePrimaryFinder;
1138 /** primary finder data specification, origin is 'any'
1139 * @ingroup alihlt_component_datatypes
1141 extern const AliHLTComponentDataType kAliHLTDataTypeV0Finder;
1143 /** flat ESD object data specification, origin is 'any'
1144 * @ingroup alihlt_component_datatypes
1146 extern const AliHLTComponentDataType kAliHLTDataTypeFlatESD;
1148 /** flat ESD friend object data specification, origin is 'any'
1149 * @ingroup alihlt_component_datatypes
1151 extern const AliHLTComponentDataType kAliHLTDataTypeFlatESDFriend;
1153 /** flat ESD vertex object data specification, origin is 'any'
1154 * @ingroup alihlt_component_datatypes
1156 extern const AliHLTComponentDataType kAliHLTDataTypeFlatESDVertex;
1158 /** ESD object data specification, origin is 'any'
1159 * @ingroup alihlt_component_datatypes
1161 extern const AliHLTComponentDataType kAliHLTDataTypeESDObject;
1163 /** ESD friend object data specification, origin is 'any'
1164 * @ingroup alihlt_component_datatypes
1166 extern const AliHLTComponentDataType kAliHLTDataTypeESDfriendObject;
1168 /** ESD content data specification, origin is 'any'
1169 * @ingroup alihlt_component_datatypes
1171 extern const AliHLTComponentDataType kAliHLTDataTypeESDContent;
1173 /** ESD Tree data specification, origin is 'any'
1174 * @ingroup alihlt_component_datatypes
1176 extern const AliHLTComponentDataType kAliHLTDataTypeESDTree;
1178 /** AliRoot TreeD data specification, origin is 'any'
1179 * @ingroup alihlt_component_datatypes
1181 extern const AliHLTComponentDataType kAliHLTDataTypeAliTreeD;
1183 /** AliRoot TreeR data specification, origin is 'any'
1184 * @ingroup alihlt_component_datatypes
1186 extern const AliHLTComponentDataType kAliHLTDataTypeAliTreeR;
1188 /** 16 bit Hardware address selection data specification, origin is 'any'
1189 * @ingroup alihlt_component_datatypes
1191 extern const AliHLTComponentDataType kAliHLTDataTypeHwAddr16;
1193 /** Event statistics
1194 * @ingroup alihlt_component_datatypes
1196 extern const AliHLTComponentDataType kAliHLTDataTypeEventStatistics;
1199 * @ingroup alihlt_component_datatypes
1201 extern const AliHLTComponentDataType kAliHLTDataTypeEventSummary;
1203 /** Event statistics
1204 * @ingroup alihlt_component_datatypes
1206 extern const AliHLTComponentDataType kAliHLTDataTypeRunStatistics;
1209 * @ingroup alihlt_component_datatypes
1211 extern const AliHLTComponentDataType kAliHLTDataTypeRunSummary;
1213 /** Trigger decision
1214 * - origin : kAliHLTDataOriginOut ( HLT )
1215 * @ingroup alihlt_component_datatypes
1217 extern const AliHLTComponentDataType kAliHLTDataTypeTriggerDecision; // {TRIG_DEC:HLT }
1219 /** Trigger decision
1220 * - origin : kAliHLTDataOriginOut ( HLT )
1221 * @ingroup alihlt_component_datatypes
1223 extern const AliHLTComponentDataType kAliHLTDataTypeReadoutList; // {HLTRDLST:HLT }
1225 /** Global trigger decision
1226 * - origin : kAliHLTDataOriginOut ( HLT )
1227 * @ingroup alihlt_component_datatypes
1229 extern const AliHLTComponentDataType kAliHLTDataTypeGlobalTrigger; // {GLOBTRIG:HLT }
1231 /** Component block statistics
1232 * @ingroup alihlt_component_datatypes
1234 extern const AliHLTComponentDataType kAliHLTDataTypeComponentStatistics;
1237 * To be sent on SOR event, each component adds it's chain id string
1238 * and a generated 32bit identifier to the table
1239 * @ingroup alihlt_component_datatypes
1241 extern const AliHLTComponentDataType kAliHLTDataTypeComponentTable;
1243 /** Forwarded component table
1244 * To be sent on SOR event, each component forwards blocks of type
1245 * @ref kAliHLTDataTypeComponentTable was kAliHLTDataTypeComponentFwdTable
1246 * after adding the parent ids to its own table struct.
1247 * @ingroup alihlt_component_datatypes
1249 extern const AliHLTComponentDataType kAliHLTDataTypeComponentFwdTable;
1252 * Data type for the Common Data Header and readout list information sent by TCPDumpSubscriber.
1253 * @ingroup alihlt_component_datatypes
1255 extern const AliHLTComponentDataType kAliHLTDataTypeTriggerMetaBlock; // {METADATA:PRIV}
1257 //////////////////////////////////////////////////////////////////////////
1259 // Data Types for Monitoring objects
1261 //////////////////////////////////////////////////////////////////////////
1263 /** general ROOT TObject
1264 * @ingroup alihlt_component_datatypes
1266 extern const AliHLTComponentDataType kAliHLTDataTypeTObject; // {ROOTTOBJ,"***"}
1268 /** ROOT streamer info
1269 * @ingroup alihlt_component_datatypes
1271 extern const AliHLTComponentDataType kAliHLTDataTypeStreamerInfo; // {ROOTSTRI,HLT }
1274 * @ingroup alihlt_component_datatypes
1276 extern const AliHLTComponentDataType kAliHLTDataTypeTObjArray; // {ROOTOBAR,"***"}
1279 * @ingroup alihlt_component_datatypes
1281 extern const AliHLTComponentDataType kAliHLTDataTypeTTree; // {ROOTTREE,"***"}
1283 /** ROOT TH1 (can be used for all histograms, they derive from TH1)
1284 * @ingroup alihlt_component_datatypes
1286 extern const AliHLTComponentDataType kAliHLTDataTypeHistogram; // {ROOTHIST,"***"}
1289 * @ingroup alihlt_component_datatypes
1291 extern const AliHLTComponentDataType kAliHLTDataTypeTNtuple; // {ROOTTUPL,"***"}
1293 /** Global input trigger counters.
1294 * - origin : kAliHLTDataOriginOut ( HLT )
1295 * @ingroup alihlt_component_datatypes
1297 extern const AliHLTComponentDataType kAliHLTDataTypeInputTriggerCounters; // {INTRGCNT:HLT }
1299 /** Global output trigger counters.
1300 * - origin : kAliHLTDataOriginOut ( HLT )
1301 * @ingroup alihlt_component_datatypes
1303 extern const AliHLTComponentDataType kAliHLTDataTypeOutputTriggerCounters; // {OTTRGCNT:HLT }
1305 /** General track array for the barrel tracks based on AliExternalTrackParam
1306 * Data format defined by AliHLTTracksData
1308 * We follow the naming scheme of AliESDEvent where 'Tracks' denote the
1309 * barrel tracks and detector tracks get names 'DETTracks'
1310 * @ingroup alihlt_component_datatypes
1312 extern const AliHLTComponentDataType kAliHLTDataTypeTrack; // {HLTTRACK,"***"}
1314 /** Track Monte Carlo information
1316 extern const AliHLTComponentDataType kAliHLTDataTypeTrackMC; // {TRACK_MC,"***"}
1318 /** TClonesArray of AliExternalTrackParam
1319 * @ingroup alihlt_component_datatypes
1321 extern const AliHLTComponentDataType kAliHLTDataTypeExternalTrackParam; // {TCAEXTTR,"***"}
1323 /** Container containing jets (AliHLTJETJets)
1324 * Containing TClonesArray of AliAODJets
1325 * @ingroup alihlt_component_datatypes
1327 extern const AliHLTComponentDataType kAliHLTDataTypeJet; // {HLTJETV0,"***"}
1329 /** Container of ITS tracks
1330 * @ingroup alihlt_component_datatypes
1332 extern const AliHLTComponentDataType fgkITSTracksDataType;
1334 /** Container of ITS SAP tracker data
1335 * @ingroup alihlt_component_datatypes
1337 extern const AliHLTComponentDataType kAliHLTDataTypeITSSAPData;
1339 /** Container of calorimeter clusters
1340 * @ingroup alihlt_component_datatypes
1342 extern const AliHLTComponentDataType kAliHLTDataTypeCaloCluster;
1344 /** Container of dEdx
1345 * @ingroup alihlt_component_datatypes
1347 extern const AliHLTComponentDataType kAliHLTDataTypedEdx;
1349 /** Container of dNdPt
1350 * @ingroup alihlt_component_datatypes
1352 extern const AliHLTComponentDataType kAliHLTDataTypedNdPt;
1354 //////////////////////////////////////////////////////////////////////////
1356 // FXS subscriber meta information
1358 //////////////////////////////////////////////////////////////////////////
1360 const int gkAliHLTFXSHeaderfOriginSize = 4;
1361 const int gkAliHLTFXSHeaderfFileIDSize = 128;
1362 const int gkAliHLTFXSHeaderfDDLNumberSize = 64;
1364 /** Header in front of the data payload, in order to sent data to the FXS. */
1365 struct AliHLTFXSHeader
1367 AliHLTUInt32_t fHeaderVersion; /// HLT software version number.
1368 AliHLTUInt32_t fRunNumber; /// The current run number.
1369 char fOrigin[gkAliHLTFXSHeaderfOriginSize]; /// The detector from which the FXS data is received.
1370 char fFileID[gkAliHLTFXSHeaderfFileIDSize]; /// File identifier for the stored data.
1371 char fDDLNumber[gkAliHLTFXSHeaderfDDLNumberSize]; /// The DDL bits.
1374 //////////////////////////////////////////////////////////////////////////
1376 // Component running environment
1378 //////////////////////////////////////////////////////////////////////////
1380 /** definition of a void fct pointer */
1381 typedef void (*AliHLTfctVoid)();
1383 /** logging function */
1384 typedef int (*AliHLTfctLogging)( void* param,
1385 AliHLTComponentLogSeverity severity,
1387 const char* keyword,
1388 const char* message);
1391 * @struct AliHLTAnalysisEnvironment
1392 * Running environment for analysis components.
1393 * The struct describes function callbacks for actions to be
1394 * carried out by the calling framework, like memory allocation,
1395 * property callbecks, logging, etc.
1397 * @ingroup alihlt_wrapper_interface
1399 struct AliHLTAnalysisEnvironment
1401 /** size of the structure */
1402 AliHLTUInt32_t fStructSize;
1404 /** the component parameter given by the framework on creation */
1407 /** allocated memory */
1408 void* (*fAllocMemoryFunc)( void* param, unsigned long size );
1410 /** allocate an EventDoneData structure. */
1411 int (*fGetEventDoneDataFunc)( void* param, AliHLTEventID_t eventID, unsigned long size, AliHLTComponentEventDoneData** edd );
1413 /** logging callback */
1414 AliHLTfctLogging fLoggingFunc;
1417 // I just keep this as a note pad. Has to be added to the end of the structure
1418 // future addition already foreseen/envisioned
1419 // IMPORTANT: don not just remove the defines as this breaks the binary
1421 int (*fAllocShmMemoryFunc)( void* param, unsigned long size, AliHLTComponentBlockData* blockLocation );
1425 * @struct AliHLTComponentEnvironment
1426 * This was the original definition of the running environment.
1427 * Due to a bug in the AliRootWrapperSubscriber/SimpleComponentWrapper,
1428 * this structure can not be used any longer but is kept for backward
1430 * @note The external interface provided by the libHLTbase is now kept
1431 * frozen but should not be used any more. Use the interface provided
1432 * by the libHLTinterface library.
1434 * @ingroup alihlt_wrapper_interface_deprecated
1436 struct AliHLTComponentEnvironment
1438 AliHLTUInt32_t fStructSize;
1440 void* (*fAllocMemoryFunc)( void* param, unsigned long size );
1441 int (*fGetEventDoneDataFunc)( void* param, AliHLTEventID_t eventID, unsigned long size, AliHLTComponentEventDoneData** edd );
1442 AliHLTfctLogging fLoggingFunc;
1445 //////////////////////////////////////////////////////////////////////////
1447 // The external interface definition
1449 //////////////////////////////////////////////////////////////////////////
1452 * The component handle.
1453 * Used as indification in the outside world.
1454 * @ingroup alihlt_wrapper_interface
1456 typedef void* AliHLTComponentHandle;
1458 /** @ingroup alihlt_wrapper_interface */
1459 const AliHLTComponentHandle kEmptyHLTComponentHandle = 0;
1462 * Get a system call of the interface.
1463 * @param function signature
1464 * @return pointer to system call
1465 * @ingroup alihlt_wrapper_interface
1467 typedef void* (*AliHLTAnalysisFctGetInterfaceCall)(const char*);
1469 # define ALIHLTANALYSIS_INTERFACE_LIBRARY "libHLTinterface.so"
1470 # define ALIHLTANALYSIS_FCT_GETINTERFACECALL "AliHLTAnalysisGetInterfaceCall"
1472 /** @ingroup alihlt_wrapper_interface */
1473 typedef int (*AliHLTExtFctInitSystem)( unsigned long version, AliHLTAnalysisEnvironment* externalEnv, unsigned long runNo, const char* runType );
1475 /** @ingroup alihlt_wrapper_interface */
1476 typedef int (*AliHLTExtFctDeinitSystem)();
1478 /** @ingroup alihlt_wrapper_interface */
1479 typedef int (*AliHLTExtFctLoadLibrary)( const char* );
1481 /** @ingroup alihlt_wrapper_interface */
1482 typedef int (*AliHLTExtFctUnloadLibrary)( const char* );
1484 /** @ingroup alihlt_wrapper_interface */
1485 typedef int (*AliHLTExtFctCreateComponent)( const char*, void*, int, const char**, AliHLTComponentHandle*, const char* description );
1487 /** @ingroup alihlt_wrapper_interface */
1488 typedef int (*AliHLTExtFctDestroyComponent)( AliHLTComponentHandle );
1490 /** @ingroup alihlt_wrapper_interface */
1491 typedef int (*AliHLTExtFctProcessEvent)( AliHLTComponentHandle, const AliHLTComponentEventData*, const AliHLTComponentBlockData*,
1492 AliHLTComponentTriggerData*, AliHLTUInt8_t*,
1493 AliHLTUInt32_t*, AliHLTUInt32_t*,
1494 AliHLTComponentBlockData**,
1495 AliHLTComponentEventDoneData** );
1497 /** @ingroup alihlt_wrapper_interface */
1498 typedef int (*AliHLTExtFctGetOutputDataType)( AliHLTComponentHandle, AliHLTComponentDataType* );
1500 /** @ingroup alihlt_wrapper_interface */
1501 typedef int (*AliHLTExtFctGetOutputSize)( AliHLTComponentHandle, unsigned long*, double* );
1506 typedef std::bitset<NCTPTRIGGERCLASSES> AliHLTTriggerMask_t;
1508 using namespace std;
1510 //////////////////////////////////////////////////////////////////////////
1512 // Data type helper functions
1514 //////////////////////////////////////////////////////////////////////////
1516 /** exact comparison of HLT component data types
1517 * @ingroup alihlt_component_datatypes
1519 inline bool MatchExactly( const AliHLTComponentDataType& dt1, const AliHLTComponentDataType& dt2 )
1521 for ( int i = 0; i < kAliHLTComponentDataTypefIDsize; i++ )
1522 if ( dt1.fID[i] != dt2.fID[i] )
1524 for ( int i = 0; i < kAliHLTComponentDataTypefOriginSize; i++ )
1525 if ( dt1.fOrigin[i] != dt2.fOrigin[i] )
1530 /** Comparison operator for HLT component data types.
1531 * The operator takes wildcards into account, i.e. the ::kAliHLTAnyDataType,
1532 * ::kAliHLTAnyDataTypeID and ::kAliHLTDataOriginAny definitions.
1533 * @ingroup alihlt_component_datatypes
1535 inline bool operator==( const AliHLTComponentDataType& dt1, const AliHLTComponentDataType& dt2 )
1537 if (MatchExactly(dt1, kAliHLTAllDataTypes)) return true;
1538 if (MatchExactly(dt2, kAliHLTAllDataTypes)) return true;
1540 bool any1=true, any2=true, void1=true, void2=true, match=true;
1541 for ( int i = 0; i < kAliHLTComponentDataTypefOriginSize; i++ ) {
1542 any1&=(dt1.fOrigin[i]==kAliHLTDataOriginAny[i]);
1543 any2&=(dt2.fOrigin[i]==kAliHLTDataOriginAny[i]);
1544 void1&=(dt1.fOrigin[i]==kAliHLTDataOriginVoid[i]);
1545 void2&=(dt2.fOrigin[i]==kAliHLTDataOriginVoid[i]);
1546 match&=dt1.fOrigin[i]==dt2.fOrigin[i];
1547 if (!(match || (any2 && !void1) || (any1 && !void2)))
1551 any1=true, any2=true, match=true;
1552 for ( int i = 0; i < kAliHLTComponentDataTypefIDsize; i++ ) {
1553 any1&=(dt1.fID[i]==kAliHLTAnyDataTypeID[i]);
1554 any2&=(dt2.fID[i]==kAliHLTAnyDataTypeID[i]);
1555 void1&=(dt1.fID[i]==kAliHLTVoidDataTypeID[i]);
1556 void2&=(dt2.fID[i]==kAliHLTVoidDataTypeID[i]);
1557 match&=dt1.fID[i]==dt2.fID[i];
1558 if (!(match || (any2 && !void1) || (any1 && !void2)))
1564 /** Comparison operator for HLT component data types
1565 * Invers of operator==
1566 * @ingroup alihlt_component_datatypes
1568 inline bool operator!=( const AliHLTComponentDataType& dt1, const AliHLTComponentDataType& dt2 )
1573 /** merge operator for HLT component data types and origins
1574 * @ingroup alihlt_component_datatypes
1576 inline AliHLTComponentDataType operator|(const AliHLTComponentDataType srcdt, const char origin[kAliHLTComponentDataTypefOriginSize])
1578 AliHLTComponentDataType dt=srcdt;
1579 for ( int i = 0; i < kAliHLTComponentDataTypefOriginSize; i++ )
1580 dt.fOrigin[i]=origin[i];
1585 * Helper function to initialize a data type from an id char array and origin string.
1586 * @return data type structure initialized with the specified id and origin
1587 * @ingroup alihlt_component_datatypes
1589 inline AliHLTComponentDataType AliHLTComponentDataTypeInitializer(const char id[kAliHLTComponentDataTypefIDsize], const char* origin)
1591 AliHLTComponentDataType dt=kAliHLTVoidDataType;
1593 for (i = 0; i < kAliHLTComponentDataTypefIDsize && id[i]!=0; i++)
1595 for (i = 0; i < kAliHLTComponentDataTypefOriginSize && origin[i]!=0; i++ )
1596 dt.fOrigin[i]=origin[i];
1601 * Helper function to initialize a data type from a default data type and
1602 * an origin string. Basically it merges the specified origin into the data
1604 * @return data type structure initialized with the id from specified data type
1606 * @ingroup alihlt_component_datatypes
1608 inline AliHLTComponentDataType AliHLTComponentDataTypeInitializer(const AliHLTComponentDataType src, const char* origin)
1610 return AliHLTComponentDataTypeInitializer(src.fID, origin);