3 #ifndef ALIHLTDATATYPES_H
4 #define ALIHLTDATATYPES_H
5 /* This file is property of and copyright by the ALICE HLT Project *
6 * ALICE Experiment at CERN, All rights reserved. *
7 * See cxx source for full Copyright notice */
9 /** @file AliHLTDataTypes.h
10 @author Matthias Richter, Timm Steinbeck, Jochen Thaeder
12 @brief Data type declaration for the HLT module.
15 //////////////////////////////////////////////////////////////////////////
17 // version no of HLT data types
19 //////////////////////////////////////////////////////////////////////////
21 /* Version Description
22 * 1 first version until June 07; implicite, not tagged
23 * 2 introduced June 07, enhanced/cleaned/arranged structure
24 * 3 2007-11-15 RAW DDL data type added; some inconsistencies fixed
25 * ('void' and 'any' origins); added signed HLT basic data types
26 * 2007-11-23 origin defines have become variables in conjunction
27 * to be used with the operator| (AliHLTComponentDataType)
28 * 2007-11-24 added trigger structs and ESD tree data type
29 * 4 Component configuration and DCS update events added
30 * gkAliHLTDDLListSize set from 29 to 30 according to new PubSub
32 * 5 Data types for Run and Event summary, and for monitoring added
33 * 6 Common data types for TreeD and TreeR defined
34 * kAliHLTAllDataTypes and kAliHLTDataOriginSample added
35 * kAliHLTDataOriginEMCAL added
37 #define ALIHLT_DATA_TYPES_VERSION 6
39 //////////////////////////////////////////////////////////////////////////
41 // HLT data origin variables.
43 // By converting from defines to variables, the origins can be used with
46 // AliHLTComponentDataType dt;
47 // dt = kAliHLTDataTypeDDLRaw | gkAliHLTDataOriginTPC;
49 //////////////////////////////////////////////////////////////////////////
51 /** field size of datat type origin
52 * @ingroup alihlt_component_datatypes
54 const int kAliHLTComponentDataTypefOriginSize=4;
57 /** invalid data origin
58 * @ingroup alihlt_component_datatypes
60 # define kAliHLTDataOriginVoid "\0\0\0"
61 /** old invalid data origin, kept for backward compatibility */
62 # define kAliHLTVoidDataOrigin "\0\0\0"
64 /** wildcard data type origin
65 * @ingroup alihlt_component_datatypes
67 # define kAliHLTDataOriginAny "***"
68 /** old wildcard data type origin, kept for backward compatibility */
69 # define kAliHLTAnyDataOrigin "***"
71 /** Data origin HLT out
72 * @ingroup alihlt_component_datatypes
74 extern const char kAliHLTDataOriginOut[kAliHLTComponentDataTypefOriginSize];
76 /** Data origin HLT/PubSub private internal
77 * @ingroup alihlt_component_datatypes
79 extern const char kAliHLTDataOriginPrivate[kAliHLTComponentDataTypefOriginSize];
82 * @ingroup alihlt_component_datatypes
84 extern const char kAliHLTDataOriginTPC[kAliHLTComponentDataTypefOriginSize];
87 * @ingroup alihlt_component_datatypes
89 extern const char kAliHLTDataOriginPHOS[kAliHLTComponentDataTypefOriginSize];
92 * @ingroup alihlt_component_datatypes
94 extern const char kAliHLTDataOriginMUON[kAliHLTComponentDataTypefOriginSize];
97 * @ingroup alihlt_component_datatypes
99 extern const char kAliHLTDataOriginTRD[kAliHLTComponentDataTypefOriginSize];
102 * @ingroup alihlt_component_datatypes
104 extern const char kAliHLTDataOriginITS[kAliHLTComponentDataTypefOriginSize];
106 /** Data origin for examples
107 * @ingroup alihlt_component_datatypes
109 extern const char kAliHLTDataOriginSample[kAliHLTComponentDataTypefOriginSize];
111 /** Data origin EMCAL
112 * @ingroup alihlt_component_datatypes
114 extern const char kAliHLTDataOriginEMCAL[kAliHLTComponentDataTypefOriginSize];
116 //////////////////////////////////////////////////////////////////////////
118 // HLT common data type defines
120 //////////////////////////////////////////////////////////////////////////
122 /** field size of data type id
123 * @ingroup alihlt_component_datatypes
125 const int kAliHLTComponentDataTypefIDsize=8;
128 /** invalid data type id
129 * @ingroup alihlt_component_datatypes
131 # define kAliHLTVoidDataTypeID "\0\0\0\0\0\0\0"
133 /** special id for all data types: any + void
134 * @ingroup alihlt_component_datatypes
136 # define kAliHLTAllDataTypesID "ALLDATA"
138 /** special id for any valid data type id
139 * @ingroup alihlt_component_datatypes
141 # define kAliHLTAnyDataTypeID "*******"
144 * @ingroup alihlt_component_datatypes
146 # define kAliHLTDDLRawDataTypeID {'D','D','L','_','R','A','W',' '}
148 /** calibration data for file exchange subscriber
149 * @ingroup alihlt_component_datatypes
151 # define kAliHLTFXSCalibDataTypeID {'F','X','S','_','C','A','L',' '}
153 /** start of run (SOR) event
155 * @ingroup alihlt_component_datatypes
157 # define kAliHLTSORDataTypeID {'S','T','A','R','T','O','F','R'}
159 /** end of run (EOR) event
161 * @ingroup alihlt_component_datatypes
163 # define kAliHLTEORDataTypeID {'E','N','D','O','F','R','U','N'}
166 * @ref AliHLTEventDDL
167 * @ingroup alihlt_component_datatypes
169 # define kAliHLTDDLDataTypeID {'D','D','L','L','I','S','T',' '}
172 * - empty payload, specification gives eventType
173 * @ingroup alihlt_component_datatypes
175 # define kAliHLTEventDataTypeID {'E','V','E','N','T','T','Y','P'}
177 /** ComponentConfiguration event
178 * - payload contains the CDB path as string
179 * @ingroup alihlt_component_datatypes
181 # define kAliHLTComConfDataTypeID {'C','O','M','_','C','O','N','F'}
183 /** DCS value update event
184 * - payload contains string of relevant detectors
185 * @ingroup alihlt_component_datatypes
187 # define kAliHLTUpdtDCSDataTypeID {'U','P','D','T','_','D','C','S'}
190 * an AliESD object of varying origin
191 * The 'V0' at the end allows a versioning
192 * @ingroup alihlt_component_datatypes
194 # define kAliHLTESDObjectDataTypeID {'A','L','I','E','S','D','V','0'}
196 /** ESD tree data block
197 * TTree with an AliESD object of varying origin
198 * @ingroup alihlt_component_datatypes
200 # define kAliHLTESDTreeDataTypeID {'E','S','D','_','T','R','E','E'}
203 * - the digits tree of an AliRoot module
204 * @ingroup alihlt_component_datatypes
206 #define kAliHLTTreeDDataTypeID {'A','L','I','T','R','E','E','D'}
209 * - the rec points tree of an AliRoot module
210 * @ingroup alihlt_component_datatypes
212 #define kAliHLTTreeRDataTypeID {'A','L','I','T','R','E','E','D'}
214 /** HW Address selection data block
215 * - a selection list for 16 bit HW addresses
217 * @ingroup alihlt_component_datatypes
219 # define kAliHLTHwAddr16DataTypeID {'H','W','A','D','D','R','1','6'}
222 * - event statistics for given detectors
224 * @ingroup alihlt_component_datatypes
226 # define kAliHLTEventStatisticsDataTypeID {'E','V','_','S','T','A','T','I'}
230 * - origin : kAliHLTDataOriginOut ( HLT )
231 * @ingroup alihlt_component_datatypes
233 # define kAliHLTEventSummaryDataTypeID {'E','V','_','S','U','M','M','A'}
236 * - run statistics for given detectors
238 * @ingroup alihlt_component_datatypes
240 # define kAliHLTRunStatisticsDataTypeID {'R','U','N','S','T','A','T','I'}
244 * - origin : kAliHLTDataOriginOut ( HLT )
245 * @ingroup alihlt_component_datatypes
247 # define kAliHLTRunSummaryDataTypeID {'R','U','N','S','U','M','M','A'}
249 /** general ROOT TObject
250 * - a general TObject exported from the HLT analysis
252 * @ingroup alihlt_component_datatypes
254 #define kAliHLTTObjectDataTypeID {'R','O','O','T','T','O','B','J'}
257 * - a TObjArray exported from the HLT analysis
259 * @ingroup alihlt_component_datatypes
261 #define kAliHLTTObjArrayDataTypeID {'R','O','O','T','O','B','A','R'}
264 * - a TTree object exported from the HLT analysis
266 * @ingroup alihlt_component_datatypes
268 #define kAliHLTTTreeDataTypeID {'R','O','O','T','T','R','E','E'}
271 * - a histogram object exported from the HLT analysis
272 * - class derives from TH1 (directly or indirectly) and inherits all common functionality
274 * @ingroup alihlt_component_datatypes
276 #define kAliHLTHistogramDataTypeID {'R','O','O','T','H','I','S','T'}
279 * - a TNtupl object exported from the HLT analysis
281 * @ingroup alihlt_component_datatypes
283 #define kAliHLTTNtupleDataTypeID {'R','O','O','T','T','U','P','L'}
288 //////////////////////////////////////////////////////////////////////////
290 // Basic HLT data types
292 //////////////////////////////////////////////////////////////////////////
294 typedef unsigned char AliHLTUInt8_t;
296 typedef signed char AliHLTInt8_t;
298 typedef unsigned short AliHLTUInt16_t;
300 typedef signed short AliHLTInt16_t;
302 typedef unsigned int AliHLTUInt32_t;
304 typedef signed int AliHLTInt32_t;
306 typedef unsigned long long AliHLTUInt64_t;
308 typedef signed long long AliHLTInt64_t;
310 typedef float AliHLTFloat32_t;
312 typedef double AliHLTFloat64_t;
314 typedef AliHLTUInt64_t AliHLTEventID_t;
316 //////////////////////////////////////////////////////////////////////////
318 // HLT logging levels
320 //////////////////////////////////////////////////////////////////////////
323 * Logging severities of the HLT
325 enum AliHLTComponentLogSeverity {
328 /** benchmark messages */
329 kHLTLogBenchmark = 0x1,
330 /** debug messages */
334 /** warning messages */
335 kHLTLogWarning = 0x8,
336 /** error messages */
338 /** fatal error messages */
340 /** few important messages not to be filtered out.
341 * redirected to kHLTLogInfo in AliRoot
343 kHLTLogImportant = 0x40,
344 /** special value to enable all messages */
346 /** the default logging filter */
347 kHLTLogDefault = 0x79
350 //////////////////////////////////////////////////////////////////////////
352 // HLT data structures for data exchange and external interface
354 //////////////////////////////////////////////////////////////////////////
357 * @struct AliHLTComponentEventData
360 struct AliHLTComponentEventData
362 AliHLTUInt32_t fStructSize;
363 AliHLTEventID_t fEventID;
364 AliHLTUInt32_t fEventCreation_s;
365 AliHLTUInt32_t fEventCreation_us;
366 AliHLTUInt32_t fBlockCnt;
370 * @struct AliHLTComponentShmData
371 * Shared memory descriptor.
372 * Irrelevant for analysis components.
374 struct AliHLTComponentShmData
376 AliHLTUInt32_t fStructSize;
377 AliHLTUInt32_t fShmType;
378 AliHLTUInt64_t fShmID;
382 * @defgroup alihlt_component_datatypes Common Component Data Types
383 * The analysis framework defines a number of common data types for
384 * usage in the detector modules, like e.g. ::kAliHLTAnyDataType
385 * and ::kAliHLTDataTypeDDLRaw. Those data types always have
386 * origin ::kAliHLTDataOriginAny. The correct detector origin can be
387 * set by using operator '|'
389 * AliHLTComponentDataType dt=kAliHLTDDLRawDataTypeID|kAliHLTDataOriginTPC
391 * @ingroup alihlt_component
395 * @struct AliHLTComponentDataType
396 * Data type descriptor for data blocks transferred through the processing
398 * @ingroup alihlt_component_datatypes
400 struct AliHLTComponentDataType
402 AliHLTUInt32_t fStructSize;
403 char fID[kAliHLTComponentDataTypefIDsize]; //!
404 char fOrigin[kAliHLTComponentDataTypefOriginSize]; //!
408 * @struct AliHLTComponentBlockData
409 * This is the decription of data blocks exchanged between components.
410 * \b IMPORTANT: The validity of fPtr and fOffset is different for input and
412 * - input blocks: The \em fPtr member always points to the beginning of the data
413 * of size \em fSize. fOffset is ignored and should be in most
415 * - output blocks: The \em fPtr member is ignored by the framework. \em fOffset
416 * must specify the start of the data relative to the output
417 * buffer. The data block has size \em fSize.
419 struct AliHLTComponentBlockData
421 /* size and version of the struct */
422 AliHLTUInt32_t fStructSize;
423 /* shared memory key, ignored by processing components */
424 AliHLTComponentShmData fShmKey;
425 /* offset of output data relative to the output buffer */
426 AliHLTUInt32_t fOffset;
427 /* start of the data for input data blocks, fOffset to be ignored*/
429 /* size of the data block */
430 AliHLTUInt32_t fSize;
431 /* data type of the data block */
432 AliHLTComponentDataType fDataType;
433 /* data specification of the data block */
434 AliHLTUInt32_t fSpecification;
438 * @struct AliHLTComponentEventDoneData
441 struct AliHLTComponentEventDoneData
443 AliHLTUInt32_t fStructSize;
444 AliHLTUInt32_t fDataSize;
449 * @struct AliHLTRunDesc
451 * The struct is send with the SOR and EOR events.
455 AliHLTUInt32_t fStructSize;
456 AliHLTUInt32_t fRunNo;
457 AliHLTUInt32_t fRunType;
460 //////////////////////////////////////////////////////////////////////////
462 // Trigger meta information
464 //////////////////////////////////////////////////////////////////////////
466 /** field size of fAttribute */
467 const int gkAliHLTBlockDAttributeCount = 8;
469 /** field size of fCommonHeader */
470 const int gkAliHLTCommonHeaderCount = 8;
472 /** size of the DDL list */
473 const int gkAliHLTDDLListSize = 30;
475 /** Number of Trigger Classes of CTP in CDH */
476 const int gkNCTPTriggerClasses = 50;
479 * @struct AliHLTEventDDL
481 * The struct is send with the DDLLIST event.
482 * Used in the trigger structure for internal apperance of
483 * the DLLs as well as for the HLT readout list send to DAQ
484 * ( as DataType : kAliHLTDataTypeDDL )
486 struct AliHLTEventDDL
488 AliHLTUInt32_t fCount;
489 AliHLTUInt32_t fList[gkAliHLTDDLListSize];
493 * @struct AliHLTEventTriggerData
495 struct AliHLTEventTriggerData
497 AliHLTUInt8_t fAttributes[gkAliHLTBlockDAttributeCount];
498 AliHLTUInt64_t fHLTStatus; // Bit field
499 AliHLTUInt32_t fCommonHeaderWordCnt;
500 AliHLTUInt32_t fCommonHeader[gkAliHLTCommonHeaderCount];
501 AliHLTEventDDL fReadoutList;
505 * @struct AliHLTComponentTriggerData
508 struct AliHLTComponentTriggerData
510 AliHLTUInt32_t fStructSize;
511 AliHLTUInt32_t fDataSize;
515 //////////////////////////////////////////////////////////////////////////
517 // HLT Event Type Specification
519 //////////////////////////////////////////////////////////////////////////
521 /** Unknown eventType specification */
522 const AliHLTUInt32_t gkAliEventTypeUnknown = ~(AliHLTUInt32_t)0;
523 /** SOR eventType specification */
524 const AliHLTUInt32_t gkAliEventTypeStartOfRun=1;
525 /** Data eventType specification */
526 const AliHLTUInt32_t gkAliEventTypeData=2;
527 /** EOR eventType specification */
528 const AliHLTUInt32_t gkAliEventTypeEndOfRun=4;
529 /** Corrupt eventType specification */
530 const AliHLTUInt32_t gkAliEventTypeCorruptID=8;
531 /** Calibration eventType specification */
532 const AliHLTUInt32_t gkAliEventTypeCalibration=16;
533 /** DataReplay eventType specification */
534 const AliHLTUInt32_t gkAliEventTypeDataReplay=32;
535 /** Configuration eventType specification */
536 const AliHLTUInt32_t gkAliEventTypeConfiguration=34;
537 /** Update DCS eventType specification */
538 const AliHLTUInt32_t gkAliEventTypeReadPreprocessor=35;
539 /** Tick eventType specification */
540 const AliHLTUInt32_t gkAliEventTypeTick=64;
541 /** Max eventType specification */
542 const AliHLTUInt32_t gkAliEventTypeMax=64;
544 //////////////////////////////////////////////////////////////////////////
546 // HLT defines and defaults
548 //////////////////////////////////////////////////////////////////////////
551 * @ingroup alihlt_component_datatypes
553 const AliHLTEventID_t kAliHLTVoidEventID=~(AliHLTEventID_t)0;
555 /** invalid data specification
556 * @ingroup alihlt_component_datatypes
558 const AliHLTUInt32_t kAliHLTVoidDataSpec = ~(AliHLTUInt32_t)0;
560 /** invalid shared memory type */
561 const AliHLTUInt32_t gkAliHLTComponentInvalidShmType = 0;
563 /** invalid shared memory id */
564 const AliHLTUInt64_t gkAliHLTComponentInvalidShmID = ~(AliHLTUInt64_t)0;
566 /** invalid data type
567 * @ingroup alihlt_component_datatypes
569 const AliHLTComponentDataType kAliHLTVoidDataType = {
570 sizeof(AliHLTComponentDataType),
571 kAliHLTVoidDataTypeID,
572 kAliHLTDataOriginVoid
575 /** all data types, means any + void data type
576 * @ingroup alihlt_component_datatypes
578 const AliHLTComponentDataType kAliHLTAllDataTypes = {
579 sizeof(AliHLTComponentDataType),
580 kAliHLTAllDataTypesID,
584 // there is currently a problem with rootcint if the predefined ids
585 // (commented below) are used. rootcint does not find the id if they
586 // are char arrays defined with {} and individual chars. If strings
587 // are used it works fine
589 * @ingroup alihlt_component_datatypes
591 const AliHLTComponentDataType kAliHLTAnyDataType = {
592 sizeof(AliHLTComponentDataType),
593 kAliHLTAnyDataTypeID,
597 /** multiple output data types
598 * @ingroup alihlt_component_datatypes
600 extern const AliHLTComponentDataType kAliHLTMultipleDataType;
602 /** data to file exchange subscriber
603 * @ingroup alihlt_component_datatypes
605 extern const AliHLTComponentDataType kAliHLTDataTypeFXSCalib;
607 /** DDL list data type
608 * @ingroup alihlt_component_datatypes
610 extern const AliHLTComponentDataType kAliHLTDataTypeDDL;
613 * @ingroup alihlt_component_datatypes
615 extern const AliHLTComponentDataType kAliHLTDataTypeSOR;
618 * @ingroup alihlt_component_datatypes
620 extern const AliHLTComponentDataType kAliHLTDataTypeEOR;
622 /** Event type specification
623 * @ingroup alihlt_component_datatypes
625 extern const AliHLTComponentDataType kAliHLTDataTypeEvent;
627 /** Configuration event data type
628 * @ingroup alihlt_component_datatypes
630 extern const AliHLTComponentDataType kAliHLTDataTypeComConf;
632 /** DCS value update event
633 * @ingroup alihlt_component_datatypes
635 extern const AliHLTComponentDataType kAliHLTDataTypeUpdtDCS;
637 /** RAW DDL data specification, origin is 'any', data publisher origin correctly
638 * @ingroup alihlt_component_datatypes
640 extern const AliHLTComponentDataType kAliHLTDataTypeDDLRaw;
642 /** ESD object data specification, origin is 'any'
643 * @ingroup alihlt_component_datatypes
645 extern const AliHLTComponentDataType kAliHLTDataTypeESDObject;
647 /** ESD Tree data specification, origin is 'any'
649 * @ingroup alihlt_component_datatypes
651 extern const AliHLTComponentDataType kAliHLTDataTypeESDTree;
653 /** AliRoot TreeD data specification, origin is 'any'
654 * @ingroup alihlt_component_datatypes
656 extern const AliHLTComponentDataType kAliHLTDataTypeAliTreeD;
658 /** AliRoot TreeR data specification, origin is 'any'
659 * @ingroup alihlt_component_datatypes
661 extern const AliHLTComponentDataType kAliHLTDataTypeAliTreeR;
663 /** 16 bit Hardware address selection data specification, origin is 'any'
664 * @ingroup alihlt_component_datatypes
666 extern const AliHLTComponentDataType kAliHLTDataTypeHwAddr16;
669 * @ingroup alihlt_component_datatypes
671 extern const AliHLTComponentDataType kAliHLTDataTypeEventStatistics;
674 * @ingroup alihlt_component_datatypes
676 extern const AliHLTComponentDataType kAliHLTDataTypeEventSummary;
679 * @ingroup alihlt_component_datatypes
681 extern const AliHLTComponentDataType kAliHLTDataTypeRunStatistics;
684 * @ingroup alihlt_component_datatypes
686 extern const AliHLTComponentDataType kAliHLTDataTypeRunSummary;
688 //////////////////////////////////////////////////////////////////////////
690 // Data Types for Monitoring objects
692 //////////////////////////////////////////////////////////////////////////
694 /** general ROOT TObject
695 * @ingroup alihlt_component_datatypes
697 extern const AliHLTComponentDataType kAliHLTDataTypeTObject; // {ROOTTOBJ,"***"}
700 * @ingroup alihlt_component_datatypes
702 extern const AliHLTComponentDataType kAliHLTDataTypeTObjArray; // {ROOTOBAR,"***"}
705 * @ingroup alihlt_component_datatypes
707 extern const AliHLTComponentDataType kAliHLTDataTypeTTree; // {ROOTTREE,"***"}
709 /** ROOT TH1 (can be used for all histograms, they derive from TH1)
710 * @ingroup alihlt_component_datatypes
712 extern const AliHLTComponentDataType kAliHLTDataTypeHistogram; // {ROOTHIST,"***"}
715 * @ingroup alihlt_component_datatypes
717 extern const AliHLTComponentDataType kAliHLTDataTypeTNtuple; // {ROOTTUPL,"***"}
719 //////////////////////////////////////////////////////////////////////////
721 // FXS subscriber meta information
723 //////////////////////////////////////////////////////////////////////////
725 const int gkAliHLTFXSHeaderfOriginSize = 4;
726 const int gkAliHLTFXSHeaderfFileIDSize = 128;
727 const int gkAliHLTFXSHeaderfDDLNumberSize = 64;
729 /** Header in front of the data payload, in order to sent data to the FXS. */
730 struct AliHLTFXSHeader
732 AliHLTUInt32_t fHeaderVersion;
733 AliHLTUInt32_t fRunNumber;
734 char fOrigin[gkAliHLTFXSHeaderfOriginSize];
735 char fFileID[gkAliHLTFXSHeaderfFileIDSize];
736 char fDDLNumber[gkAliHLTFXSHeaderfDDLNumberSize];
739 //////////////////////////////////////////////////////////////////////////
741 // Component running environment
743 //////////////////////////////////////////////////////////////////////////
745 /** logging function */
746 typedef int (*AliHLTfctLogging)( void* param,
747 AliHLTComponentLogSeverity severity,
750 const char* message);
753 * @struct AliHLTComponentEnvironment
754 * Running environment for analysis components.
755 * The struct describes function callbacks for
757 struct AliHLTComponentEnvironment
759 AliHLTUInt32_t fStructSize;
761 void* (*fAllocMemoryFunc)( void* param, unsigned long size );
763 // future addition already foreseen/envisioned
764 // IMPORTANT: don not just remove the defines as this breaks the binary
766 int (*fAllocShmMemoryFunc)( void* param, unsigned long size, AliHLTComponentBlockData* blockLocation );
768 int (*fGetEventDoneDataFunc)( void* param, AliHLTEventID_t eventID, unsigned long size, AliHLTComponentEventDoneData** edd );
769 AliHLTfctLogging fLoggingFunc;
773 //////////////////////////////////////////////////////////////////////////
775 // Data type helper functions
777 //////////////////////////////////////////////////////////////////////////
779 /** exact comparison of HLT component data types
780 * @ingroup alihlt_component_datatypes
782 inline bool MatchExactly( const AliHLTComponentDataType& dt1, const AliHLTComponentDataType& dt2 )
784 for ( int i = 0; i < kAliHLTComponentDataTypefIDsize; i++ )
785 if ( dt1.fID[i] != dt2.fID[i] )
787 for ( int i = 0; i < kAliHLTComponentDataTypefOriginSize; i++ )
788 if ( dt1.fOrigin[i] != dt2.fOrigin[i] )
793 /** Comparison operator for HLT component data types.
794 * The operator takes wildcards into account, i.e. the ::kAliHLTAnyDataType,
795 * ::kAliHLTAnyDataTypeID and ::kAliHLTDataOriginAny definitions.
796 * @ingroup alihlt_component_datatypes
798 inline bool operator==( const AliHLTComponentDataType& dt1, const AliHLTComponentDataType& dt2 )
800 if (MatchExactly(dt1, kAliHLTAllDataTypes)) return true;
801 if (MatchExactly(dt2, kAliHLTAllDataTypes)) return true;
803 bool any1=true, any2=true, void1=true, void2=true, match=true;
804 for ( int i = 0; i < kAliHLTComponentDataTypefOriginSize; i++ ) {
805 any1&=(dt1.fOrigin[i]==kAliHLTDataOriginAny[i]);
806 any2&=(dt2.fOrigin[i]==kAliHLTDataOriginAny[i]);
807 void1&=(dt1.fOrigin[i]==kAliHLTDataOriginVoid[i]);
808 void2&=(dt2.fOrigin[i]==kAliHLTDataOriginVoid[i]);
809 match&=dt1.fOrigin[i]==dt2.fOrigin[i];
810 if (!(match || (any2 && !void1) || (any1 && !void2)))
814 any1=true, any2=true, match=true;
815 for ( int i = 0; i < kAliHLTComponentDataTypefIDsize; i++ ) {
816 any1&=(dt1.fID[i]==kAliHLTAnyDataTypeID[i]);
817 any2&=(dt2.fID[i]==kAliHLTAnyDataTypeID[i]);
818 void1&=(dt1.fID[i]==kAliHLTVoidDataTypeID[i]);
819 void2&=(dt2.fID[i]==kAliHLTVoidDataTypeID[i]);
820 match&=dt1.fID[i]==dt2.fID[i];
821 if (!(match || (any2 && !void1) || (any1 && !void2)))
827 /** Comparison operator for HLT component data types
828 * Invers of operator==
829 * @ingroup alihlt_component_datatypes
831 inline bool operator!=( const AliHLTComponentDataType& dt1, const AliHLTComponentDataType& dt2 )
836 /** merge operator for HLT component data types and origins
837 * @ingroup alihlt_component_datatypes
839 inline AliHLTComponentDataType operator|(const AliHLTComponentDataType srcdt, const char origin[kAliHLTComponentDataTypefOriginSize])
841 AliHLTComponentDataType dt=srcdt;
842 for ( int i = 0; i < kAliHLTComponentDataTypefOriginSize; i++ )
843 dt.fOrigin[i]=origin[i];