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.)
75 #define ALIHLT_DATA_TYPES_VERSION 17
77 //////////////////////////////////////////////////////////////////////////
79 // HLT data origin variables.
81 // By converting from defines to variables, the origins can be used with
84 // AliHLTComponentDataType dt;
85 // dt = kAliHLTDataTypeDDLRaw | kAliHLTDataOriginTPC;
87 //////////////////////////////////////////////////////////////////////////
89 /** field size of datat type origin
90 * @ingroup alihlt_component_datatypes
92 const int kAliHLTComponentDataTypefOriginSize=4;
95 /** invalid data origin
96 * @ingroup alihlt_component_datatypes
98 # define kAliHLTDataOriginVoid "\0\0\0"
99 /** old invalid data origin, kept for backward compatibility */
100 # define kAliHLTVoidDataOrigin "\0\0\0"
102 /** wildcard data type origin
103 * @ingroup alihlt_component_datatypes
105 # define kAliHLTDataOriginAny "***"
106 /** old wildcard data type origin, kept for backward compatibility */
107 # define kAliHLTAnyDataOrigin "***"
109 /** Data origin HLT out
110 * @ingroup alihlt_component_datatypes
112 extern const char kAliHLTDataOriginOut[kAliHLTComponentDataTypefOriginSize];
114 /** Data origin HLT, used for HLT specifc data
115 * in offline chains. This not a bug!
116 * @ingroup alihlt_component_datatypes
118 extern const char kAliHLTDataOriginHLT[kAliHLTComponentDataTypefOriginSize];
120 /** Data origin Offline
121 * @ingroup alihlt_component_datatypes
123 extern const char kAliHLTDataOriginOffline[kAliHLTComponentDataTypefOriginSize];
125 /** Data origin HLT/PubSub private internal
126 * @ingroup alihlt_component_datatypes
128 extern const char kAliHLTDataOriginPrivate[kAliHLTComponentDataTypefOriginSize];
131 * @ingroup alihlt_component_datatypes
133 extern const char kAliHLTDataOriginTPC[kAliHLTComponentDataTypefOriginSize];
136 * @ingroup alihlt_component_datatypes
138 extern const char kAliHLTDataOriginPHOS[kAliHLTComponentDataTypefOriginSize];
141 * @ingroup alihlt_component_datatypes
143 extern const char kAliHLTDataOriginFMD[kAliHLTComponentDataTypefOriginSize];
146 * @ingroup alihlt_component_datatypes
148 extern const char kAliHLTDataOriginMUON[kAliHLTComponentDataTypefOriginSize];
151 * @ingroup alihlt_component_datatypes
153 extern const char kAliHLTDataOriginTRD[kAliHLTComponentDataTypefOriginSize];
156 * @ingroup alihlt_component_datatypes
158 extern const char kAliHLTDataOriginITS[kAliHLTComponentDataTypefOriginSize];
160 /** Data origin ITSOut
161 * @ingroup alihlt_component_datatypes
163 extern const char kAliHLTDataOriginITSOut[kAliHLTComponentDataTypefOriginSize];
165 /** Data origin ITS SPD
166 * @ingroup alihlt_component_datatypes
168 extern const char kAliHLTDataOriginITSSPD[kAliHLTComponentDataTypefOriginSize];
170 /** Data origin ITS SDD
171 * @ingroup alihlt_component_datatypes
173 extern const char kAliHLTDataOriginITSSDD[kAliHLTComponentDataTypefOriginSize];
175 /** Data origin ITS SSD
176 * @ingroup alihlt_component_datatypes
178 extern const char kAliHLTDataOriginITSSSD[kAliHLTComponentDataTypefOriginSize];
180 /** Data origin for examples
181 * @ingroup alihlt_component_datatypes
183 extern const char kAliHLTDataOriginSample[kAliHLTComponentDataTypefOriginSize];
185 /** Data origin EMCAL
186 * @ingroup alihlt_component_datatypes
188 extern const char kAliHLTDataOriginEMCAL[kAliHLTComponentDataTypefOriginSize];
191 * @ingroup alihlt_component_datatypes
193 extern const char kAliHLTDataOriginTOF[kAliHLTComponentDataTypefOriginSize];
195 /** Data origin HMPID
196 * @ingroup alihlt_component_datatypes
198 extern const char kAliHLTDataOriginHMPID[kAliHLTComponentDataTypefOriginSize];
201 * @ingroup alihlt_component_datatypes
203 extern const char kAliHLTDataOriginCPV[kAliHLTComponentDataTypefOriginSize];
206 * @ingroup alihlt_component_datatypes
208 extern const char kAliHLTDataOriginPMD[kAliHLTComponentDataTypefOriginSize];
211 * @ingroup alihlt_component_datatypes
213 extern const char kAliHLTDataOriginT0[kAliHLTComponentDataTypefOriginSize];
215 /** Data origin VZERO
216 * @ingroup alihlt_component_datatypes
218 extern const char kAliHLTDataOriginVZERO[kAliHLTComponentDataTypefOriginSize];
221 * @ingroup alihlt_component_datatypes
223 extern const char kAliHLTDataOriginZDC[kAliHLTComponentDataTypefOriginSize];
225 /** Data origin ACORDE
226 * @ingroup alihlt_component_datatypes
229 extern const char kAliHLTDataOriginACORDE[kAliHLTComponentDataTypefOriginSize];
232 * @ingroup alihlt_component_datatypes
234 extern const char kAliHLTDataOriginTRG[kAliHLTComponentDataTypefOriginSize];
236 //////////////////////////////////////////////////////////////////////////
238 // HLT common data type defines
240 //////////////////////////////////////////////////////////////////////////
242 /** field size of data type id
243 * @ingroup alihlt_component_datatypes
245 const int kAliHLTComponentDataTypefIDsize=8;
248 /** invalid data type id
249 * @ingroup alihlt_component_datatypes
251 # define kAliHLTVoidDataTypeID "\0\0\0\0\0\0\0"
253 /** special id for all data types: any + void
254 * @ingroup alihlt_component_datatypes
256 # define kAliHLTAllDataTypesID "ALLDATA"
258 /** special id for any valid data type id
259 * @ingroup alihlt_component_datatypes
261 # define kAliHLTAnyDataTypeID "*******"
264 * @ingroup alihlt_component_datatypes
266 # define kAliHLTDDLRawDataTypeID {'D','D','L','_','R','A','W',' '}
269 * Common data type for the output of cluster finders, the exact
270 * format depends on the origin (detector)
271 * @ingroup alihlt_component_datatypes
273 # define kAliHLTClustersDataTypeID {'C','L','U','S','T','E','R','S'}
275 /** calibration data for file exchange subscriber
276 * @ingroup alihlt_component_datatypes
278 # define kAliHLTFXSCalibDataTypeID {'F','X','S','_','C','A','L',' '}
280 /** start of run (SOR) event
282 * @ingroup alihlt_component_datatypes
284 # define kAliHLTSORDataTypeID {'S','T','A','R','T','O','F','R'}
286 /** end of run (EOR) event
288 * @ingroup alihlt_component_datatypes
290 # define kAliHLTEORDataTypeID {'E','N','D','O','F','R','U','N'}
292 /** run type data block
293 * string with run type as payload
294 * @ingroup alihlt_component_datatypes
296 # define kAliHLTRunTypeDataTypeID {'R','U','N','T','Y','P','E',' '}
299 * @ref AliHLTEventDDL
300 * @ingroup alihlt_component_datatypes
302 # define kAliHLTDDLDataTypeID {'D','D','L','L','I','S','T',' '}
305 * @ingroup alihlt_component_datatypes
307 # define kAliHLTDAQRDOUTDataTypeID "DAQRDOUT"
309 /** HLT readout list.
310 * @ingroup alihlt_component_datatypes
312 # define kAliHLTReadoutListDataTypeID {'H','L','T','R','D','L','S','T'}
315 * - empty payload, specification gives eventType
316 * @ingroup alihlt_component_datatypes
318 # define kAliHLTEventDataTypeID {'E','V','E','N','T','T','Y','P'}
320 /** ECS parameter event
321 * - sent during the SOR event by the framework
322 * - contains the full ECS parameter string
323 * @ingroup alihlt_component_datatypes
325 # define kAliHLTECSParamDataTypeID {'E','C','S','P','A','R','A','M'}
327 /** ComponentConfiguration event
328 * - payload contains the CDB path as string
329 * @ingroup alihlt_component_datatypes
331 # define kAliHLTComConfDataTypeID {'C','O','M','_','C','O','N','F'}
333 /** DCS value update event
334 * - payload contains string of relevant detectors
335 * @ingroup alihlt_component_datatypes
337 # define kAliHLTUpdtDCSDataTypeID {'U','P','D','T','_','D','C','S'}
340 * an AliMCEvent object of varying origin
341 * The 'V0' at the end allows a versioning
342 * @ingroup alihlt_component_datatypes
344 # define kAliHLTMCObjectDataTypeID {'A','L','I','M','C','_','V','0'}
346 /** ESDVertex data block
347 * an AliESDVertex object of varying origin
348 * The 'V0' at the end allows a versioning
349 * @ingroup alihlt_component_datatypes
351 # define kAliHLTESDVertexDataTypeID {'E','S','D','V','T','X','V','0'}
353 /** KFVertex data block
354 * an AliKFVertex object of varying origin
355 * The 'V0' at the end allows a versioning
356 * @ingroup alihlt_component_datatypes
358 # define kAliHLTKFVertexDataTypeID {'A','L','I','K','F','V','V','0'}
361 /** output of the GlobalVertexer data block
362 * The 'V0' at the end allows a versioning
363 * @ingroup alihlt_component_datatypes
365 # define kAliHLTDataTypeGlobalVertexerID {'G','L','B','V','T','X','V','0'}
367 /** output of the PrimaryFinder data block
368 * The 'V0' at the end allows a versioning
369 * @ingroup alihlt_component_datatypes
371 # define kAliHLTDataTypePrimaryFinderID {'P','R','I','V','T','X','V','0'}
373 /** output of the V0Finder data block
374 * The 'V0' at the end allows a versioning
375 * @ingroup alihlt_component_datatypes
377 # define kAliHLTDataTypeV0FinderID {'V','0','S','V','T','X','V','0'}
380 * an AliESD object of varying origin
381 * The 'V0' at the end allows a versioning
382 * @ingroup alihlt_component_datatypes
384 # define kAliHLTESDObjectDataTypeID {'A','L','I','E','S','D','V','0'}
386 /** ESD friend data block
387 * an AliESDfriend object of varying origin
388 * The 'V0' at the end allows a versioning
389 * @ingroup alihlt_component_datatypes
391 # define kAliHLTESDfriendObjectDataTypeID {'E','S','D','F','R','N','D','0'}
393 /** Flat ESD Vertex data block
394 * The '0' at the end allows a versioning
395 * @ingroup alihlt_component_datatypes
397 # define kAliHLTFlatESDVertexDataTypeID {'F','L','A','T','V','T','X','0'}
399 /** Flat ESD data block
400 * an AliFlatESD object of varying origin
401 * The '0' at the end allows a versioning
402 * @ingroup alihlt_component_datatypes
404 # define kAliHLTFlatESDDataTypeID {'F','L','A','T','E','S','D','0'}
407 * data blocks designated for the ESD
408 * @ingroup alihlt_component_datatypes
410 # define kAliHLTESDContentDataTypeID {'E','S','D','_','C','O','N','T'}
412 /** ESD tree data block
413 * TTree with an AliESD object of varying origin
414 * @ingroup alihlt_component_datatypes
416 # define kAliHLTESDTreeDataTypeID {'E','S','D','_','T','R','E','E'}
419 * - the digits tree of an AliRoot module
420 * @ingroup alihlt_component_datatypes
422 #define kAliHLTTreeDDataTypeID {'A','L','I','T','R','E','E','D'}
425 * - the rec points tree of an AliRoot module
426 * @ingroup alihlt_component_datatypes
428 #define kAliHLTTreeRDataTypeID {'A','L','I','T','R','E','E','R'}
430 /** HW Address selection data block
431 * - a selection list for 16 bit HW addresses
433 * @ingroup alihlt_component_datatypes
435 # define kAliHLTHwAddr16DataTypeID {'H','W','A','D','D','R','1','6'}
438 * - event statistics for given detectors
440 * @ingroup alihlt_component_datatypes
442 # define kAliHLTEventStatisticsDataTypeID {'E','V','_','S','T','A','T','I'}
446 * - origin : kAliHLTDataOriginOut ( HLT )
447 * @ingroup alihlt_component_datatypes
449 # define kAliHLTEventSummaryDataTypeID {'E','V','_','S','U','M','M','A'}
452 * - run statistics for given detectors
454 * @ingroup alihlt_component_datatypes
456 # define kAliHLTRunStatisticsDataTypeID {'R','U','N','S','T','A','T','I'}
460 * - origin : kAliHLTDataOriginOut ( HLT )
461 * @ingroup alihlt_component_datatypes
463 # define kAliHLTRunSummaryDataTypeID {'R','U','N','S','U','M','M','A'}
466 * - origin : kAliHLTDataOriginOut ( HLT )
467 * @ingroup alihlt_component_datatypes
469 # define kAliHLTTriggerDecisionDataTypeID {'T','R','I','G','_','D','E','C'}
471 /** Global trigger decision
472 * - origin : kAliHLTDataOriginOut ( HLT )
473 * @ingroup alihlt_component_datatypes
475 # define kAliHLTGlobalTriggerDataTypeID {'G','L','O','B','T','R','I','G'}
478 * - small block statistics info added to the data stream by
479 * the component base class
480 * - origin kAliHLTDataOriginPrivate
481 * @ingroup alihlt_component_datatypes
483 # define kAliHLTComponentStatisticsDataTypeID {'C','O','M','P','S','T','A','T'}
486 * - list of components in the chain to be percolated through the chain
487 * - each component adds it's chain id string and a generated 32bit id
488 * @ingroup alihlt_component_datatypes
490 # define kAliHLTComponentTableDataTypeID {'C','O','M','P','T','A','B','L'}
492 /** Forwarded component table
493 * @ingroup alihlt_component_datatypes
495 # define kAliHLTComponentFwdTableDataTypeID {'C','O','M','P','T','A','B','F'}
497 /** general ROOT TObject
498 * - a general TObject exported from the HLT analysis
500 * @ingroup alihlt_component_datatypes
502 #define kAliHLTTObjectDataTypeID {'R','O','O','T','T','O','B','J'}
504 /** ROOT streamer info
505 * - used for the transmission of streamer info for objects in the HLTOUT
506 * - origin kAliHLTDataOriginOut ( HLT )
507 * @ingroup alihlt_component_datatypes
509 #define kAliHLTStreamerInfoDataTypeID {'R','O','O','T','S','T','R','I'}
512 * - a TObjArray exported from the HLT analysis
514 * @ingroup alihlt_component_datatypes
516 #define kAliHLTTObjArrayDataTypeID {'R','O','O','T','O','B','A','R'}
519 * - a TTree object exported from the HLT analysis
521 * @ingroup alihlt_component_datatypes
523 #define kAliHLTTTreeDataTypeID {'R','O','O','T','T','R','E','E'}
526 * - a histogram object exported from the HLT analysis
527 * - class derives from TH1 (directly or indirectly) and inherits all common functionality
529 * @ingroup alihlt_component_datatypes
531 #define kAliHLTHistogramDataTypeID {'R','O','O','T','H','I','S','T'}
534 * - a TNtupl object exported from the HLT analysis
536 * @ingroup alihlt_component_datatypes
538 #define kAliHLTTNtupleDataTypeID {'R','O','O','T','T','U','P','L'}
541 * - Struct for Tracks based on AliExternalTrackParam
543 * @ingroup alihlt_component_datatypes
545 #define kAliHLTTrackDataTypeID {'H','L','T','T','R','A','C','K'}
547 /** Track Monte Carlo information
548 * @ingroup alihlt_component_datatypes
550 #define kAliHLTTrackMCDataTypeID {'T','R','A','C','K','_','M','C'}
552 /** TClonesArray of AliExternalTrackParam
553 * @ingroup alihlt_component_datatypes
555 #define kAliHLTExternalTrackParamDataTypeID {'T','C','A','E','X','T','T','R'}
558 * - Struct for jets based on AliHLTJETJets
560 * @ingroup alihlt_component_datatypes
562 #define kAliHLTJetDataTypeID {'H','L','T','J','E','T','V','0'}
565 * Common data type for the dEdx
566 * format depends on the origin (detector)
567 * @ingroup alihlt_component_datatypes
569 # define kAliHLTdEdxDataTypeID {'D','E','D','X',' ',' ',' ',' '}
572 * Common data type for the dNdPt output object
573 * @ingroup alihlt_component_datatypes
575 # define kAliHLTdNdPtDataTypeID {'D','N','D','P','T',' ',' ',' '}
577 /** Global input trigger counters data block type.
578 * @ingroup alihlt_component_datatypes
580 # define kAliHLTInputTriggerCountersDataTypeID {'I','N','T','R','G','C','N','T'}
582 /** Global output trigger counters data block type.
583 * @ingroup alihlt_component_datatypes
585 # define kAliHLTOutputTriggerCountersDataTypeID {'O','T','T','R','G','C','N','T'}
587 /** Generic meta data block type ID.
588 * @ingroup alihlt_component_datatypes
590 # define kAliHLTMetaDataTypeID {'M','E','T','A','D','A','T','A'}
593 //////////////////////////////////////////////////////////////////////////
595 // Basic HLT data types
597 //////////////////////////////////////////////////////////////////////////
599 typedef unsigned char AliHLTUInt8_t;
601 typedef signed char AliHLTInt8_t;
603 typedef unsigned short AliHLTUInt16_t;
605 typedef signed short AliHLTInt16_t;
607 typedef unsigned int AliHLTUInt32_t;
609 typedef signed int AliHLTInt32_t;
611 typedef unsigned long long AliHLTUInt64_t;
613 typedef signed long long AliHLTInt64_t;
615 typedef float AliHLTFloat32_t;
617 typedef double AliHLTFloat64_t;
619 typedef AliHLTUInt64_t AliHLTEventID_t;
621 //////////////////////////////////////////////////////////////////////////
623 // HLT logging levels
625 //////////////////////////////////////////////////////////////////////////
628 * Logging severities of the HLT
630 enum AliHLTComponentLogSeverity {
633 /** benchmark messages */
634 kHLTLogBenchmark = 0x1,
635 /** debug messages */
639 /** warning messages */
640 kHLTLogWarning = 0x8,
641 /** error messages */
643 /** fatal error messages */
645 /** few important messages not to be filtered out.
646 * redirected to kHLTLogInfo in AliRoot
648 kHLTLogImportant = 0x40,
649 /** special value to enable all messages */
651 /** the default logging filter */
652 kHLTLogDefault = 0x79
655 //////////////////////////////////////////////////////////////////////////
657 // HLT data structures for data exchange and external interface
659 //////////////////////////////////////////////////////////////////////////
662 * @struct AliHLTComponentEventData
665 struct AliHLTComponentEventData
667 AliHLTUInt32_t fStructSize; /// Size of this structure in bytes.
668 AliHLTEventID_t fEventID; /// 64 bit event ID number.
669 AliHLTUInt32_t fEventCreation_s; /// Event creation time in seconds (Should be added to fEventCreation_us*1e6).
670 AliHLTUInt32_t fEventCreation_us; /// Fractional event creation time in micro seconds.
671 AliHLTUInt32_t fBlockCnt; /// The number of raw data blocks received by the component.
675 * @struct AliHLTComponentShmData
676 * Shared memory descriptor.
677 * Irrelevant for analysis components.
679 struct AliHLTComponentShmData
681 AliHLTUInt32_t fStructSize; /// Size of this structure in bytes.
682 AliHLTUInt32_t fShmType; /// The type code of the shared memory.
683 AliHLTUInt64_t fShmID; /// The shared memory identifier.
687 * @defgroup alihlt_component_datatypes Common Component Data Types
688 * The analysis framework defines a number of common data types for
689 * usage in the detector modules, like e.g. ::kAliHLTAnyDataType
690 * and ::kAliHLTDataTypeDDLRaw. Those data types always have
691 * origin ::kAliHLTDataOriginAny. The correct detector origin can be
692 * set by using operator '|'
694 * AliHLTComponentDataType dt=kAliHLTDDLRawDataTypeID|kAliHLTDataOriginTPC
696 * @ingroup alihlt_component
700 * @struct AliHLTComponentDataType
701 * Data type descriptor for data blocks transferred through the processing
703 * @ingroup alihlt_component_datatypes
705 struct AliHLTComponentDataType
707 AliHLTUInt32_t fStructSize; /// Size of this structure in bytes.
708 char fID[kAliHLTComponentDataTypefIDsize]; /// Data type identifier.
709 char fOrigin[kAliHLTComponentDataTypefOriginSize]; /// Subsystem or detector origin of the data.
713 * @struct AliHLTComponentBlockData
714 * This is the decription of data blocks exchanged between components.
715 * \b IMPORTANT: The validity of fPtr and fOffset is different for input and
717 * - input blocks: The \em fPtr member always points to the beginning of the data
718 * of size \em fSize. fOffset is ignored and should be in most
720 * - output blocks: The \em fPtr member is ignored by the framework. \em fOffset
721 * must specify the start of the data relative to the output
722 * buffer. The data block has size \em fSize.
724 struct AliHLTComponentBlockData
726 /** size and version of the struct */
727 AliHLTUInt32_t fStructSize;
728 /** shared memory key, ignored by processing components */
729 AliHLTComponentShmData fShmKey;
730 /** offset of output data relative to the output buffer */
731 AliHLTUInt32_t fOffset;
732 /** start of the data for input data blocks, fOffset to be ignored*/
734 /** size of the data block */
735 AliHLTUInt32_t fSize;
736 /** data type of the data block */
737 AliHLTComponentDataType fDataType;
738 /** data specification of the data block */
739 AliHLTUInt32_t fSpecification;
741 AliHLTComponentDataType GetDataType() const {return fDataType;}
742 AliHLTUInt32_t GetSpecification() const {return fSpecification;}
746 * @struct AliHLTComponentEventDoneData
749 struct AliHLTComponentEventDoneData
751 AliHLTUInt32_t fStructSize; /// Size of this structure in bytes.
752 AliHLTUInt32_t fDataSize; /// Size of the data section (following this data member) in bytes.
753 void* fData; /// Start of the data section.
757 * @struct AliHLTRunDesc
759 * The struct is sent with the SOR and EOR events.
762 * The name of the member fRunType is a bit misleading. This is not
763 * the ALICE Run Type given by the ECS to the sub-system. The member
764 * is an internal HLT run type and a combination of the HLT running
765 * mode and the beam type.
767 * Bit 0-2: beam type identifier
773 AliHLTUInt32_t fStructSize; /// Size of this structure in bytes.
774 AliHLTUInt32_t fRunNo; /// The run number for the current active run.
775 AliHLTUInt32_t fRunType; /// The HLT run type.
779 * @struct AliHLTComponentStatistics
780 * Small block size summary added by the AliHLTComponent base class
781 * if component statistics are enabled (--enable-compstat).
783 * fLevel is retrieved from incoming block statistics and incremented.
784 * Incoming block statistics are appended to the newly added one if
785 * --enable-compstat=full has been chosen.
788 * 2009-01-14 fComponentCycleTime added
790 struct AliHLTComponentStatistics
792 AliHLTUInt32_t fStructSize; /// Size of this structure in bytes.
793 AliHLTUInt32_t fLevel; /// Indicates from which processing stage this information is from.
794 AliHLTUInt32_t fId; /// Unique identifier for the chain based on CRC code.
795 AliHLTUInt32_t fTime; /// Real wall time used to process the data (micro seconds).
796 AliHLTUInt32_t fCTime; /// CPU time used to process the data (micro seconds).
797 AliHLTUInt32_t fInputBlockCount; /// Number of input data blocks.
798 AliHLTUInt32_t fTotalInputSize; /// Total size in bytes of input data.
799 AliHLTUInt32_t fOutputBlockCount; /// Number of output data blocks.
800 AliHLTUInt32_t fTotalOutputSize; /// Total size in bytes of output data.
801 AliHLTUInt32_t fComponentCycleTime; /// Real wall time indicating the start of the data processing (micro seconds).
805 * @struct AliHLTComponentTableEntry
806 * Structure to be send on SOR event through the chain.
807 * The 'length' of the structure is variable and depends on the length
808 * of the buffer at the end.
810 * ComponentTableEntries are sent with data type @ref kAliHLTDataTypeComponentTable
811 * and are identified by a 32bit Id specification generated by a CRC
812 * algorithm from the chain Id of the component. This is not a 100% unique
813 * id but with a high probability. This approach accounts for the fact
814 * that all components are separated processes.
816 * The buffer consists of an array of 32bit Ids containing the Ids of
817 * all direct parents taken from the specification of the data blocks.
818 * The number of parents is stored in fNofParents. Each component forwards the
819 * incoming component table entries with data type @ref kAliHLTDataTypeComponentFwdTable
820 * by that the direct parents can be identified.
822 * Following this array a description string contains the chain id, component args, and
823 * maybe more properties in the future. The current format is
824 * 'chain_id{component_id:component args}' e.g. TPC-CF_00_0{TPCClusterFinder32Bit:-deconvolute-time}
826 struct AliHLTComponentTableEntry
828 AliHLTUInt32_t fStructSize; /// Size of this structure in bytes.
829 AliHLTUInt32_t fLevel; /// Indicates from which processing stage this information is from.
830 AliHLTUInt16_t fNofParents; /// size of the array of parent ids
831 AliHLTUInt8_t fSizeDescription; /// size of the description string in the appended buffer
832 AliHLTUInt8_t fBuffer[1]; /// the strings: chain id, component args, reserved
835 //////////////////////////////////////////////////////////////////////////
837 // Trigger meta information
839 //////////////////////////////////////////////////////////////////////////
841 /** field size of fAttribute */
842 const int gkAliHLTBlockDAttributeCount = 8;
844 /** field size of fCommonHeader */
845 const int gkAliHLTCommonHeaderCountV2 = 8;
846 const int gkAliHLTCommonHeaderCountV3 = 10;
847 const int gkAliHLTCommonHeaderCount = gkAliHLTCommonHeaderCountV3;
849 /** size of the DDL list first version */
850 const int gkAliHLTDDLListSizeV0 = 30;
852 /** size of the DDL list after DCAL added to EMCAL */
853 const int gkAliHLTDDLListSizeV1 = 31;
855 /** size of the DDL list */
856 const int gkAliHLTDDLListSize = gkAliHLTDDLListSizeV1;
858 /** Number of Trigger Classes of CTP in CDH */
859 const int gkNCTPTriggerClassesV2 = 50;
860 const int gkNCTPTriggerClassesV3 = 100;
861 const int gkNCTPTriggerClasses = gkNCTPTriggerClassesV3;
863 // make it also available as define for templates
864 #define NCTPTRIGGERCLASSES 100
867 * @struct AliHLTEventDDLV0
868 * First version of the DDL list event.
869 * The struct is send with the DDLLIST event.
870 * Used in the trigger structure for internal apperance of
871 * the DLLs as well as for the HLT readout list send to DAQ
872 * ( as DataType : kAliHLTDataTypeDDL )
874 struct AliHLTEventDDLV0
876 AliHLTUInt32_t fCount; /// Indicates the number of words in fList.
877 AliHLTUInt32_t fList[gkAliHLTDDLListSizeV0]; /// The list of DDL enable/disable bits.
881 * @struct AliHLTEventDDLV1
882 * DDL list event structure with extra word for DCAL bits.
884 struct AliHLTEventDDLV1
886 AliHLTUInt32_t fCount; /// Indicates the number of words in fList.
887 AliHLTUInt32_t fList[gkAliHLTDDLListSizeV1]; /// The list of DDL enable/disable bits.
891 * @typedef AliHLTEventDDL
892 * Current used default version of the AliHLTEventDDL structure.
894 typedef AliHLTEventDDLV1 AliHLTEventDDL;
897 * @struct AliHLTEventTriggerData
899 struct AliHLTEventTriggerData
901 AliHLTUInt8_t fAttributes[gkAliHLTBlockDAttributeCount]; /// List of data block attibutes.
902 AliHLTUInt64_t fHLTStatus; /// Bit field
903 AliHLTUInt32_t fCommonHeaderWordCnt; /// Number of words in fCommonHeader.
904 AliHLTUInt32_t fCommonHeader[gkAliHLTCommonHeaderCount]; /// The common header words.
907 AliHLTEventDDL fReadoutList; /// The default readout list structure.
908 AliHLTEventDDLV0 fReadoutListV0; /// Access to the old version of the readout list structure.
909 AliHLTEventDDLV1 fReadoutListV1; /// Access to the readout list structure with DCAL included.
914 * @struct AliHLTComponentTriggerData
917 struct AliHLTComponentTriggerData
919 AliHLTUInt32_t fStructSize; /// Size of this structure in bytes.
920 AliHLTUInt32_t fDataSize; /// Size of the data section (following this data member) in bytes.
921 void* fData; /// Start of the data section.
924 //////////////////////////////////////////////////////////////////////////
926 // HLT Event Type Specification
928 //////////////////////////////////////////////////////////////////////////
930 /** Unknown eventType specification */
931 const AliHLTUInt32_t gkAliEventTypeUnknown = ~(AliHLTUInt32_t)0;
932 /** SOR eventType specification */
933 const AliHLTUInt32_t gkAliEventTypeStartOfRun=1;
934 /** Data eventType specification */
935 const AliHLTUInt32_t gkAliEventTypeData=2;
936 /** EOR eventType specification */
937 const AliHLTUInt32_t gkAliEventTypeEndOfRun=4;
938 /** Corrupt eventType specification */
939 const AliHLTUInt32_t gkAliEventTypeCorruptID=8;
940 /** Calibration eventType specification */
941 const AliHLTUInt32_t gkAliEventTypeCalibration=16;
942 /** Software eventType specification */
943 const AliHLTUInt32_t gkAliEventTypeSoftware=24;
944 /** DataReplay eventType specification */
945 const AliHLTUInt32_t gkAliEventTypeDataReplay=32;
946 /** Configuration eventType specification */
947 const AliHLTUInt32_t gkAliEventTypeConfiguration=34;
948 /** Update DCS eventType specification */
949 const AliHLTUInt32_t gkAliEventTypeReadPreprocessor=35;
950 /** Tick eventType specification */
951 const AliHLTUInt32_t gkAliEventTypeTick=64;
952 /** Max eventType specification */
953 const AliHLTUInt32_t gkAliEventTypeMax=64;
955 //////////////////////////////////////////////////////////////////////////
957 // HLT defines and defaults
959 //////////////////////////////////////////////////////////////////////////
962 * @ingroup alihlt_component_datatypes
964 const AliHLTEventID_t kAliHLTVoidEventID=~(AliHLTEventID_t)0;
966 /** invalid data specification
967 * @ingroup alihlt_component_datatypes
969 const AliHLTUInt32_t kAliHLTVoidDataSpec = ~(AliHLTUInt32_t)0;
972 * @ingroup alihlt_component_datatypes
974 const AliHLTUInt32_t kAliHLTVoidRunNo = ~(AliHLTUInt32_t)0;
977 * @ingroup alihlt_component_datatypes
979 const AliHLTUInt32_t kAliHLTVoidRunType = ~(AliHLTUInt32_t)0;
981 /** invalid run descriptor
982 * @ingroup alihlt_component_datatypes
984 const AliHLTRunDesc kAliHLTVoidRunDesc={sizeof(AliHLTRunDesc), kAliHLTVoidRunNo, kAliHLTVoidRunType};
986 /** invalid shared memory type */
987 const AliHLTUInt32_t gkAliHLTComponentInvalidShmType = 0;
989 /** invalid shared memory id */
990 const AliHLTUInt64_t gkAliHLTComponentInvalidShmID = ~(AliHLTUInt64_t)0;
992 /** invalid data type
993 * @ingroup alihlt_component_datatypes
995 const AliHLTComponentDataType kAliHLTVoidDataType = {
996 sizeof(AliHLTComponentDataType),
997 kAliHLTVoidDataTypeID,
998 kAliHLTDataOriginVoid
1001 /** all data types, means any + void data type
1002 * @ingroup alihlt_component_datatypes
1004 const AliHLTComponentDataType kAliHLTAllDataTypes = {
1005 sizeof(AliHLTComponentDataType),
1006 kAliHLTAllDataTypesID,
1007 kAliHLTDataOriginAny
1010 // there is currently a problem with rootcint if the predefined ids
1011 // (commented below) are used. rootcint does not find the id if they
1012 // are char arrays defined with {} and individual chars. If strings
1013 // are used it works fine
1015 * @ingroup alihlt_component_datatypes
1017 const AliHLTComponentDataType kAliHLTAnyDataType = {
1018 sizeof(AliHLTComponentDataType),
1019 kAliHLTAnyDataTypeID,
1020 kAliHLTDataOriginAny
1023 /** multiple output data types
1024 * @ingroup alihlt_component_datatypes
1026 extern const AliHLTComponentDataType kAliHLTMultipleDataType;
1028 /** data to file exchange subscriber
1029 * @ingroup alihlt_component_datatypes
1031 extern const AliHLTComponentDataType kAliHLTDataTypeFXSCalib;
1033 /** DDL list data type
1034 * @ingroup alihlt_component_datatypes
1036 extern const AliHLTComponentDataType kAliHLTDataTypeDDL;
1038 /** DAQ readout list
1039 * @ingroup alihlt_component_datatypes
1041 extern const AliHLTComponentDataType kAliHLTDataTypeDAQRDOUT;
1044 * Common data type for the output of cluster finders, the exact
1045 * format depends on the origin (detector)
1046 * @ingroup alihlt_component_datatypes
1048 extern const AliHLTComponentDataType kAliHLTDataTypeClusters;
1051 * @ingroup alihlt_component_datatypes
1053 extern const AliHLTComponentDataType kAliHLTDataTypeSOR;
1056 * @ingroup alihlt_component_datatypes
1058 extern const AliHLTComponentDataType kAliHLTDataTypeEOR;
1060 /** Run type data block
1061 * @ingroup alihlt_component_datatypes
1063 extern const AliHLTComponentDataType kAliHLTDataTypeRunType;
1065 /** Event type specification
1066 * @ingroup alihlt_component_datatypes
1068 extern const AliHLTComponentDataType kAliHLTDataTypeEvent;
1070 /** ECS parameter event
1071 * - sent during the SOR event by the framework
1072 * - contains the full ECS parameter string
1073 * @ingroup alihlt_component_datatypes
1075 extern const AliHLTComponentDataType kAliHLTDataTypeECSParam; // {ECSPARAM:PRIV}
1077 /** Configuration event data type
1078 * @ingroup alihlt_component_datatypes
1080 extern const AliHLTComponentDataType kAliHLTDataTypeComConf;
1082 /** DCS value update event
1083 * @ingroup alihlt_component_datatypes
1085 extern const AliHLTComponentDataType kAliHLTDataTypeUpdtDCS;
1087 /** RAW DDL data specification, origin is 'any', data publisher origin correctly
1088 * @ingroup alihlt_component_datatypes
1090 extern const AliHLTComponentDataType kAliHLTDataTypeDDLRaw;
1092 /** AliMCEvent object data specification, origin is 'OFFL'
1093 * @ingroup alihlt_component_datatypes
1095 extern const AliHLTComponentDataType kAliHLTDataTypeMCObject;
1097 /** ESD vertex object data specification, origin is 'any'
1098 * @ingroup alihlt_component_datatypes
1100 extern const AliHLTComponentDataType kAliHLTDataTypeESDVertex;
1102 /** KF vertex object data specification, origin is 'any'
1103 * @ingroup alihlt_component_datatypes
1105 extern const AliHLTComponentDataType kAliHLTDataTypeKFVertex;
1107 /** global vertexer data specification, origin is 'any'
1108 * @ingroup alihlt_component_datatypes
1110 extern const AliHLTComponentDataType kAliHLTDataTypeGlobalVertexer;
1112 /** primary finder data specification, origin is 'any'
1113 * @ingroup alihlt_component_datatypes
1115 extern const AliHLTComponentDataType kAliHLTDataTypePrimaryFinder;
1117 /** primary finder data specification, origin is 'any'
1118 * @ingroup alihlt_component_datatypes
1120 extern const AliHLTComponentDataType kAliHLTDataTypeV0Finder;
1122 /** flat ESD object data specification, origin is 'any'
1123 * @ingroup alihlt_component_datatypes
1125 extern const AliHLTComponentDataType kAliHLTDataTypeFlatESD;
1127 /** flat ESD vertex object data specification, origin is 'any'
1128 * @ingroup alihlt_component_datatypes
1130 extern const AliHLTComponentDataType kAliHLTDataTypeFlatESDVertex;
1132 /** ESD object data specification, origin is 'any'
1133 * @ingroup alihlt_component_datatypes
1135 extern const AliHLTComponentDataType kAliHLTDataTypeESDObject;
1137 /** ESD friend object data specification, origin is 'any'
1138 * @ingroup alihlt_component_datatypes
1140 extern const AliHLTComponentDataType kAliHLTDataTypeESDfriendObject;
1142 /** ESD content data specification, origin is 'any'
1143 * @ingroup alihlt_component_datatypes
1145 extern const AliHLTComponentDataType kAliHLTDataTypeESDContent;
1147 /** ESD Tree data specification, origin is 'any'
1148 * @ingroup alihlt_component_datatypes
1150 extern const AliHLTComponentDataType kAliHLTDataTypeESDTree;
1152 /** AliRoot TreeD data specification, origin is 'any'
1153 * @ingroup alihlt_component_datatypes
1155 extern const AliHLTComponentDataType kAliHLTDataTypeAliTreeD;
1157 /** AliRoot TreeR data specification, origin is 'any'
1158 * @ingroup alihlt_component_datatypes
1160 extern const AliHLTComponentDataType kAliHLTDataTypeAliTreeR;
1162 /** 16 bit Hardware address selection data specification, origin is 'any'
1163 * @ingroup alihlt_component_datatypes
1165 extern const AliHLTComponentDataType kAliHLTDataTypeHwAddr16;
1167 /** Event statistics
1168 * @ingroup alihlt_component_datatypes
1170 extern const AliHLTComponentDataType kAliHLTDataTypeEventStatistics;
1173 * @ingroup alihlt_component_datatypes
1175 extern const AliHLTComponentDataType kAliHLTDataTypeEventSummary;
1177 /** Event statistics
1178 * @ingroup alihlt_component_datatypes
1180 extern const AliHLTComponentDataType kAliHLTDataTypeRunStatistics;
1183 * @ingroup alihlt_component_datatypes
1185 extern const AliHLTComponentDataType kAliHLTDataTypeRunSummary;
1187 /** Trigger decision
1188 * - origin : kAliHLTDataOriginOut ( HLT )
1189 * @ingroup alihlt_component_datatypes
1191 extern const AliHLTComponentDataType kAliHLTDataTypeTriggerDecision; // {TRIG_DEC:HLT }
1193 /** Trigger decision
1194 * - origin : kAliHLTDataOriginOut ( HLT )
1195 * @ingroup alihlt_component_datatypes
1197 extern const AliHLTComponentDataType kAliHLTDataTypeReadoutList; // {HLTRDLST:HLT }
1199 /** Global trigger decision
1200 * - origin : kAliHLTDataOriginOut ( HLT )
1201 * @ingroup alihlt_component_datatypes
1203 extern const AliHLTComponentDataType kAliHLTDataTypeGlobalTrigger; // {GLOBTRIG:HLT }
1205 /** Component block statistics
1206 * @ingroup alihlt_component_datatypes
1208 extern const AliHLTComponentDataType kAliHLTDataTypeComponentStatistics;
1211 * To be sent on SOR event, each component adds it's chain id string
1212 * and a generated 32bit identifier to the table
1213 * @ingroup alihlt_component_datatypes
1215 extern const AliHLTComponentDataType kAliHLTDataTypeComponentTable;
1217 /** Forwarded component table
1218 * To be sent on SOR event, each component forwards blocks of type
1219 * @ref kAliHLTDataTypeComponentTable was kAliHLTDataTypeComponentFwdTable
1220 * after adding the parent ids to its own table struct.
1221 * @ingroup alihlt_component_datatypes
1223 extern const AliHLTComponentDataType kAliHLTDataTypeComponentFwdTable;
1226 * Data type for the Common Data Header and readout list information sent by TCPDumpSubscriber.
1227 * @ingroup alihlt_component_datatypes
1229 extern const AliHLTComponentDataType kAliHLTDataTypeTriggerMetaBlock; // {METADATA:PRIV}
1231 //////////////////////////////////////////////////////////////////////////
1233 // Data Types for Monitoring objects
1235 //////////////////////////////////////////////////////////////////////////
1237 /** general ROOT TObject
1238 * @ingroup alihlt_component_datatypes
1240 extern const AliHLTComponentDataType kAliHLTDataTypeTObject; // {ROOTTOBJ,"***"}
1242 /** ROOT streamer info
1243 * @ingroup alihlt_component_datatypes
1245 extern const AliHLTComponentDataType kAliHLTDataTypeStreamerInfo; // {ROOTSTRI,HLT }
1248 * @ingroup alihlt_component_datatypes
1250 extern const AliHLTComponentDataType kAliHLTDataTypeTObjArray; // {ROOTOBAR,"***"}
1253 * @ingroup alihlt_component_datatypes
1255 extern const AliHLTComponentDataType kAliHLTDataTypeTTree; // {ROOTTREE,"***"}
1257 /** ROOT TH1 (can be used for all histograms, they derive from TH1)
1258 * @ingroup alihlt_component_datatypes
1260 extern const AliHLTComponentDataType kAliHLTDataTypeHistogram; // {ROOTHIST,"***"}
1263 * @ingroup alihlt_component_datatypes
1265 extern const AliHLTComponentDataType kAliHLTDataTypeTNtuple; // {ROOTTUPL,"***"}
1267 /** Global input trigger counters.
1268 * - origin : kAliHLTDataOriginOut ( HLT )
1269 * @ingroup alihlt_component_datatypes
1271 extern const AliHLTComponentDataType kAliHLTDataTypeInputTriggerCounters; // {INTRGCNT:HLT }
1273 /** Global output trigger counters.
1274 * - origin : kAliHLTDataOriginOut ( HLT )
1275 * @ingroup alihlt_component_datatypes
1277 extern const AliHLTComponentDataType kAliHLTDataTypeOutputTriggerCounters; // {OTTRGCNT:HLT }
1279 /** General track array for the barrel tracks based on AliExternalTrackParam
1280 * Data format defined by AliHLTTracksData
1282 * We follow the naming scheme of AliESDEvent where 'Tracks' denote the
1283 * barrel tracks and detector tracks get names 'DETTracks'
1284 * @ingroup alihlt_component_datatypes
1286 extern const AliHLTComponentDataType kAliHLTDataTypeTrack; // {HLTTRACK,"***"}
1288 /** Track Monte Carlo information
1290 extern const AliHLTComponentDataType kAliHLTDataTypeTrackMC; // {TRACK_MC,"***"}
1292 /** TClonesArray of AliExternalTrackParam
1293 * @ingroup alihlt_component_datatypes
1295 extern const AliHLTComponentDataType kAliHLTDataTypeExternalTrackParam; // {TCAEXTTR,"***"}
1297 /** Container containing jets (AliHLTJETJets)
1298 * Containing TClonesArray of AliAODJets
1299 * @ingroup alihlt_component_datatypes
1301 extern const AliHLTComponentDataType kAliHLTDataTypeJet; // {HLTJETV0,"***"}
1303 /** Container of ITS tracks
1304 * @ingroup alihlt_component_datatypes
1306 extern const AliHLTComponentDataType fgkITSTracksDataType;
1308 /** Container of ITS SAP tracker data
1309 * @ingroup alihlt_component_datatypes
1311 extern const AliHLTComponentDataType kAliHLTDataTypeITSSAPData;
1313 /** Container of calorimeter clusters
1314 * @ingroup alihlt_component_datatypes
1316 extern const AliHLTComponentDataType kAliHLTDataTypeCaloCluster;
1318 /** Container of dEdx
1319 * @ingroup alihlt_component_datatypes
1321 extern const AliHLTComponentDataType kAliHLTDataTypedEdx;
1323 /** Container of dNdPt
1324 * @ingroup alihlt_component_datatypes
1326 extern const AliHLTComponentDataType kAliHLTDataTypedNdPt;
1328 //////////////////////////////////////////////////////////////////////////
1330 // FXS subscriber meta information
1332 //////////////////////////////////////////////////////////////////////////
1334 const int gkAliHLTFXSHeaderfOriginSize = 4;
1335 const int gkAliHLTFXSHeaderfFileIDSize = 128;
1336 const int gkAliHLTFXSHeaderfDDLNumberSize = 64;
1338 /** Header in front of the data payload, in order to sent data to the FXS. */
1339 struct AliHLTFXSHeader
1341 AliHLTUInt32_t fHeaderVersion; /// HLT software version number.
1342 AliHLTUInt32_t fRunNumber; /// The current run number.
1343 char fOrigin[gkAliHLTFXSHeaderfOriginSize]; /// The detector from which the FXS data is received.
1344 char fFileID[gkAliHLTFXSHeaderfFileIDSize]; /// File identifier for the stored data.
1345 char fDDLNumber[gkAliHLTFXSHeaderfDDLNumberSize]; /// The DDL bits.
1348 //////////////////////////////////////////////////////////////////////////
1350 // Component running environment
1352 //////////////////////////////////////////////////////////////////////////
1354 /** definition of a void fct pointer */
1355 typedef void (*AliHLTfctVoid)();
1357 /** logging function */
1358 typedef int (*AliHLTfctLogging)( void* param,
1359 AliHLTComponentLogSeverity severity,
1361 const char* keyword,
1362 const char* message);
1365 * @struct AliHLTAnalysisEnvironment
1366 * Running environment for analysis components.
1367 * The struct describes function callbacks for actions to be
1368 * carried out by the calling framework, like memory allocation,
1369 * property callbecks, logging, etc.
1371 * @ingroup alihlt_wrapper_interface
1373 struct AliHLTAnalysisEnvironment
1375 /** size of the structure */
1376 AliHLTUInt32_t fStructSize;
1378 /** the component parameter given by the framework on creation */
1381 /** allocated memory */
1382 void* (*fAllocMemoryFunc)( void* param, unsigned long size );
1384 /** allocate an EventDoneData structure. */
1385 int (*fGetEventDoneDataFunc)( void* param, AliHLTEventID_t eventID, unsigned long size, AliHLTComponentEventDoneData** edd );
1387 /** logging callback */
1388 AliHLTfctLogging fLoggingFunc;
1391 // I just keep this as a note pad. Has to be added to the end of the structure
1392 // future addition already foreseen/envisioned
1393 // IMPORTANT: don not just remove the defines as this breaks the binary
1395 int (*fAllocShmMemoryFunc)( void* param, unsigned long size, AliHLTComponentBlockData* blockLocation );
1399 * @struct AliHLTComponentEnvironment
1400 * This was the original definition of the running environment.
1401 * Due to a bug in the AliRootWrapperSubscriber/SimpleComponentWrapper,
1402 * this structure can not be used any longer but is kept for backward
1404 * @note The external interface provided by the libHLTbase is now kept
1405 * frozen but should not be used any more. Use the interface provided
1406 * by the libHLTinterface library.
1408 * @ingroup alihlt_wrapper_interface_deprecated
1410 struct AliHLTComponentEnvironment
1412 AliHLTUInt32_t fStructSize;
1414 void* (*fAllocMemoryFunc)( void* param, unsigned long size );
1415 int (*fGetEventDoneDataFunc)( void* param, AliHLTEventID_t eventID, unsigned long size, AliHLTComponentEventDoneData** edd );
1416 AliHLTfctLogging fLoggingFunc;
1419 //////////////////////////////////////////////////////////////////////////
1421 // The external interface definition
1423 //////////////////////////////////////////////////////////////////////////
1426 * The component handle.
1427 * Used as indification in the outside world.
1428 * @ingroup alihlt_wrapper_interface
1430 typedef void* AliHLTComponentHandle;
1432 /** @ingroup alihlt_wrapper_interface */
1433 const AliHLTComponentHandle kEmptyHLTComponentHandle = 0;
1436 * Get a system call of the interface.
1437 * @param function signature
1438 * @return pointer to system call
1439 * @ingroup alihlt_wrapper_interface
1441 typedef void* (*AliHLTAnalysisFctGetInterfaceCall)(const char*);
1443 # define ALIHLTANALYSIS_INTERFACE_LIBRARY "libHLTinterface.so"
1444 # define ALIHLTANALYSIS_FCT_GETINTERFACECALL "AliHLTAnalysisGetInterfaceCall"
1446 /** @ingroup alihlt_wrapper_interface */
1447 typedef int (*AliHLTExtFctInitSystem)( unsigned long version, AliHLTAnalysisEnvironment* externalEnv, unsigned long runNo, const char* runType );
1449 /** @ingroup alihlt_wrapper_interface */
1450 typedef int (*AliHLTExtFctDeinitSystem)();
1452 /** @ingroup alihlt_wrapper_interface */
1453 typedef int (*AliHLTExtFctLoadLibrary)( const char* );
1455 /** @ingroup alihlt_wrapper_interface */
1456 typedef int (*AliHLTExtFctUnloadLibrary)( const char* );
1458 /** @ingroup alihlt_wrapper_interface */
1459 typedef int (*AliHLTExtFctCreateComponent)( const char*, void*, int, const char**, AliHLTComponentHandle*, const char* description );
1461 /** @ingroup alihlt_wrapper_interface */
1462 typedef int (*AliHLTExtFctDestroyComponent)( AliHLTComponentHandle );
1464 /** @ingroup alihlt_wrapper_interface */
1465 typedef int (*AliHLTExtFctProcessEvent)( AliHLTComponentHandle, const AliHLTComponentEventData*, const AliHLTComponentBlockData*,
1466 AliHLTComponentTriggerData*, AliHLTUInt8_t*,
1467 AliHLTUInt32_t*, AliHLTUInt32_t*,
1468 AliHLTComponentBlockData**,
1469 AliHLTComponentEventDoneData** );
1471 /** @ingroup alihlt_wrapper_interface */
1472 typedef int (*AliHLTExtFctGetOutputDataType)( AliHLTComponentHandle, AliHLTComponentDataType* );
1474 /** @ingroup alihlt_wrapper_interface */
1475 typedef int (*AliHLTExtFctGetOutputSize)( AliHLTComponentHandle, unsigned long*, double* );
1480 typedef std::bitset<NCTPTRIGGERCLASSES> AliHLTTriggerMask_t;
1482 using namespace std;
1484 //////////////////////////////////////////////////////////////////////////
1486 // Data type helper functions
1488 //////////////////////////////////////////////////////////////////////////
1490 /** exact comparison of HLT component data types
1491 * @ingroup alihlt_component_datatypes
1493 inline bool MatchExactly( const AliHLTComponentDataType& dt1, const AliHLTComponentDataType& dt2 )
1495 for ( int i = 0; i < kAliHLTComponentDataTypefIDsize; i++ )
1496 if ( dt1.fID[i] != dt2.fID[i] )
1498 for ( int i = 0; i < kAliHLTComponentDataTypefOriginSize; i++ )
1499 if ( dt1.fOrigin[i] != dt2.fOrigin[i] )
1504 /** Comparison operator for HLT component data types.
1505 * The operator takes wildcards into account, i.e. the ::kAliHLTAnyDataType,
1506 * ::kAliHLTAnyDataTypeID and ::kAliHLTDataOriginAny definitions.
1507 * @ingroup alihlt_component_datatypes
1509 inline bool operator==( const AliHLTComponentDataType& dt1, const AliHLTComponentDataType& dt2 )
1511 if (MatchExactly(dt1, kAliHLTAllDataTypes)) return true;
1512 if (MatchExactly(dt2, kAliHLTAllDataTypes)) return true;
1514 bool any1=true, any2=true, void1=true, void2=true, match=true;
1515 for ( int i = 0; i < kAliHLTComponentDataTypefOriginSize; i++ ) {
1516 any1&=(dt1.fOrigin[i]==kAliHLTDataOriginAny[i]);
1517 any2&=(dt2.fOrigin[i]==kAliHLTDataOriginAny[i]);
1518 void1&=(dt1.fOrigin[i]==kAliHLTDataOriginVoid[i]);
1519 void2&=(dt2.fOrigin[i]==kAliHLTDataOriginVoid[i]);
1520 match&=dt1.fOrigin[i]==dt2.fOrigin[i];
1521 if (!(match || (any2 && !void1) || (any1 && !void2)))
1525 any1=true, any2=true, match=true;
1526 for ( int i = 0; i < kAliHLTComponentDataTypefIDsize; i++ ) {
1527 any1&=(dt1.fID[i]==kAliHLTAnyDataTypeID[i]);
1528 any2&=(dt2.fID[i]==kAliHLTAnyDataTypeID[i]);
1529 void1&=(dt1.fID[i]==kAliHLTVoidDataTypeID[i]);
1530 void2&=(dt2.fID[i]==kAliHLTVoidDataTypeID[i]);
1531 match&=dt1.fID[i]==dt2.fID[i];
1532 if (!(match || (any2 && !void1) || (any1 && !void2)))
1538 /** Comparison operator for HLT component data types
1539 * Invers of operator==
1540 * @ingroup alihlt_component_datatypes
1542 inline bool operator!=( const AliHLTComponentDataType& dt1, const AliHLTComponentDataType& dt2 )
1547 /** merge operator for HLT component data types and origins
1548 * @ingroup alihlt_component_datatypes
1550 inline AliHLTComponentDataType operator|(const AliHLTComponentDataType srcdt, const char origin[kAliHLTComponentDataTypefOriginSize])
1552 AliHLTComponentDataType dt=srcdt;
1553 for ( int i = 0; i < kAliHLTComponentDataTypefOriginSize; i++ )
1554 dt.fOrigin[i]=origin[i];
1559 * Helper function to initialize a data type from an id char array and origin string.
1560 * @return data type structure initialized with the specified id and origin
1561 * @ingroup alihlt_component_datatypes
1563 inline AliHLTComponentDataType AliHLTComponentDataTypeInitializer(const char id[kAliHLTComponentDataTypefIDsize], const char* origin)
1565 AliHLTComponentDataType dt=kAliHLTVoidDataType;
1567 for (i = 0; i < kAliHLTComponentDataTypefIDsize && id[i]!=0; i++)
1569 for (i = 0; i < kAliHLTComponentDataTypefOriginSize && origin[i]!=0; i++ )
1570 dt.fOrigin[i]=origin[i];
1575 * Helper function to initialize a data type from a default data type and
1576 * an origin string. Basically it merges the specified origin into the data
1578 * @return data type structure initialized with the id from specified data type
1580 * @ingroup alihlt_component_datatypes
1582 inline AliHLTComponentDataType AliHLTComponentDataTypeInitializer(const AliHLTComponentDataType src, const char* origin)
1584 return AliHLTComponentDataTypeInitializer(src.fID, origin);