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 const AliHLTComponentDataType kAliHLTVoidDataType = {sizeof(AliHLTComponentDataType), kAliHLTVoidDataTypeID, kAliHLTVoidDataOrigin};
62 struct AliHLTComponentBlockData
64 AliHLTUInt32_t fStructSize;
65 AliHLTComponentShmData fShmKey;
66 AliHLTUInt32_t fOffset;
69 AliHLTComponentDataType fDataType;
70 AliHLTUInt32_t fSpecification;
73 struct AliHLTComponentTriggerData
75 AliHLTUInt32_t fStructSize;
76 AliHLTUInt32_t fDataSize;
80 struct AliHLTComponentEventDoneData
82 AliHLTUInt32_t fStructSize;
83 AliHLTUInt32_t fDataSize;
87 typedef int (*AliHLTfctLogging)( void* param, AliHLTComponentLogSeverity severity, const char* origin, const char* keyword, const char* message );
89 struct AliHLTComponentEnvironment
91 AliHLTUInt32_t fStructSize;
93 void* (*fAllocMemoryFunc)( void* param, unsigned long size );
95 int (*fAllocShmMemoryFunc)( void* param, unsigned long size, AliHLTComponentBlockData* blockLocation ); // future addition already foreseen/envisioned
97 int (*fGetEventDoneDataFunc)( void* param, AliHLTEventID_t eventID, unsigned long size, AliHLTComponentEventDoneData** edd );
98 AliHLTfctLogging fLoggingFunc;
102 inline bool operator==( const AliHLTComponentDataType& dt1, const AliHLTComponentDataType& dt2 )
104 for ( int i = 0; i < kAliHLTComponentDataTypefIDsize; i++ )
105 if ( dt1.fID[i] != dt2.fID[i] )
107 for ( int i = 0; i < kAliHLTComponentDataTypefOriginSize; i++ )
108 if ( dt1.fOrigin[i] != dt2.fOrigin[i] )
113 inline bool operator!=( const AliHLTComponentDataType& dt1, const AliHLTComponentDataType& dt2 )
115 for ( int i = 0; i < kAliHLTComponentDataTypefIDsize; i++ )
116 if ( dt1.fID[i] != dt2.fID[i] )
118 for ( int i = 0; i < kAliHLTComponentDataTypefOriginSize; i++ )
119 if ( dt1.fOrigin[i] != dt2.fOrigin[i] )