3 #ifndef ALIHLTDATATYPES_H
4 #define ALIHLTDATATYPES_H
5 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
6 * See cxx source for full Copyright notice */
8 /** @file AliHLTDataTypes.h
9 @author Matthias Richter, Timm Steinbeck
11 @brief Data type declaration for the HLT module.
18 typedef unsigned char AliHLTUInt8_t;
20 typedef unsigned short AliHLTUInt16_t;
22 typedef unsigned int AliHLTUInt32_t;
24 typedef unsigned long long AliHLTUInt64_t;
26 typedef AliHLTUInt64_t AliHLTEventID_t;
28 enum AliHLTComponentLogSeverity { kHLTLogNone=0, kHLTLogBenchmark=1, kHLTLogDebug=2, kHLTLogInfo=4, kHLTLogWarning=8, kHLTLogError=16, kHLTLogFatal=32, kHLTLogAll=0x3f, kHLTLogDefault=0x39 };
30 struct AliHLTComponentEventData
32 AliHLTUInt32_t fStructSize;
33 AliHLTEventID_t fEventID;
34 AliHLTUInt32_t fEventCreation_s;
35 AliHLTUInt32_t fEventCreation_us;
36 AliHLTUInt32_t fBlockCnt;
39 struct AliHLTComponentShmData
41 AliHLTUInt32_t fStructSize;
42 AliHLTUInt32_t fShmType;
43 AliHLTUInt64_t fShmID;
46 const AliHLTUInt32_t gkAliHLTComponentInvalidShmType = 0;
47 const AliHLTUInt64_t gkAliHLTComponentInvalidShmID = ~(AliHLTUInt64_t)0;
49 const int kAliHLTComponentDataTypefIDsize=8;
50 const int kAliHLTComponentDataTypefOriginSize=4;
51 struct AliHLTComponentDataType
53 AliHLTUInt32_t fStructSize;
54 char fID[kAliHLTComponentDataTypefIDsize];
55 char fOrigin[kAliHLTComponentDataTypefOriginSize];
58 # define kAliHLTVoidDataTypeID "\0\0\0\0\0\0\0"
59 # define kAliHLTVoidDataOrigin "\0\0\0"
60 # define kAliHLTAnyDataTypeID "*******"
61 # define kAliHLTAnyDataOrigin "***"
62 const AliHLTComponentDataType kAliHLTVoidDataType = {sizeof(AliHLTComponentDataType), kAliHLTVoidDataTypeID, kAliHLTVoidDataOrigin};
63 const AliHLTComponentDataType kAliHLTAnyDataType = {sizeof(AliHLTComponentDataType), kAliHLTAnyDataTypeID, kAliHLTAnyDataOrigin};
65 struct AliHLTComponentBlockData
67 AliHLTUInt32_t fStructSize;
68 AliHLTComponentShmData fShmKey;
69 AliHLTUInt32_t fOffset;
72 AliHLTComponentDataType fDataType;
73 AliHLTUInt32_t fSpecification;
76 struct AliHLTComponentTriggerData
78 AliHLTUInt32_t fStructSize;
79 AliHLTUInt32_t fDataSize;
83 struct AliHLTComponentEventDoneData
85 AliHLTUInt32_t fStructSize;
86 AliHLTUInt32_t fDataSize;
90 typedef int (*AliHLTfctLogging)( void* param, AliHLTComponentLogSeverity severity, const char* origin, const char* keyword, const char* message );
92 struct AliHLTComponentEnvironment
94 AliHLTUInt32_t fStructSize;
96 void* (*fAllocMemoryFunc)( void* param, unsigned long size );
98 int (*fAllocShmMemoryFunc)( void* param, unsigned long size, AliHLTComponentBlockData* blockLocation ); // future addition already foreseen/envisioned
100 int (*fGetEventDoneDataFunc)( void* param, AliHLTEventID_t eventID, unsigned long size, AliHLTComponentEventDoneData** edd );
101 AliHLTfctLogging fLoggingFunc;
105 inline bool operator==( const AliHLTComponentDataType& dt1, const AliHLTComponentDataType& dt2 )
107 for ( int i = 0; i < kAliHLTComponentDataTypefIDsize; i++ )
108 if ( dt1.fID[i] != dt2.fID[i] )
110 for ( int i = 0; i < kAliHLTComponentDataTypefOriginSize; i++ )
111 if ( dt1.fOrigin[i] != dt2.fOrigin[i] )
116 inline bool operator!=( const AliHLTComponentDataType& dt1, const AliHLTComponentDataType& dt2 )
118 for ( int i = 0; i < kAliHLTComponentDataTypefIDsize; i++ )
119 if ( dt1.fID[i] != dt2.fID[i] )
121 for ( int i = 0; i < kAliHLTComponentDataTypefOriginSize; i++ )
122 if ( dt1.fOrigin[i] != dt2.fOrigin[i] )