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
36 #define ALIHLT_DATA_TYPES_VERSION 6
38 //////////////////////////////////////////////////////////////////////////
40 // HLT data origin variables.
42 // By converting from defines to variables, the origins can be used with
45 // AliHLTComponentDataType dt;
46 // dt = kAliHLTDataTypeDDLRaw | gkAliHLTDataOriginTPC;
48 //////////////////////////////////////////////////////////////////////////
50 /** field size of datat type origin
51 * @ingroup alihlt_component_datatypes
53 const int kAliHLTComponentDataTypefOriginSize=4;
56 /** invalid data origin
57 * @ingroup alihlt_component_datatypes
59 # define kAliHLTDataOriginVoid "\0\0\0"
60 /** old invalid data origin, kept for backward compatibility */
61 # define kAliHLTVoidDataOrigin "\0\0\0"
63 /** wildcard data type origin
64 * @ingroup alihlt_component_datatypes
66 # define kAliHLTDataOriginAny "***"
67 /** old wildcard data type origin, kept for backward compatibility */
68 # define kAliHLTAnyDataOrigin "***"
70 /** Data origin HLT out
71 * @ingroup alihlt_component_datatypes
73 extern const char kAliHLTDataOriginOut[kAliHLTComponentDataTypefOriginSize];
75 /** Data origin HLT/PubSub private internal
76 * @ingroup alihlt_component_datatypes
78 extern const char kAliHLTDataOriginPrivate[kAliHLTComponentDataTypefOriginSize];
81 * @ingroup alihlt_component_datatypes
83 extern const char kAliHLTDataOriginTPC[kAliHLTComponentDataTypefOriginSize];
86 * @ingroup alihlt_component_datatypes
88 extern const char kAliHLTDataOriginPHOS[kAliHLTComponentDataTypefOriginSize];
91 * @ingroup alihlt_component_datatypes
93 extern const char kAliHLTDataOriginMUON[kAliHLTComponentDataTypefOriginSize];
96 * @ingroup alihlt_component_datatypes
98 extern const char kAliHLTDataOriginTRD[kAliHLTComponentDataTypefOriginSize];
101 * @ingroup alihlt_component_datatypes
103 extern const char kAliHLTDataOriginITS[kAliHLTComponentDataTypefOriginSize];
105 /** Data origin for examples
106 * @ingroup alihlt_component_datatypes
108 extern const char kAliHLTDataOriginSample[kAliHLTComponentDataTypefOriginSize];
110 //////////////////////////////////////////////////////////////////////////
112 // HLT common data type defines
114 //////////////////////////////////////////////////////////////////////////
116 /** field size of data type id
117 * @ingroup alihlt_component_datatypes
119 const int kAliHLTComponentDataTypefIDsize=8;
122 /** invalid data type id
123 * @ingroup alihlt_component_datatypes
125 # define kAliHLTVoidDataTypeID "\0\0\0\0\0\0\0"
127 /** special id for all data types: any + void
128 * @ingroup alihlt_component_datatypes
130 # define kAliHLTAllDataTypesID "ALLDATA"
132 /** special id for any valid data type id
133 * @ingroup alihlt_component_datatypes
135 # define kAliHLTAnyDataTypeID "*******"
138 * @ingroup alihlt_component_datatypes
140 # define kAliHLTDDLRawDataTypeID {'D','D','L','_','R','A','W',' '}
142 /** calibration data for file exchange subscriber
143 * @ingroup alihlt_component_datatypes
145 # define kAliHLTFXSCalibDataTypeID {'F','X','S','_','C','A','L',' '}
147 /** start of run (SOR) event
149 * @ingroup alihlt_component_datatypes
151 # define kAliHLTSORDataTypeID {'S','T','A','R','T','O','F','R'}
153 /** end of run (EOR) event
155 * @ingroup alihlt_component_datatypes
157 # define kAliHLTEORDataTypeID {'E','N','D','O','F','R','U','N'}
160 * @ref AliHLTEventDDL
161 * @ingroup alihlt_component_datatypes
163 # define kAliHLTDDLDataTypeID {'D','D','L','L','I','S','T',' '}
166 * - empty payload, specification gives eventType
167 * @ingroup alihlt_component_datatypes
169 # define kAliHLTEventDataTypeID {'E','V','E','N','T','T','Y','P'}
171 /** ComponentConfiguration event
172 * - payload contains the CDB path as string
173 * @ingroup alihlt_component_datatypes
175 # define kAliHLTComConfDataTypeID {'C','O','M','_','C','O','N','F'}
177 /** DCS value update event
178 * - payload contains string of relevant detectors
179 * @ingroup alihlt_component_datatypes
181 # define kAliHLTUpdtDCSDataTypeID {'U','P','D','T','_','D','C','S'}
184 * an AliESD object of varying origin
185 * The 'V0' at the end allows a versioning
186 * @ingroup alihlt_component_datatypes
188 # define kAliHLTESDObjectDataTypeID {'A','L','I','E','S','D','V','0'}
190 /** ESD tree data block
191 * TTree with an AliESD object of varying origin
192 * @ingroup alihlt_component_datatypes
194 # define kAliHLTESDTreeDataTypeID {'E','S','D','_','T','R','E','E'}
197 * - the digits tree of an AliRoot module
198 * @ingroup alihlt_component_datatypes
200 #define kAliHLTTreeDDataTypeID {'A','L','I','T','R','E','E','D'}
203 * - the rec points tree of an AliRoot module
204 * @ingroup alihlt_component_datatypes
206 #define kAliHLTTreeRDataTypeID {'A','L','I','T','R','E','E','D'}
208 /** HW Address selection data block
209 * - a selection list for 16 bit HW addresses
211 * @ingroup alihlt_component_datatypes
213 # define kAliHLTHwAddr16DataTypeID {'H','W','A','D','D','R','1','6'}
216 * - event statistics for given detectors
218 * @ingroup alihlt_component_datatypes
220 # define kAliHLTEventStatisticsDataTypeID {'E','V','_','S','T','A','T','I'}
224 * - origin : kAliHLTDataOriginOut ( HLT )
225 * @ingroup alihlt_component_datatypes
227 # define kAliHLTEventSummaryDataTypeID {'E','V','_','S','U','M','M','A'}
230 * - run statistics for given detectors
232 * @ingroup alihlt_component_datatypes
234 # define kAliHLTRunStatisticsDataTypeID {'R','U','N','S','T','A','T','I'}
238 * - origin : kAliHLTDataOriginOut ( HLT )
239 * @ingroup alihlt_component_datatypes
241 # define kAliHLTRunSummaryDataTypeID {'R','U','N','S','U','M','M','A'}
243 /** general ROOT TObject
244 * - a general TObject exported from the HLT analysis
246 * @ingroup alihlt_component_datatypes
248 #define kAliHLTTObjectDataTypeID {'R','O','O','T','T','O','B','J'}
251 * - a TObjArray exported from the HLT analysis
253 * @ingroup alihlt_component_datatypes
255 #define kAliHLTTObjArrayDataTypeID {'R','O','O','T','O','B','A','R'}
258 * - a TTree object exported from the HLT analysis
260 * @ingroup alihlt_component_datatypes
262 #define kAliHLTTTreeDataTypeID {'R','O','O','T','T','R','E','E'}
265 * - a histogram object exported from the HLT analysis
266 * - class derives from TH1 (directly or indirectly) and inherits all common functionality
268 * @ingroup alihlt_component_datatypes
270 #define kAliHLTHistogramDataTypeID {'R','O','O','T','H','I','S','T'}
273 * - a TNtupl object exported from the HLT analysis
275 * @ingroup alihlt_component_datatypes
277 #define kAliHLTTNtupleDataTypeID {'R','O','O','T','T','U','P','L'}
282 //////////////////////////////////////////////////////////////////////////
284 // Basic HLT data types
286 //////////////////////////////////////////////////////////////////////////
288 typedef unsigned char AliHLTUInt8_t;
290 typedef signed char AliHLTInt8_t;
292 typedef unsigned short AliHLTUInt16_t;
294 typedef signed short AliHLTInt16_t;
296 typedef unsigned int AliHLTUInt32_t;
298 typedef signed int AliHLTInt32_t;
300 typedef unsigned long long AliHLTUInt64_t;
302 typedef signed long long AliHLTInt64_t;
304 typedef float AliHLTFloat32_t;
306 typedef double AliHLTFloat64_t;
308 typedef AliHLTUInt64_t AliHLTEventID_t;
310 //////////////////////////////////////////////////////////////////////////
312 // HLT logging levels
314 //////////////////////////////////////////////////////////////////////////
317 * Logging severities of the HLT
319 enum AliHLTComponentLogSeverity {
322 /** benchmark messages */
323 kHLTLogBenchmark = 0x1,
324 /** debug messages */
328 /** warning messages */
329 kHLTLogWarning = 0x8,
330 /** error messages */
332 /** fatal error messages */
334 /** few important messages not to be filtered out.
335 * redirected to kHLTLogInfo in AliRoot
337 kHLTLogImportant = 0x40,
338 /** special value to enable all messages */
340 /** the default logging filter */
341 kHLTLogDefault = 0x79
344 //////////////////////////////////////////////////////////////////////////
346 // HLT data structures for data exchange and external interface
348 //////////////////////////////////////////////////////////////////////////
351 * @struct AliHLTComponentEventData
354 struct AliHLTComponentEventData
356 AliHLTUInt32_t fStructSize;
357 AliHLTEventID_t fEventID;
358 AliHLTUInt32_t fEventCreation_s;
359 AliHLTUInt32_t fEventCreation_us;
360 AliHLTUInt32_t fBlockCnt;
364 * @struct AliHLTComponentShmData
365 * Shared memory descriptor.
366 * Irrelevant for analysis components.
368 struct AliHLTComponentShmData
370 AliHLTUInt32_t fStructSize;
371 AliHLTUInt32_t fShmType;
372 AliHLTUInt64_t fShmID;
376 * @defgroup alihlt_component_datatypes Common Component Data Types
377 * The analysis framework defines a number of common data types for
378 * usage in the detector modules, like e.g. ::kAliHLTAnyDataType
379 * and ::kAliHLTDataTypeDDLRaw. Those data types always have
380 * origin ::kAliHLTDataOriginAny. The correct detector origin can be
381 * set by using operator '|'
383 * AliHLTComponentDataType dt=kAliHLTDDLRawDataTypeID|kAliHLTDataOriginTPC
385 * @ingroup alihlt_component
389 * @struct AliHLTComponentDataType
390 * Data type descriptor for data blocks transferred through the processing
392 * @ingroup alihlt_component_datatypes
394 struct AliHLTComponentDataType
396 AliHLTUInt32_t fStructSize;
397 char fID[kAliHLTComponentDataTypefIDsize]; //!
398 char fOrigin[kAliHLTComponentDataTypefOriginSize]; //!
402 * @struct AliHLTComponentBlockData
403 * This is the decription of data blocks exchanged between components.
404 * \b IMPORTANT: The validity of fPtr and fOffset is different for input and
406 * - input blocks: The \em fPtr member always points to the beginning of the data
407 * of size \em fSize. fOffset is ignored and should be in most
409 * - output blocks: The \em fPtr member is ignored by the framework. \em fOffset
410 * must specify the start of the data relative to the output
411 * buffer. The data block has size \em fSize.
413 struct AliHLTComponentBlockData
415 /* size and version of the struct */
416 AliHLTUInt32_t fStructSize;
417 /* shared memory key, ignored by processing components */
418 AliHLTComponentShmData fShmKey;
419 /* offset of output data relative to the output buffer */
420 AliHLTUInt32_t fOffset;
421 /* start of the data for input data blocks, fOffset to be ignored*/
423 /* size of the data block */
424 AliHLTUInt32_t fSize;
425 /* data type of the data block */
426 AliHLTComponentDataType fDataType;
427 /* data specification of the data block */
428 AliHLTUInt32_t fSpecification;
432 * @struct AliHLTComponentEventDoneData
435 struct AliHLTComponentEventDoneData
437 AliHLTUInt32_t fStructSize;
438 AliHLTUInt32_t fDataSize;
443 * @struct AliHLTRunDesc
445 * The struct is send with the SOR and EOR events.
449 AliHLTUInt32_t fStructSize;
450 AliHLTUInt32_t fRunNo;
451 AliHLTUInt32_t fRunType;
454 //////////////////////////////////////////////////////////////////////////
456 // Trigger meta information
458 //////////////////////////////////////////////////////////////////////////
460 /** field size of fAttribute */
461 const int gkAliHLTBlockDAttributeCount = 8;
463 /** field size of fCommonHeader */
464 const int gkAliHLTCommonHeaderCount = 8;
466 /** size of the DDL list */
467 const int gkAliHLTDDLListSize = 30;
469 /** Number of Trigger Classes of CTP in CDH */
470 const int gkNCTPTriggerClasses = 50;
473 * @struct AliHLTEventDDL
475 * The struct is send with the DDLLIST event.
476 * Used in the trigger structure for internal apperance of
477 * the DLLs as well as for the HLT readout list send to DAQ
478 * ( as DataType : kAliHLTDataTypeDDL )
480 struct AliHLTEventDDL
482 AliHLTUInt32_t fCount;
483 AliHLTUInt32_t fList[gkAliHLTDDLListSize];
487 * @struct AliHLTEventTriggerData
489 struct AliHLTEventTriggerData
491 AliHLTUInt8_t fAttributes[gkAliHLTBlockDAttributeCount];
492 AliHLTUInt64_t fHLTStatus; // Bit field
493 AliHLTUInt32_t fCommonHeaderWordCnt;
494 AliHLTUInt32_t fCommonHeader[gkAliHLTCommonHeaderCount];
495 AliHLTEventDDL fReadoutList;
499 * @struct AliHLTComponentTriggerData
502 struct AliHLTComponentTriggerData
504 AliHLTUInt32_t fStructSize;
505 AliHLTUInt32_t fDataSize;
509 //////////////////////////////////////////////////////////////////////////
511 // HLT Event Type Specification
513 //////////////////////////////////////////////////////////////////////////
515 /** Unknown eventType specification */
516 const AliHLTUInt32_t gkAliEventTypeUnknown = ~(AliHLTUInt32_t)0;
517 /** SOR eventType specification */
518 const AliHLTUInt32_t gkAliEventTypeStartOfRun=1;
519 /** Data eventType specification */
520 const AliHLTUInt32_t gkAliEventTypeData=2;
521 /** EOR eventType specification */
522 const AliHLTUInt32_t gkAliEventTypeEndOfRun=4;
523 /** Corrupt eventType specification */
524 const AliHLTUInt32_t gkAliEventTypeCorruptID=8;
525 /** Calibration eventType specification */
526 const AliHLTUInt32_t gkAliEventTypeCalibration=16;
527 /** DataReplay eventType specification */
528 const AliHLTUInt32_t gkAliEventTypeDataReplay=32;
529 /** Configuration eventType specification */
530 const AliHLTUInt32_t gkAliEventTypeConfiguration=34;
531 /** Update DCS eventType specification */
532 const AliHLTUInt32_t gkAliEventTypeReadPreprocessor=35;
533 /** Tick eventType specification */
534 const AliHLTUInt32_t gkAliEventTypeTick=64;
535 /** Max eventType specification */
536 const AliHLTUInt32_t gkAliEventTypeMax=64;
538 //////////////////////////////////////////////////////////////////////////
540 // HLT defines and defaults
542 //////////////////////////////////////////////////////////////////////////
545 * @ingroup alihlt_component_datatypes
547 const AliHLTEventID_t kAliHLTVoidEventID=~(AliHLTEventID_t)0;
549 /** invalid data specification
550 * @ingroup alihlt_component_datatypes
552 const AliHLTUInt32_t kAliHLTVoidDataSpec = ~(AliHLTUInt32_t)0;
554 /** invalid shared memory type */
555 const AliHLTUInt32_t gkAliHLTComponentInvalidShmType = 0;
557 /** invalid shared memory id */
558 const AliHLTUInt64_t gkAliHLTComponentInvalidShmID = ~(AliHLTUInt64_t)0;
560 /** invalid data type
561 * @ingroup alihlt_component_datatypes
563 const AliHLTComponentDataType kAliHLTVoidDataType = {
564 sizeof(AliHLTComponentDataType),
565 kAliHLTVoidDataTypeID,
566 kAliHLTDataOriginVoid
569 /** all data types, means any + void data type
570 * @ingroup alihlt_component_datatypes
572 const AliHLTComponentDataType kAliHLTAllDataTypes = {
573 sizeof(AliHLTComponentDataType),
574 kAliHLTAllDataTypesID,
578 // there is currently a problem with rootcint if the predefined ids
579 // (commented below) are used. rootcint does not find the id if they
580 // are char arrays defined with {} and individual chars. If strings
581 // are used it works fine
583 * @ingroup alihlt_component_datatypes
585 const AliHLTComponentDataType kAliHLTAnyDataType = {
586 sizeof(AliHLTComponentDataType),
587 kAliHLTAnyDataTypeID,
591 /** multiple output data types
592 * @ingroup alihlt_component_datatypes
594 extern const AliHLTComponentDataType kAliHLTMultipleDataType;
596 /** data to file exchange subscriber
597 * @ingroup alihlt_component_datatypes
599 extern const AliHLTComponentDataType kAliHLTDataTypeFXSCalib;
601 /** DDL list data type
602 * @ingroup alihlt_component_datatypes
604 extern const AliHLTComponentDataType kAliHLTDataTypeDDL;
607 * @ingroup alihlt_component_datatypes
609 extern const AliHLTComponentDataType kAliHLTDataTypeSOR;
612 * @ingroup alihlt_component_datatypes
614 extern const AliHLTComponentDataType kAliHLTDataTypeEOR;
616 /** Event type specification
617 * @ingroup alihlt_component_datatypes
619 extern const AliHLTComponentDataType kAliHLTDataTypeEvent;
621 /** Configuration event data type
622 * @ingroup alihlt_component_datatypes
624 extern const AliHLTComponentDataType kAliHLTDataTypeComConf;
626 /** DCS value update event
627 * @ingroup alihlt_component_datatypes
629 extern const AliHLTComponentDataType kAliHLTDataTypeUpdtDCS;
631 /** RAW DDL data specification, origin is 'any', data publisher origin correctly
632 * @ingroup alihlt_component_datatypes
634 extern const AliHLTComponentDataType kAliHLTDataTypeDDLRaw;
636 /** ESD object data specification, origin is 'any'
637 * @ingroup alihlt_component_datatypes
639 extern const AliHLTComponentDataType kAliHLTDataTypeESDObject;
641 /** ESD Tree data specification, origin is 'any'
643 * @ingroup alihlt_component_datatypes
645 extern const AliHLTComponentDataType kAliHLTDataTypeESDTree;
647 /** AliRoot TreeD data specification, origin is 'any'
648 * @ingroup alihlt_component_datatypes
650 extern const AliHLTComponentDataType kAliHLTDataTypeAliTreeD;
652 /** AliRoot TreeR data specification, origin is 'any'
653 * @ingroup alihlt_component_datatypes
655 extern const AliHLTComponentDataType kAliHLTDataTypeAliTreeR;
657 /** 16 bit Hardware address selection data specification, origin is 'any'
658 * @ingroup alihlt_component_datatypes
660 extern const AliHLTComponentDataType kAliHLTDataTypeHwAddr16;
663 * @ingroup alihlt_component_datatypes
665 extern const AliHLTComponentDataType kAliHLTDataTypeEventStatistics;
668 * @ingroup alihlt_component_datatypes
670 extern const AliHLTComponentDataType kAliHLTDataTypeEventSummary;
673 * @ingroup alihlt_component_datatypes
675 extern const AliHLTComponentDataType kAliHLTDataTypeRunStatistics;
678 * @ingroup alihlt_component_datatypes
680 extern const AliHLTComponentDataType kAliHLTDataTypeRunSummary;
682 //////////////////////////////////////////////////////////////////////////
684 // Data Types for Monitoring objects
686 //////////////////////////////////////////////////////////////////////////
688 /** general ROOT TObject
689 * @ingroup alihlt_component_datatypes
691 extern const AliHLTComponentDataType kAliHLTDataTypeTObject; // {ROOTTOBJ,"***"}
694 * @ingroup alihlt_component_datatypes
696 extern const AliHLTComponentDataType kAliHLTDataTypeTObjArray; // {ROOTOBAR,"***"}
699 * @ingroup alihlt_component_datatypes
701 extern const AliHLTComponentDataType kAliHLTDataTypeTTree; // {ROOTTREE,"***"}
703 /** ROOT TH1 (can be used for all histograms, they derive from TH1)
704 * @ingroup alihlt_component_datatypes
706 extern const AliHLTComponentDataType kAliHLTDataTypeHistogram; // {ROOTHIST,"***"}
709 * @ingroup alihlt_component_datatypes
711 extern const AliHLTComponentDataType kAliHLTDataTypeTNtuple; // {ROOTTUPL,"***"}
713 //////////////////////////////////////////////////////////////////////////
715 // FXS subscriber meta information
717 //////////////////////////////////////////////////////////////////////////
719 const int gkAliHLTFXSHeaderfOriginSize = 4;
720 const int gkAliHLTFXSHeaderfFileIDSize = 128;
721 const int gkAliHLTFXSHeaderfDDLNumberSize = 64;
723 /** Header in front of the data payload, in order to sent data to the FXS. */
724 struct AliHLTFXSHeader
726 AliHLTUInt32_t fHeaderVersion;
727 AliHLTUInt32_t fRunNumber;
728 char fOrigin[gkAliHLTFXSHeaderfOriginSize];
729 char fFileID[gkAliHLTFXSHeaderfFileIDSize];
730 char fDDLNumber[gkAliHLTFXSHeaderfDDLNumberSize];
733 //////////////////////////////////////////////////////////////////////////
735 // Component running environment
737 //////////////////////////////////////////////////////////////////////////
739 /** logging function */
740 typedef int (*AliHLTfctLogging)( void* param,
741 AliHLTComponentLogSeverity severity,
744 const char* message);
747 * @struct AliHLTComponentEnvironment
748 * Running environment for analysis components.
749 * The struct describes function callbacks for
751 struct AliHLTComponentEnvironment
753 AliHLTUInt32_t fStructSize;
755 void* (*fAllocMemoryFunc)( void* param, unsigned long size );
757 // future addition already foreseen/envisioned
758 // IMPORTANT: don not just remove the defines as this breaks the binary
760 int (*fAllocShmMemoryFunc)( void* param, unsigned long size, AliHLTComponentBlockData* blockLocation );
762 int (*fGetEventDoneDataFunc)( void* param, AliHLTEventID_t eventID, unsigned long size, AliHLTComponentEventDoneData** edd );
763 AliHLTfctLogging fLoggingFunc;
767 //////////////////////////////////////////////////////////////////////////
769 // Data type helper functions
771 //////////////////////////////////////////////////////////////////////////
773 /** exact comparison of HLT component data types
774 * @ingroup alihlt_component_datatypes
776 inline bool MatchExactly( const AliHLTComponentDataType& dt1, const AliHLTComponentDataType& dt2 )
778 for ( int i = 0; i < kAliHLTComponentDataTypefIDsize; i++ )
779 if ( dt1.fID[i] != dt2.fID[i] )
781 for ( int i = 0; i < kAliHLTComponentDataTypefOriginSize; i++ )
782 if ( dt1.fOrigin[i] != dt2.fOrigin[i] )
787 /** Comparison operator for HLT component data types.
788 * The operator takes wildcards into account, i.e. the ::kAliHLTAnyDataType,
789 * ::kAliHLTAnyDataTypeID and ::kAliHLTDataOriginAny definitions.
790 * @ingroup alihlt_component_datatypes
792 inline bool operator==( const AliHLTComponentDataType& dt1, const AliHLTComponentDataType& dt2 )
794 if (MatchExactly(dt1, kAliHLTAllDataTypes)) return true;
795 if (MatchExactly(dt2, kAliHLTAllDataTypes)) return true;
797 bool any1=true, any2=true, void1=true, void2=true, match=true;
798 for ( int i = 0; i < kAliHLTComponentDataTypefOriginSize; i++ ) {
799 any1&=(dt1.fOrigin[i]==kAliHLTDataOriginAny[i]);
800 any2&=(dt2.fOrigin[i]==kAliHLTDataOriginAny[i]);
801 void1&=(dt1.fOrigin[i]==kAliHLTDataOriginVoid[i]);
802 void2&=(dt2.fOrigin[i]==kAliHLTDataOriginVoid[i]);
803 match&=dt1.fOrigin[i]==dt2.fOrigin[i];
804 if (!(match || (any2 && !void1) || (any1 && !void2)))
808 any1=true, any2=true, match=true;
809 for ( int i = 0; i < kAliHLTComponentDataTypefIDsize; i++ ) {
810 any1&=(dt1.fID[i]==kAliHLTAnyDataTypeID[i]);
811 any2&=(dt2.fID[i]==kAliHLTAnyDataTypeID[i]);
812 void1&=(dt1.fID[i]==kAliHLTVoidDataTypeID[i]);
813 void2&=(dt2.fID[i]==kAliHLTVoidDataTypeID[i]);
814 match&=dt1.fID[i]==dt2.fID[i];
815 if (!(match || (any2 && !void1) || (any1 && !void2)))
821 /** Comparison operator for HLT component data types
822 * Invers of operator==
823 * @ingroup alihlt_component_datatypes
825 inline bool operator!=( const AliHLTComponentDataType& dt1, const AliHLTComponentDataType& dt2 )
830 /** merge operator for HLT component data types and origins
831 * @ingroup alihlt_component_datatypes
833 inline AliHLTComponentDataType operator|(const AliHLTComponentDataType srcdt, const char origin[kAliHLTComponentDataTypefOriginSize])
835 AliHLTComponentDataType dt=srcdt;
836 for ( int i = 0; i < kAliHLTComponentDataTypefOriginSize; i++ )
837 dt.fOrigin[i]=origin[i];