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=0x3d };
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 const AliHLTEventID_t kAliHLTVoidEventID=~(AliHLTEventID_t)0;
40 struct AliHLTComponentShmData
42 AliHLTUInt32_t fStructSize;
43 AliHLTUInt32_t fShmType;
44 AliHLTUInt64_t fShmID;
47 const AliHLTUInt32_t gkAliHLTComponentInvalidShmType = 0;
48 const AliHLTUInt64_t gkAliHLTComponentInvalidShmID = ~(AliHLTUInt64_t)0;
50 const int kAliHLTComponentDataTypefIDsize=8;
51 const int kAliHLTComponentDataTypefOriginSize=4;
52 struct AliHLTComponentDataType
54 AliHLTUInt32_t fStructSize;
55 char fID[kAliHLTComponentDataTypefIDsize];
56 char fOrigin[kAliHLTComponentDataTypefOriginSize];
59 # define kAliHLTVoidDataTypeID "\0\0\0\0\0\0\0"
60 # define kAliHLTVoidDataOrigin "\0\0\0"
61 # define kAliHLTAnyDataTypeID "*******"
62 # define kAliHLTAnyDataOrigin "***"
63 const AliHLTComponentDataType kAliHLTVoidDataType = {sizeof(AliHLTComponentDataType), kAliHLTVoidDataTypeID, kAliHLTVoidDataOrigin};
64 const AliHLTComponentDataType kAliHLTAnyDataType = {sizeof(AliHLTComponentDataType), kAliHLTAnyDataTypeID, kAliHLTAnyDataOrigin};
65 const AliHLTUInt32_t kAliHLTVoidDataSpec = ~(AliHLTUInt32_t)0;
67 struct AliHLTComponentBlockData
69 AliHLTUInt32_t fStructSize;
70 AliHLTComponentShmData fShmKey;
71 AliHLTUInt32_t fOffset;
74 AliHLTComponentDataType fDataType;
75 AliHLTUInt32_t fSpecification;
78 struct AliHLTComponentTriggerData
80 AliHLTUInt32_t fStructSize;
81 AliHLTUInt32_t fDataSize;
85 struct AliHLTComponentEventDoneData
87 AliHLTUInt32_t fStructSize;
88 AliHLTUInt32_t fDataSize;
92 typedef int (*AliHLTfctLogging)( void* param, AliHLTComponentLogSeverity severity, const char* origin, const char* keyword, const char* message );
94 struct AliHLTComponentEnvironment
96 AliHLTUInt32_t fStructSize;
98 void* (*fAllocMemoryFunc)( void* param, unsigned long size );
100 int (*fAllocShmMemoryFunc)( void* param, unsigned long size, AliHLTComponentBlockData* blockLocation ); // future addition already foreseen/envisioned
102 int (*fGetEventDoneDataFunc)( void* param, AliHLTEventID_t eventID, unsigned long size, AliHLTComponentEventDoneData** edd );
103 AliHLTfctLogging fLoggingFunc;
107 inline bool operator==( const AliHLTComponentDataType& dt1, const AliHLTComponentDataType& dt2 )
109 for ( int i = 0; i < kAliHLTComponentDataTypefIDsize; i++ )
110 if ( dt1.fID[i] != dt2.fID[i] )
112 for ( int i = 0; i < kAliHLTComponentDataTypefOriginSize; i++ )
113 if ( dt1.fOrigin[i] != dt2.fOrigin[i] )
118 inline bool operator!=( const AliHLTComponentDataType& dt1, const AliHLTComponentDataType& dt2 )
120 for ( int i = 0; i < kAliHLTComponentDataTypefIDsize; i++ )
121 if ( dt1.fID[i] != dt2.fID[i] )
123 for ( int i = 0; i < kAliHLTComponentDataTypefOriginSize; i++ )
124 if ( dt1.fOrigin[i] != dt2.fOrigin[i] )