]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/BASE/AliHLTDataTypes.h
- info removed from default logging level for AliRoot embedded processing
[u/mrichter/AliRoot.git] / HLT / BASE / AliHLTDataTypes.h
CommitLineData
f23a6e1a 1// @(#) $Id$
2
3#ifndef ALIHLTDATATYPES_H
4#define ALIHLTDATATYPES_H
32db4144 5/* This file is property of and copyright by the ALICE HLT Project *
6 * ALICE Experiment at CERN, All rights reserved. *
f23a6e1a 7 * See cxx source for full Copyright notice */
8
b22e91eb 9/** @file AliHLTDataTypes.h
32db4144 10 @author Matthias Richter, Timm Steinbeck, Jochen Thaeder
b22e91eb 11 @date
12 @brief Data type declaration for the HLT module.
13*/
14
2cbdb37e 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
eda89fe6 24 * 3 2007-11-15 RAW DDL data type added; some inconsistencies fixed
25 * ('void' and 'any' origins); added signed HLT basic data types
69347e0d 26 * 2007-11-23 origin defines have become variables in conjunction
c704e290 27 * to be used with the operator| (AliHLTComponentDataType)
28 * 2007-11-24 added trigger structs and ESD tree data type
b543e186 29 * 4 Component configuration and DCS update events added
2efb85be 30 * gkAliHLTDDLListSize set from 29 to 30 according to new PubSub
31 * specs
c736de25 32 * 5 Data types for Run and Event summary, and for monitoring added
2cbdb37e 33 */
c736de25 34#define ALIHLT_DATA_TYPES_VERSION 5
2cbdb37e 35
32db4144 36//////////////////////////////////////////////////////////////////////////
37//
69347e0d 38// HLT data origin variables.
39//
40// By converting from defines to variables, the origins can be used with
41// the operator|
42//
43// AliHLTComponentDataType dt;
44// dt = kAliHLTDataTypeDDLRaw | gkAliHLTDataOriginTPC;
32db4144 45//
46//////////////////////////////////////////////////////////////////////////
47
48/** field size of datat type origin */
49const int kAliHLTComponentDataTypefOriginSize=4;
50
51
52/** invalid data origin */
3f850585 53# define kAliHLTDataOriginVoid "\0\0\0"
54/** old invalid data origin, kept for backward compatibility */
32db4144 55# define kAliHLTVoidDataOrigin "\0\0\0"
56
3f850585 57/** wildcard data type origin */
58# define kAliHLTDataOriginAny "***"
59/** old wildcard data type origin, kept for backward compatibility */
32db4144 60# define kAliHLTAnyDataOrigin "***"
61
62/** HLT out */
69347e0d 63extern const char kAliHLTDataOriginOut[kAliHLTComponentDataTypefOriginSize];
32db4144 64
65/** HLT/PubSub private internal */
69347e0d 66extern const char kAliHLTDataOriginPrivate[kAliHLTComponentDataTypefOriginSize];
32db4144 67
68/** TPC */
69347e0d 69extern const char kAliHLTDataOriginTPC[kAliHLTComponentDataTypefOriginSize];
32db4144 70
71/** PHOS */
69347e0d 72extern const char kAliHLTDataOriginPHOS[kAliHLTComponentDataTypefOriginSize];
32db4144 73
74/** MUON */
69347e0d 75extern const char kAliHLTDataOriginMUON[kAliHLTComponentDataTypefOriginSize];
32db4144 76
77/** TRD */
69347e0d 78extern const char kAliHLTDataOriginTRD[kAliHLTComponentDataTypefOriginSize];
32db4144 79
80/** ITS */
69347e0d 81extern const char kAliHLTDataOriginITS[kAliHLTComponentDataTypefOriginSize];
32db4144 82
83//////////////////////////////////////////////////////////////////////////
84//
85// HLT common data type defines
86//
87//////////////////////////////////////////////////////////////////////////
88
89/** field size of data type id */
90const int kAliHLTComponentDataTypefIDsize=8;
91
92
93/** invalid data type id */
94# define kAliHLTVoidDataTypeID "\0\0\0\0\0\0\0"
95
96/** special id for any data type id */
97# define kAliHLTAnyDataTypeID "*******"
98
3f850585 99/** DDL RAW data */
100# define kAliHLTDDLRawDataTypeID {'D','D','L','_','R','A','W',' '}
101
32db4144 102/** calibration data for file exchange subscriber */
103# define kAliHLTFXSCalibDataTypeID {'F','X','S','_','C','A','L',' '}
104
105/** start of run (SOR) event
2cbdb37e 106 * @ref AliHLTRunDesc
32db4144 107 */
108# define kAliHLTSORDataTypeID {'S','T','A','R','T','O','F','R'}
109
110/** end of run (EOR) event
2cbdb37e 111 * @ref AliHLTRunDesc
32db4144 112 */
113# define kAliHLTEORDataTypeID {'E','N','D','O','F','R','U','N'}
114
115/** DDL list event
116 * @ref AliHLTEventDDL
117 */
118# define kAliHLTDDLDataTypeID {'D','D','L','L','I','S','T',' '}
119
9d9ffd37 120/** EventType event
121 * - empty payload, specification gives eventType
122 */
123# define kAliHLTEventDataTypeID {'E','V','E','N','T','T','Y','P'}
124
853121af 125/** ComponentConfiguration event
b543e186 126 * - payload contains the CDB path as string
853121af 127 */
128# define kAliHLTComConfDataTypeID {'C','O','M','_','C','O','N','F'}
129
b543e186 130/** DCS value update event
131 * - payload contains string of relevant detectors
132 */
133# define kAliHLTUpdtDCSDataTypeID {'U','P','D','T','_','D','C','S'}
134
c704e290 135/** ESD data block
136 * an AliESD object of varying origin
853121af 137 * The 'V0' at the end allows a versioning
c704e290 138 */
a978c0d5 139# define kAliHLTESDObjectDataTypeID {'A','L','I','E','S','D','V','0'}
c704e290 140
a978c0d5 141/** ESD tree data block
142 * TTree with an AliESD object of varying origin
143 */
144# define kAliHLTESDTreeDataTypeID {'E','S','D','_','T','R','E','E'}
64defa03 145
146/** HW Address selection data block
147 * - a selection list for 16 bit HW addresses
148 * - varying origin
149 */
150# define kAliHLTHwAddr16DataTypeID {'H','W','A','D','D','R','1','6'}
151
2ff24e4c 152/** Event Statistics
153 * - event statistics for given detectors
154 * - varying origin
155 */
156# define kAliHLTEventStatisticsDataTypeID {'E','V','_','S','T','A','T','I'}
157
158/** Event Summary
159 * - event summary
160 * - origin : kAliHLTDataOriginOut ( HLT )
161 */
162# define kAliHLTEventSummaryDataTypeID {'E','V','_','S','U','M','M','A'}
163
164/** Run Statistics
165 * - run statistics for given detectors
166 * - varying origin
167 */
168# define kAliHLTRunStatisticsDataTypeID {'R','U','N','S','T','A','T','I'}
169
170/** Run Summary
171 * - run summary
172 * - origin : kAliHLTDataOriginOut ( HLT )
173 */
174# define kAliHLTRunSummaryDataTypeID {'R','U','N','S','U','M','M','A'}
175
c736de25 176/** general ROOT TObject
177 * - a general TObject exported from the HLT analysis
178 * - varying origin
179 */
180#define kAliHLTTObjectDataTypeID {'R','O','O','T','T','O','B','J'}
181
182/** ROOT TObjArray
183 * - a TObjArray exported from the HLT analysis
184 * - varying origin
185 */
186#define kAliHLTTObjArrayDataTypeID {'R','O','O','T','O','B','A','R'}
187
188/** ROOT TTree
189 * - a TTree object exported from the HLT analysis
190 * - varying origin
191 */
192#define kAliHLTTTreeDataTypeID {'R','O','O','T','T','R','E','E'}
193
194/** ROOT histogram
195 * - a histogram object exported from the HLT analysis
196 * - class derives from TH1 (directly or indirectly) and inherits all common functionality
197 * - varying origin
198 */
199#define kAliHLTHistogramDataTypeID {'R','O','O','T','H','I','S','T'}
200
201/** ROOT TNtuple
202 * - a TNtupl object exported from the HLT analysis
203 * - varying origin
204 */
205#define kAliHLTTNtupleDataTypeID {'R','O','O','T','T','U','P','L'}
206
1843b457 207using namespace std;
f23a6e1a 208
209extern "C" {
32db4144 210 //////////////////////////////////////////////////////////////////////////
211 //
212 // Basic HLT data types
213 //
214 //////////////////////////////////////////////////////////////////////////
f23a6e1a 215
216 typedef unsigned char AliHLTUInt8_t;
217
eda89fe6 218 typedef signed char AliHLTInt8_t;
219
71d7c760 220 typedef unsigned short AliHLTUInt16_t;
221
eda89fe6 222 typedef signed short AliHLTInt16_t;
223
f23a6e1a 224 typedef unsigned int AliHLTUInt32_t;
225
eda89fe6 226 typedef signed int AliHLTInt32_t;
227
f23a6e1a 228 typedef unsigned long long AliHLTUInt64_t;
229
eda89fe6 230 typedef signed long long AliHLTInt64_t;
231
232 typedef float AliHLTFloat32_t;
233
234 typedef double AliHLTFloat64_t;
235
f23a6e1a 236 typedef AliHLTUInt64_t AliHLTEventID_t;
237
32db4144 238 //////////////////////////////////////////////////////////////////////////
239 //
240 // HLT logging levels
241 //
242 //////////////////////////////////////////////////////////////////////////
f23a6e1a 243
2efb85be 244 /**
245 * Logging severities of the HLT
246 */
247 enum AliHLTComponentLogSeverity {
248 /** no logging */
32db4144 249 kHLTLogNone = 0,
2efb85be 250 /** benchmark messages */
32db4144 251 kHLTLogBenchmark = 0x1,
2efb85be 252 /** debug messages */
32db4144 253 kHLTLogDebug = 0x2,
2efb85be 254 /** info messages */
32db4144 255 kHLTLogInfo = 0x4,
2efb85be 256 /** warning messages */
32db4144 257 kHLTLogWarning = 0x8,
2efb85be 258 /** error messages */
32db4144 259 kHLTLogError = 0x10,
b2065764 260 /** fatal error messages */
32db4144 261 kHLTLogFatal = 0x20,
b2065764 262 /** few important messages not to be filtered out.
263 * redirected to kHLTLogInfo in AliRoot
264 */
265 kHLTLogImportant = 0x40,
2efb85be 266 /** special value to enable all messages */
b2065764 267 kHLTLogAll = 0x7f,
2efb85be 268 /** the default logging filter */
7233bc62 269 kHLTLogDefault = 0x79
32db4144 270};
271
272 //////////////////////////////////////////////////////////////////////////
273 //
274 // HLT data structures for data exchange and external interface
275 //
276 //////////////////////////////////////////////////////////////////////////
277
278 /**
279 * @struct AliHLTComponentEventData
280 * Event descriptor
281 */
8ede8717 282 struct AliHLTComponentEventData
f23a6e1a 283 {
284 AliHLTUInt32_t fStructSize;
285 AliHLTEventID_t fEventID;
286 AliHLTUInt32_t fEventCreation_s;
287 AliHLTUInt32_t fEventCreation_us;
288 AliHLTUInt32_t fBlockCnt;
289 };
290
32db4144 291 /**
292 * @struct AliHLTComponentShmData
293 * Shared memory descriptor.
294 * Irrelevant for analysis components.
295 */
8ede8717 296 struct AliHLTComponentShmData
f23a6e1a 297 {
298 AliHLTUInt32_t fStructSize;
299 AliHLTUInt32_t fShmType;
300 AliHLTUInt64_t fShmID;
301 };
71d7c760 302
32db4144 303 /**
304 * @struct AliHLTComponentDataType
559631d5 305 * Data type descriptor for data blocks transferred through the processing
32db4144 306 * chain.
307 */
8ede8717 308 struct AliHLTComponentDataType
f23a6e1a 309 {
310 AliHLTUInt32_t fStructSize;
32db4144 311 char fID[kAliHLTComponentDataTypefIDsize]; //!
312 char fOrigin[kAliHLTComponentDataTypefOriginSize]; //!
f23a6e1a 313 };
2d7ff710 314
32db4144 315 /**
316 * @struct AliHLTComponentBlockData
3294f81a 317 * This is the decription of data blocks exchanged between components.
318 * \b IMPORTANT: The validity of fPtr and fOffset is different for input and
319 * output blocks:
320 * - input blocks: The \em fPtr member always points to the beginning of the data
321 * of size \em fSize. fOffset is ignored and should be in most
322 * case 0.
323 * - output blocks: The \em fPtr member is ignored by the framework. \em fOffset
324 * must specify the start of the data relative to the output
325 * buffer. The data block has size \em fSize.
32db4144 326 */
8ede8717 327 struct AliHLTComponentBlockData
f23a6e1a 328 {
3294f81a 329 /* size and version of the struct */
f23a6e1a 330 AliHLTUInt32_t fStructSize;
3294f81a 331 /* shared memory key, ignored by processing components */
8ede8717 332 AliHLTComponentShmData fShmKey;
3294f81a 333 /* offset of output data relative to the output buffer */
f23a6e1a 334 AliHLTUInt32_t fOffset;
3294f81a 335 /* start of the data for input data blocks, fOffset to be ignored*/
f23a6e1a 336 void* fPtr;
3294f81a 337 /* size of the data block */
f23a6e1a 338 AliHLTUInt32_t fSize;
3294f81a 339 /* data type of the data block */
8ede8717 340 AliHLTComponentDataType fDataType;
3294f81a 341 /* data specification of the data block */
f23a6e1a 342 AliHLTUInt32_t fSpecification;
343 };
344
32db4144 345 /**
346 * @struct AliHLTComponentEventDoneData
347 *
348 */
8ede8717 349 struct AliHLTComponentEventDoneData
f23a6e1a 350 {
351 AliHLTUInt32_t fStructSize;
352 AliHLTUInt32_t fDataSize;
353 void* fData;
354 };
355
32db4144 356 /**
2cbdb37e 357 * @struct AliHLTRunDesc
32db4144 358 * Event descriptor.
359 * The struct is send with the SOR and EOR events.
360 */
2cbdb37e 361 struct AliHLTRunDesc
32db4144 362 {
363 AliHLTUInt32_t fStructSize;
364 AliHLTUInt32_t fRunNo;
365 AliHLTUInt32_t fRunType;
366 };
367
8f81abf4 368 //////////////////////////////////////////////////////////////////////////
369 //
370 // Trigger meta information
371 //
372 //////////////////////////////////////////////////////////////////////////
373
374 /** field size of fAttribute */
2ff24e4c 375 const int gkAliHLTBlockDAttributeCount = 8;
8f81abf4 376
377 /** field size of fCommonHeader */
2ff24e4c 378 const int gkAliHLTCommonHeaderCount = 8;
8f81abf4 379
32db4144 380 /** size of the DDL list */
2ff24e4c 381 const int gkAliHLTDDLListSize = 30;
382
383 /** Number of Trigger Classes of CTP in CDH */
384 const int gkNCTPTriggerClasses = 50;
32db4144 385
386 /**
387 * @struct AliHLTEventDDL
388 * DDL list event.
389 * The struct is send with the DDLLIST event.
8f81abf4 390 * Used in the trigger structure for internal apperance of
391 * the DLLs as well as for the HLT readout list send to DAQ
511b2509 392 * ( as DataType : kAliHLTDataTypeDDL )
32db4144 393 */
394 struct AliHLTEventDDL
395 {
396 AliHLTUInt32_t fCount;
397 AliHLTUInt32_t fList[gkAliHLTDDLListSize];
398 };
399
8f81abf4 400 /**
401 * @struct AliHLTEventTriggerData
8f81abf4 402 */
403 struct AliHLTEventTriggerData
404 {
8f81abf4 405 AliHLTUInt8_t fAttributes[gkAliHLTBlockDAttributeCount];
511b2509 406 AliHLTUInt64_t fHLTStatus; // Bit field
8f81abf4 407 AliHLTUInt32_t fCommonHeaderWordCnt;
408 AliHLTUInt32_t fCommonHeader[gkAliHLTCommonHeaderCount];
8f81abf4 409 AliHLTEventDDL fReadoutList;
410 };
411
412 /**
413 * @struct AliHLTComponentTriggerData
414 * Trigger data
415 */
416 struct AliHLTComponentTriggerData
417 {
418 AliHLTUInt32_t fStructSize;
419 AliHLTUInt32_t fDataSize;
420 void* fData;
421 };
422
9d9ffd37 423 //////////////////////////////////////////////////////////////////////////
424 //
425 // HLT Event Type Specification
426 //
427 //////////////////////////////////////////////////////////////////////////
428
429 /** Unknown eventType specification */
2ff24e4c 430 const AliHLTUInt32_t gkAliEventTypeUnknown = ~(AliHLTUInt32_t)0;
9d9ffd37 431 /** SOR eventType specification */
2ff24e4c 432 const AliHLTUInt32_t gkAliEventTypeStartOfRun=1;
9d9ffd37 433 /** Data eventType specification */
2ff24e4c 434 const AliHLTUInt32_t gkAliEventTypeData=2;
9d9ffd37 435 /** EOR eventType specification */
2ff24e4c 436 const AliHLTUInt32_t gkAliEventTypeEndOfRun=4;
9d9ffd37 437 /** Corrupt eventType specification */
2ff24e4c 438 const AliHLTUInt32_t gkAliEventTypeCorruptID=8;
9d9ffd37 439 /** Calibration eventType specification */
2ff24e4c 440 const AliHLTUInt32_t gkAliEventTypeCalibration=16;
9d9ffd37 441 /** DataReplay eventType specification */
2ff24e4c 442 const AliHLTUInt32_t gkAliEventTypeDataReplay=32;
b543e186 443 /** Configuration eventType specification */
2ff24e4c 444 const AliHLTUInt32_t gkAliEventTypeConfiguration=34;
d6b69874 445 /** Update DCS eventType specification */
2ff24e4c 446 const AliHLTUInt32_t gkAliEventTypeReadPreprocessor=35;
9d9ffd37 447 /** Tick eventType specification */
2ff24e4c 448 const AliHLTUInt32_t gkAliEventTypeTick=64;
9d9ffd37 449 /** Max eventType specification */
2ff24e4c 450 const AliHLTUInt32_t gkAliEventTypeMax=64;
9d9ffd37 451
32db4144 452 //////////////////////////////////////////////////////////////////////////
453 //
454 // HLT defines and defaults
455 //
456 //////////////////////////////////////////////////////////////////////////
457
458 /** invalid event id */
459 const AliHLTEventID_t kAliHLTVoidEventID=~(AliHLTEventID_t)0;
460
461 /** invalid data specification */
462 const AliHLTUInt32_t kAliHLTVoidDataSpec = ~(AliHLTUInt32_t)0;
463
464 /** invalid shared memory type */
465 const AliHLTUInt32_t gkAliHLTComponentInvalidShmType = 0;
466
467 /** invalid shared memory id */
468 const AliHLTUInt64_t gkAliHLTComponentInvalidShmID = ~(AliHLTUInt64_t)0;
469
470 /** invalid data type */
471 const AliHLTComponentDataType kAliHLTVoidDataType = {
472 sizeof(AliHLTComponentDataType),
473 kAliHLTVoidDataTypeID,
3f850585 474 kAliHLTDataOriginVoid
32db4144 475 };
476
477 // there is currently a problem with rootcint if the predefined ids
478 // (commented below) are used. rootcint does not find the id if they
479 // are char arrays defined with {} and individual chars. If strings
480 // are used it works fine
481 /** any data type */
482 const AliHLTComponentDataType kAliHLTAnyDataType = {
483 sizeof(AliHLTComponentDataType),
484 kAliHLTAnyDataTypeID,
3f850585 485 kAliHLTDataOriginAny
32db4144 486 };
487
de6593d0 488 /** multiple output data types */
489 extern const AliHLTComponentDataType kAliHLTMultipleDataType;
490
32db4144 491 /** data to file exchange subscriber */
492 extern const AliHLTComponentDataType kAliHLTDataTypeFXSCalib;
493
494 /** DDL list data type */
495 extern const AliHLTComponentDataType kAliHLTDataTypeDDL;
496
497 /** SOR data type */
498 extern const AliHLTComponentDataType kAliHLTDataTypeSOR;
499
500 /** EOR data type */
501 extern const AliHLTComponentDataType kAliHLTDataTypeEOR;
5ec8e281 502
77405890 503 /** Event type specification */
504 extern const AliHLTComponentDataType kAliHLTDataTypeEvent;
505
853121af 506 /** Configuration event data type */
507 extern const AliHLTComponentDataType kAliHLTDataTypeComConf;
508
b543e186 509 /** DCS value update event */
510 extern const AliHLTComponentDataType kAliHLTDataTypeUpdtDCS;
511
c704e290 512 /** RAW DDL data specification, origin is 'any', data publisher origin correctly */
3f850585 513 extern const AliHLTComponentDataType kAliHLTDataTypeDDLRaw;
514
a978c0d5 515 /** ESD object data specification, origin is 'any' */
516 extern const AliHLTComponentDataType kAliHLTDataTypeESDObject;
517
c704e290 518 /** ESD Tree data specification, origin is 'any' */
519 extern const AliHLTComponentDataType kAliHLTDataTypeESDTree;
520
64defa03 521 /** 16 bit Hardware address selection data specification, origin is 'any' */
522 extern const AliHLTComponentDataType kAliHLTDataTypeHwAddr16;
523
2ff24e4c 524 /** Event statistics */
525 extern const AliHLTComponentDataType kAliHLTDataTypeEventStatistics;
526
527 /** Event summary */
528 extern const AliHLTComponentDataType kAliHLTDataTypeEventSummary;
529
530 /** Event statistics */
531 extern const AliHLTComponentDataType kAliHLTDataTypeRunStatistics;
532
533 /** Event summary */
534 extern const AliHLTComponentDataType kAliHLTDataTypeRunSummary;
535
c736de25 536 //////////////////////////////////////////////////////////////////////////
537 //
538 // Data Types for Monitoring objects
539 //
540 //////////////////////////////////////////////////////////////////////////
541
542 /** general ROOT TObject */
543 extern const AliHLTComponentDataType kAliHLTDataTypeTObject; // {ROOTTOBJ,"***"}
544
545 /** ROOT TObjArray */
546 extern const AliHLTComponentDataType kAliHLTDataTypeTObjArray; // {ROOTOBAR,"***"}
547
548 /** ROOT TTree */
549 extern const AliHLTComponentDataType kAliHLTDataTypeTTree; // {ROOTTREE,"***"}
550
551 /** ROOT TH1 (can be used for all histograms, they derive from TH1) */
552 extern const AliHLTComponentDataType kAliHLTDataTypeHistogram; // {ROOTHIST,"***"}
553
554 /** ROOT TNtuple */
555 extern const AliHLTComponentDataType kAliHLTDataTypeTNtuple; // {ROOTTUPL,"***"}
556
32db4144 557 //////////////////////////////////////////////////////////////////////////
558 //
559 // FXS subscriber meta information
560 //
561 //////////////////////////////////////////////////////////////////////////
562
2ff24e4c 563 const int gkAliHLTFXSHeaderfOriginSize = 4;
564 const int gkAliHLTFXSHeaderfFileIDSize = 128;
565 const int gkAliHLTFXSHeaderfDDLNumberSize = 64;
32db4144 566
567 /** Header in front of the data payload, in order to sent data to the FXS. */
568 struct AliHLTFXSHeader
569 {
570 AliHLTUInt32_t fHeaderVersion;
571 AliHLTUInt32_t fRunNumber;
572 char fOrigin[gkAliHLTFXSHeaderfOriginSize];
573 char fFileID[gkAliHLTFXSHeaderfFileIDSize];
574 char fDDLNumber[gkAliHLTFXSHeaderfDDLNumberSize];
575 };
576
577 //////////////////////////////////////////////////////////////////////////
578 //
579 // Component running environment
580 //
581 //////////////////////////////////////////////////////////////////////////
582
583 /** logging function */
584 typedef int (*AliHLTfctLogging)( void* param,
585 AliHLTComponentLogSeverity severity,
586 const char* origin,
587 const char* keyword,
588 const char* message);
589
590 /**
591 * @struct AliHLTComponentEnvironment
592 * Running environment for analysis components.
593 * The struct describes function callbacks for
594 */
f23a6e1a 595 struct AliHLTComponentEnvironment
596 {
597 AliHLTUInt32_t fStructSize;
598 void* fParam;
599 void* (*fAllocMemoryFunc)( void* param, unsigned long size );
600#if 0
32db4144 601 // future addition already foreseen/envisioned
602 // IMPORTANT: don not just remove the defines as this breaks the binary
603 // compatibility
604 int (*fAllocShmMemoryFunc)( void* param, unsigned long size, AliHLTComponentBlockData* blockLocation );
f23a6e1a 605#endif
8ede8717 606 int (*fGetEventDoneDataFunc)( void* param, AliHLTEventID_t eventID, unsigned long size, AliHLTComponentEventDoneData** edd );
5ec8e281 607 AliHLTfctLogging fLoggingFunc;
f23a6e1a 608 };
609}
610
32db4144 611//////////////////////////////////////////////////////////////////////////
612//
613// Data type helper functions
614//
615//////////////////////////////////////////////////////////////////////////
616
8ede8717 617inline bool operator==( const AliHLTComponentDataType& dt1, const AliHLTComponentDataType& dt2 )
853121af 618{
619 bool any1=true, any2=true, void1=true, void2=true, match=true;
620 for ( int i = 0; i < kAliHLTComponentDataTypefOriginSize; i++ ) {
621 any1&=(dt1.fOrigin[i]==kAliHLTDataOriginAny[i]);
622 any2&=(dt2.fOrigin[i]==kAliHLTDataOriginAny[i]);
623 void1&=(dt1.fOrigin[i]==kAliHLTDataOriginVoid[i]);
624 void2&=(dt2.fOrigin[i]==kAliHLTDataOriginVoid[i]);
625 match&=dt1.fOrigin[i]==dt2.fOrigin[i];
626 if (!(match || (any2 && !void1) || (any1 && !void2)))
627 return false;
628 }
629
630 any1=true, any2=true, match=true;
631 for ( int i = 0; i < kAliHLTComponentDataTypefIDsize; i++ ) {
632 any1&=(dt1.fID[i]==kAliHLTAnyDataTypeID[i]);
633 any2&=(dt2.fID[i]==kAliHLTAnyDataTypeID[i]);
634 void1&=(dt1.fID[i]==kAliHLTVoidDataTypeID[i]);
635 void2&=(dt2.fID[i]==kAliHLTVoidDataTypeID[i]);
636 match&=dt1.fID[i]==dt2.fID[i];
637 if (!(match || (any2 && !void1) || (any1 && !void2)))
638 return false;
639 }
640 return true;
641}
71d7c760 642
8ede8717 643inline bool operator!=( const AliHLTComponentDataType& dt1, const AliHLTComponentDataType& dt2 )
853121af 644{
645 return !(dt1==dt2);
646}
71d7c760 647
732e8f50 648inline bool MatchExactly( const AliHLTComponentDataType& dt1, const AliHLTComponentDataType& dt2 )
649{
650 for ( int i = 0; i < kAliHLTComponentDataTypefIDsize; i++ )
651 if ( dt1.fID[i] != dt2.fID[i] )
652 return false;
653 for ( int i = 0; i < kAliHLTComponentDataTypefOriginSize; i++ )
654 if ( dt1.fOrigin[i] != dt2.fOrigin[i] )
655 return false;
656 return true;
657}
658
69347e0d 659inline AliHLTComponentDataType operator|(const AliHLTComponentDataType srcdt, const char origin[kAliHLTComponentDataTypefOriginSize])
853121af 660{
661 AliHLTComponentDataType dt=srcdt;
662 for ( int i = 0; i < kAliHLTComponentDataTypefOriginSize; i++ )
663 dt.fOrigin[i]=origin[i];
664 return dt;
665}
32db4144 666
f23a6e1a 667#endif