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