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