]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
classes renamed to follow coding conventions
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 23 Oct 2007 09:19:37 +0000 (09:19 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 23 Oct 2007 09:19:37 +0000 (09:19 +0000)
HLT/BASE/HOMER/AliHLTHOMERData.h
HLT/BASE/HOMER/AliHLTHOMERReader.cxx
HLT/BASE/HOMER/AliHLTHOMERReader.h
HLT/BASE/HOMER/AliHLTHOMERWriter.cxx
HLT/BASE/HOMER/AliHLTHOMERWriter.h

index 336905db1c2b6d2d90c2a262522ddbad9481e83e..5d444433999d7358769167e74fd0ad4f63c3275d 100644 (file)
@@ -1,6 +1,6 @@
 // XEMacs -*-C++-*-
-#ifndef _HOMERDATA_HPP_
-#define _HOMERDATA_HPP_
+#ifndef ALIHLTHOMERDATA_H
+#define ALIHLTHOMERDATA_H
 
 /************************************************************************
 **
@@ -375,4 +375,4 @@ class HOMERBlockDescriptor
 ***************************************************************************
 */
 
-#endif // _HOMERDATA_HPP_
+#endif // ALIHLTHOMERDATA_H
index 15676c1e152d6a0cbce1af4e2cbce7e90ddcc646..256feae0643049bb34f62207f6f3badde7aac4c3 100644 (file)
@@ -69,8 +69,8 @@ extern int h_errno;
 #define GET_ALL "GET ALL\n"
 
 #ifdef USE_ROOT
-ClassImp(MonitoringReader);
-ClassImp(HOMERReader);
+ClassImp(AliHLTMonitoringReader);
+ClassImp(AliHLTHOMERReader);
 #endif
 
 
@@ -78,7 +78,7 @@ ClassImp(HOMERReader);
 
 
 #ifdef USE_ROOT
-HOMERReader::HOMERReader()
+AliHLTHOMERReader::AliHLTHOMERReader()
   :
   fCurrentEventType(~(homer_uint64)0),
   fCurrentEventID(~(homer_uint64)0),
@@ -104,9 +104,9 @@ HOMERReader::HOMERReader()
 #endif
 
 
-HOMERReader::HOMERReader( const char* hostname, unsigned short port )
+AliHLTHOMERReader::AliHLTHOMERReader( const char* hostname, unsigned short port )
   :
-  MonitoringReader(),
+  AliHLTMonitoringReader(),
   fCurrentEventType(~(homer_uint64)0),
   fCurrentEventID(~(homer_uint64)0),
   fBlockCnt(0),
@@ -141,9 +141,9 @@ HOMERReader::HOMERReader( const char* hostname, unsigned short port )
        }
     }
 
-HOMERReader::HOMERReader( unsigned int tcpCnt, const char** hostnames, unsigned short* ports )
+AliHLTHOMERReader::AliHLTHOMERReader( unsigned int tcpCnt, const char** hostnames, unsigned short* ports )
   :
-  MonitoringReader(),
+  AliHLTMonitoringReader(),
   fCurrentEventType(~(homer_uint64)0),
   fCurrentEventID(~(homer_uint64)0),
   fBlockCnt(0),
@@ -179,9 +179,9 @@ HOMERReader::HOMERReader( unsigned int tcpCnt, const char** hostnames, unsigned
        }
     }
 
-HOMERReader::HOMERReader( key_t shmKey, int shmSize )
+AliHLTHOMERReader::AliHLTHOMERReader( key_t shmKey, int shmSize )
   :
-  MonitoringReader(),
+  AliHLTMonitoringReader(),
   fCurrentEventType(~(homer_uint64)0),
   fCurrentEventID(~(homer_uint64)0),
   fBlockCnt(0),
@@ -216,9 +216,9 @@ HOMERReader::HOMERReader( key_t shmKey, int shmSize )
        }
     }
 
-HOMERReader::HOMERReader( unsigned int shmCnt, key_t* shmKeys, int* shmSizes )
+AliHLTHOMERReader::AliHLTHOMERReader( unsigned int shmCnt, key_t* shmKeys, int* shmSizes )
   :
-  MonitoringReader(),
+  AliHLTMonitoringReader(),
   fCurrentEventType(~(homer_uint64)0),
   fCurrentEventID(~(homer_uint64)0),
   fBlockCnt(0),
@@ -254,10 +254,10 @@ HOMERReader::HOMERReader( unsigned int shmCnt, key_t* shmKeys, int* shmSizes )
        }
     }
 
-HOMERReader::HOMERReader( unsigned int tcpCnt, const char** hostnames, unsigned short* ports, 
+AliHLTHOMERReader::AliHLTHOMERReader( unsigned int tcpCnt, const char** hostnames, unsigned short* ports, 
                          unsigned int shmCnt, key_t* shmKeys, int* shmSizes )
   :
-  MonitoringReader(),
+  AliHLTMonitoringReader(),
   fCurrentEventType(~(homer_uint64)0),
   fCurrentEventID(~(homer_uint64)0),
   fBlockCnt(0),
@@ -302,28 +302,28 @@ HOMERReader::HOMERReader( unsigned int tcpCnt, const char** hostnames, unsigned
        fDataSources[n].fNdx = n;
        }
     }
-HOMERReader::~HOMERReader()
+AliHLTHOMERReader::~AliHLTHOMERReader()
     {
 // see header file for class documentation
     ReleaseCurrentEvent();
     FreeDataSources();
     }
 
-int  HOMERReader::ReadNextEvent()
+int  AliHLTHOMERReader::ReadNextEvent()
     {
 // see header file for class documentation
 // Read in the next available event
     return ReadNextEvent( false, 0 );
     }
 
-int HOMERReader::ReadNextEvent( unsigned long timeout )
+int AliHLTHOMERReader::ReadNextEvent( unsigned long timeout )
     {
 // see header file for class documentation
 // Read in the next available event
     return ReadNextEvent( true, timeout );
     }
 
-unsigned long HOMERReader::GetBlockDataLength( unsigned long ndx ) const
+unsigned long AliHLTHOMERReader::GetBlockDataLength( unsigned long ndx ) const
     {
 // see header file for class documentation
 // Return the size (in bytes) of the current event's data
@@ -333,7 +333,7 @@ unsigned long HOMERReader::GetBlockDataLength( unsigned long ndx ) const
     return fBlocks[ndx].fLength;
     }
 
-const void* HOMERReader::GetBlockData( unsigned long ndx ) const
+const void* AliHLTHOMERReader::GetBlockData( unsigned long ndx ) const
     {
 // see header file for class documentation
 // Return a pointer to the start of the current event's data
@@ -343,7 +343,7 @@ const void* HOMERReader::GetBlockData( unsigned long ndx ) const
     return fBlocks[ndx].fData;
     }
 
-const char* HOMERReader::GetBlockSendNodeID( unsigned long ndx ) const
+const char* AliHLTHOMERReader::GetBlockSendNodeID( unsigned long ndx ) const
     {
 // see header file for class documentation
 // Return IP address or hostname of node which sent the 
@@ -365,7 +365,7 @@ const char* HOMERReader::GetBlockSendNodeID( unsigned long ndx ) const
     //return fBlocks[ndx].fOriginatingNodeID;
     }
 
-homer_uint8 HOMERReader::GetBlockByteOrder( unsigned long ndx ) const
+homer_uint8 AliHLTHOMERReader::GetBlockByteOrder( unsigned long ndx ) const
     {
 // see header file for class documentation
 // Return byte order of the data stored in the 
@@ -379,7 +379,7 @@ homer_uint8 HOMERReader::GetBlockByteOrder( unsigned long ndx ) const
     return *(((homer_uint8*)fBlocks[ndx].fMetaData)+kByteOrderAttribute_8b_Offset);
     }
 
-homer_uint8 HOMERReader::GetBlockTypeAlignment( unsigned long ndx, homer_uint8 dataType ) const
+homer_uint8 AliHLTHOMERReader::GetBlockTypeAlignment( unsigned long ndx, homer_uint8 dataType ) const
     {
 // see header file for class documentation
 // Return the alignment (in bytes) of the given datatype 
@@ -400,7 +400,7 @@ homer_uint8 HOMERReader::GetBlockTypeAlignment( unsigned long ndx, homer_uint8 d
     return *(((homer_uint8*)fBlocks[ndx].fMetaData)+kAlignment_8b_StartOffset+dataType);
     }
 
-homer_uint64 HOMERReader::GetBlockStatusFlags( unsigned long ndx ) const
+homer_uint64 AliHLTHOMERReader::GetBlockStatusFlags( unsigned long ndx ) const
     {
 // see header file for class documentation
     if ( ndx >= fBlockCnt )
@@ -411,7 +411,7 @@ homer_uint64 HOMERReader::GetBlockStatusFlags( unsigned long ndx ) const
 /* HOMER specific */
 /* Return the type of the data in the current event's data
    block with the given block index (starting at 0). */
-homer_uint64 HOMERReader::GetBlockDataType( unsigned long ndx ) const
+homer_uint64 AliHLTHOMERReader::GetBlockDataType( unsigned long ndx ) const
     {
 // see header file for class documentation
     if ( ndx >= fBlockCnt )
@@ -422,7 +422,7 @@ homer_uint64 HOMERReader::GetBlockDataType( unsigned long ndx ) const
 
 /* Return the origin of the data in the current event's data
    block with the given block index (starting at 0). */
-homer_uint32 HOMERReader::GetBlockDataOrigin( unsigned long ndx ) const
+homer_uint32 AliHLTHOMERReader::GetBlockDataOrigin( unsigned long ndx ) const
     {
 // see header file for class documentation
     if ( ndx >= fBlockCnt )
@@ -433,7 +433,7 @@ homer_uint32 HOMERReader::GetBlockDataOrigin( unsigned long ndx ) const
 
 /* Return a specification of the data in the current event's data
    block with the given block index (starting at 0). */
-homer_uint32 HOMERReader::GetBlockDataSpec( unsigned long ndx ) const
+homer_uint32 AliHLTHOMERReader::GetBlockDataSpec( unsigned long ndx ) const
     {
 // see header file for class documentation
     if ( ndx >= fBlockCnt )
@@ -445,7 +445,7 @@ homer_uint32 HOMERReader::GetBlockDataSpec( unsigned long ndx ) const
 /* Find the next data block in the current event with the given
    data type, origin, and specification. Returns the block's 
    index. */
-unsigned long HOMERReader::FindBlockNdx( homer_uint64 type, homer_uint32 origin, 
+unsigned long AliHLTHOMERReader::FindBlockNdx( homer_uint64 type, homer_uint32 origin, 
                                         homer_uint32 spec, unsigned long startNdx ) const
     {
 // see header file for class documentation
@@ -462,7 +462,7 @@ unsigned long HOMERReader::FindBlockNdx( homer_uint64 type, homer_uint32 origin,
 /* Find the next data block in the current event with the given
    data type, origin, and specification. Returns the block's 
    index. */
-unsigned long HOMERReader::FindBlockNdx( char type[8], char origin[4], 
+unsigned long AliHLTHOMERReader::FindBlockNdx( char type[8], char origin[4], 
                                         homer_uint32 spec, unsigned long startNdx ) const
     {
 // see header file for class documentation
@@ -522,7 +522,7 @@ unsigned long HOMERReader::FindBlockNdx( char type[8], char origin[4],
 /* Return the ID of the node that actually produced this data block.
    This may be different from the node which sent the data to this
    monitoring object as returned by GetBlockSendNodeID. */
-const char* HOMERReader::GetBlockCreateNodeID( unsigned long ndx ) const
+const char* AliHLTHOMERReader::GetBlockCreateNodeID( unsigned long ndx ) const
     {
 // see header file for class documentation
     if ( ndx >= fBlockCnt )
@@ -531,7 +531,7 @@ const char* HOMERReader::GetBlockCreateNodeID( unsigned long ndx ) const
     }
 
 
-void HOMERReader::Init()
+void AliHLTHOMERReader::Init()
     {
 // see header file for class documentation
     fCurrentEventType = ~(homer_uint64)0;
@@ -549,7 +549,7 @@ void HOMERReader::Init()
     fEventRequestAdvanceTime = 0;
     }
        
-bool HOMERReader::AllocDataSources( unsigned int sourceCnt )
+bool AliHLTHOMERReader::AllocDataSources( unsigned int sourceCnt )
     {
 // see header file for class documentation
     fDataSources = new DataSource[ sourceCnt ];
@@ -560,7 +560,7 @@ bool HOMERReader::AllocDataSources( unsigned int sourceCnt )
     return true;
     }
 
-int HOMERReader::AddDataSource( const char* hostname, unsigned short port, DataSource& source )
+int AliHLTHOMERReader::AddDataSource( const char* hostname, unsigned short port, DataSource& source )
     {
 // see header file for class documentation
     struct hostent* he;
@@ -619,7 +619,7 @@ int HOMERReader::AddDataSource( const char* hostname, unsigned short port, DataS
     return 0;
     }
 
-int HOMERReader::AddDataSource( key_t shmKey, int shmSize, DataSource& source )
+int AliHLTHOMERReader::AddDataSource( key_t shmKey, int shmSize, DataSource& source )
     {
 // see header file for class documentation
     int ret;
@@ -658,7 +658,7 @@ int HOMERReader::AddDataSource( key_t shmKey, int shmSize, DataSource& source )
     return 0;
     }
 
-void HOMERReader::FreeDataSources()
+void AliHLTHOMERReader::FreeDataSources()
     {
 // see header file for class documentation
     for ( unsigned n=0; n < fDataSourceCnt; n++ )
@@ -670,7 +670,7 @@ void HOMERReader::FreeDataSources()
        }
     }
 
-int HOMERReader::FreeShmDataSource( DataSource& source )
+int AliHLTHOMERReader::FreeShmDataSource( DataSource& source )
     {
 // see header file for class documentation
     if ( source.fShmPtr )
@@ -682,7 +682,7 @@ int HOMERReader::FreeShmDataSource( DataSource& source )
     return 0;
     }
 
-int HOMERReader::FreeTCPDataSource( DataSource& source )
+int AliHLTHOMERReader::FreeTCPDataSource( DataSource& source )
     {
 // see header file for class documentation
     if ( source.fTCPConnection )
@@ -692,7 +692,7 @@ int HOMERReader::FreeTCPDataSource( DataSource& source )
     return 0;
     }
 
-int HOMERReader::ReadNextEvent( bool useTimeout, unsigned long timeout )
+int AliHLTHOMERReader::ReadNextEvent( bool useTimeout, unsigned long timeout )
     {
 // see header file for class documentation
     if ( fDataSourceCnt<=0 )
@@ -769,7 +769,7 @@ int HOMERReader::ReadNextEvent( bool useTimeout, unsigned long timeout )
     return 0;
     }
 
-void HOMERReader::ReleaseCurrentEvent()
+void AliHLTHOMERReader::ReleaseCurrentEvent()
     {
 // see header file for class documentation
     // sources.fDataRead = 0;
@@ -800,7 +800,7 @@ void HOMERReader::ReleaseCurrentEvent()
        }
     }
 
-int HOMERReader::TriggerTCPSource( DataSource& source, bool useTimeout, unsigned long timeoutUsec )
+int AliHLTHOMERReader::TriggerTCPSource( DataSource& source, bool useTimeout, unsigned long timeoutUsec )
     {
 // see header file for class documentation
     int ret;
@@ -862,9 +862,11 @@ int HOMERReader::TriggerTCPSource( DataSource& source, bool useTimeout, unsigned
     return 0;
     }
 
-int HOMERReader::TriggerShmSource( DataSource& source, bool, unsigned long )
+int AliHLTHOMERReader::TriggerShmSource( DataSource& source, bool, unsigned long )
     {
 // see header file for class documentation
+// clear the size indicator in the first 4 bytes of the buffer to request data
+// from the HOMER writer.
     if ( source.fShmPtr )
        {
        *(homer_uint32*)( source.fShmPtr ) = 0;
@@ -874,7 +876,7 @@ int HOMERReader::TriggerShmSource( DataSource& source, bool, unsigned long )
        return EFAULT;
     }
 
-int HOMERReader::ReadDataFromTCPSources( unsigned sourceCnt, DataSource* sources, bool useTimeout, unsigned long timeout )
+int AliHLTHOMERReader::ReadDataFromTCPSources( unsigned sourceCnt, DataSource* sources, bool useTimeout, unsigned long timeout )
     {
 // see header file for class documentation
     bool toRead = false;
@@ -986,7 +988,7 @@ int HOMERReader::ReadDataFromTCPSources( unsigned sourceCnt, DataSource* sources
     }
 
 /*
-int HOMERReader::ReadDataFromTCPSources( DataSource& source, bool useTimeout, unsigned long timeout )
+int AliHLTHOMERReader::ReadDataFromTCPSources( DataSource& source, bool useTimeout, unsigned long timeout )
     {
 #warning TODO If useTimeout: Set sockets to nonblocking, select + loop around GET_ONE write
     // Send one event request
@@ -1060,13 +1062,13 @@ int HOMERReader::ReadDataFromTCPSources( DataSource& source, bool useTimeout, un
 */
 
 /*
-int HOMERReader::ReadDataFromShmSource( DataSource& source, bool useTimeout, unsigned long timeout )
+int AliHLTHOMERReader::ReadDataFromShmSource( DataSource& source, bool useTimeout, unsigned long timeout )
     {
     
     }
 */
 
-int HOMERReader::ReadDataFromShmSources( unsigned sourceCnt, DataSource* sources, bool useTimeout, unsigned long timeout )
+int AliHLTHOMERReader::ReadDataFromShmSources( unsigned sourceCnt, DataSource* sources, bool useTimeout, unsigned long timeout )
     {
 // see header file for class documentation
     struct timeval tv1, tv2;
@@ -1108,7 +1110,7 @@ int HOMERReader::ReadDataFromShmSources( unsigned sourceCnt, DataSource* sources
     return 0;
     }
 
-int HOMERReader::ParseSourceData( DataSource& source )
+int AliHLTHOMERReader::ParseSourceData( DataSource& source )
     {
 // see header file for class documentation
     if ( source.fData )
@@ -1142,7 +1144,7 @@ int HOMERReader::ParseSourceData( DataSource& source )
     return EFAULT;
     }
        
-int HOMERReader::ReAllocBlocks( unsigned long newCnt )
+int AliHLTHOMERReader::ReAllocBlocks( unsigned long newCnt )
     {
 // see header file for class documentation
     DataBlock* newBlocks;
@@ -1160,21 +1162,21 @@ int HOMERReader::ReAllocBlocks( unsigned long newCnt )
     return 0;
     }
 
-homer_uint64 HOMERReader::GetSourceEventID( DataSource& source )
+homer_uint64 AliHLTHOMERReader::GetSourceEventID( DataSource& source )
     {
 // see header file for class documentation
     homer_uint8 sourceByteOrder = ((homer_uint8*)source.fData)[ kByteOrderAttribute_8b_Offset ];
     return Swap( kHOMERNativeByteOrder, sourceByteOrder, ((homer_uint64*)source.fData)[ kSubType1_64b_Offset ] );
     }
 
-homer_uint64 HOMERReader::GetSourceEventType( DataSource& source )
+homer_uint64 AliHLTHOMERReader::GetSourceEventType( DataSource& source )
     {
 // see header file for class documentation
     homer_uint8 sourceByteOrder = ((homer_uint8*)source.fData)[ kByteOrderAttribute_8b_Offset ];
     return Swap( kHOMERNativeByteOrder, sourceByteOrder, ((homer_uint64*)source.fData)[ kType_64b_Offset ] );
     }
 
-homer_uint64 HOMERReader::Swap( homer_uint8 destFormat, homer_uint8 sourceFormat, homer_uint64 source ) const
+homer_uint64 AliHLTHOMERReader::Swap( homer_uint8 destFormat, homer_uint8 sourceFormat, homer_uint64 source ) const
     {
 // see header file for class documentation
     if ( destFormat == sourceFormat )
@@ -1190,7 +1192,7 @@ homer_uint64 HOMERReader::Swap( homer_uint8 destFormat, homer_uint8 sourceFormat
        ((source & 0xFF00000000000000ULL) >> 56);
     }
 
-homer_uint32 HOMERReader::Swap( homer_uint8 destFormat, homer_uint8 sourceFormat, homer_uint32 source ) const
+homer_uint32 AliHLTHOMERReader::Swap( homer_uint8 destFormat, homer_uint8 sourceFormat, homer_uint32 source ) const
     {
 // see header file for class documentation
     if ( destFormat == sourceFormat )
@@ -1201,6 +1203,20 @@ homer_uint32 HOMERReader::Swap( homer_uint8 destFormat, homer_uint8 sourceFormat
        ((source & 0xFF0000UL) >> 8) | 
        ((source & 0xFF000000UL) >> 24);
     }
+
+AliHLTHOMERReader* AliHLTHOMERReaderCreate(const void* pBuffer, int size)
+    {
+// see header file for function documentation
+      //return new AliHLTHOMERReader(pBuffer, size);
+      return NULL;
+    }
+
+void AliHLTHOMERReaderDelete(AliHLTHOMERReader* pInstance)
+    {
+// see header file for function documentation
+      if (pInstance) delete pInstance;
+    }
+
 /*
 ***************************************************************************
 **
index 596337583432cd4640d28e9807b2387130c760c4..59978de7c4d80b38ee9fd725079f9dd02bd12bbc 100644 (file)
 
 
 
-class MonitoringReader
+class AliHLTMonitoringReader
     {
     public:
 
-       MonitoringReader() {};
-       virtual ~MonitoringReader() {};
+       AliHLTMonitoringReader() {};
+       virtual ~AliHLTMonitoringReader() {};
        
        /* Read in the next available event */
        virtual int ReadNextEvent() = 0;
@@ -79,32 +79,32 @@ class MonitoringReader
        virtual homer_uint64 GetBlockStatusFlags( unsigned long ndx ) const = 0;
 
 #ifdef USE_ROOT
-        ClassDef(MonitoringReader,1);
+        ClassDef(AliHLTMonitoringReader,1);
 #endif
     };
 
 
 
-class HOMERReader: public MonitoringReader
+class AliHLTHOMERReader: public AliHLTMonitoringReader
     {
     public:
 #ifdef USE_ROOT
-       HOMERReader();
+       AliHLTHOMERReader();
 #endif
 
        /* Constructors & destructors, HOMER specific */
        /* For reading from a TCP port */
-       HOMERReader( const char* hostname, unsigned short port );
+       AliHLTHOMERReader( const char* hostname, unsigned short port );
        /* For reading from multiple TCP ports */
-       HOMERReader( unsigned int tcpCnt, const char** hostnames, unsigned short* ports );
+       AliHLTHOMERReader( unsigned int tcpCnt, const char** hostnames, unsigned short* ports );
        /* For reading from a System V shared memory segment */
-       HOMERReader( key_t shmKey, int shmSize );
+       AliHLTHOMERReader( key_t shmKey, int shmSize );
        /* For reading from multiple System V shared memory segments */
-       HOMERReader( unsigned int shmCnt, key_t* shmKey, int* shmSize );
+       AliHLTHOMERReader( unsigned int shmCnt, key_t* shmKey, int* shmSize );
        /* For reading from multiple TCP ports and multiple System V shared memory segments */
-       HOMERReader( unsigned int tcpCnt, const char** hostnames, unsigned short* ports, 
+       AliHLTHOMERReader( unsigned int tcpCnt, const char** hostnames, unsigned short* ports, 
                     unsigned int shmCnt, key_t* shmKey, int* shmSize );
-       virtual ~HOMERReader();
+       virtual ~AliHLTHOMERReader();
 
        /* Return the status of the connection as established by one of the constructors.
           0 means connection is ok, non-zero specifies the type of error that occured. */
@@ -126,7 +126,7 @@ class HOMERReader: public MonitoringReader
                fEventRequestAdvanceTime = time;
                }
 
-       /* Defined in MonitoringReader */
+       /* Defined in AliHLTMonitoringReader */
        /* Read in the next available event */
        virtual int  ReadNextEvent();
        /* Read in the next available event */
@@ -295,13 +295,41 @@ class HOMERReader: public MonitoringReader
        unsigned long fEventRequestAdvanceTime;                     //!transient
     private:
        /** copy constructor prohibited */
-       HOMERReader(const HOMERReader&);
+       AliHLTHOMERReader(const AliHLTHOMERReader&);
        /** assignment operator prohibited */
-       HOMERReader& operator=(const HOMERReader&);
+       AliHLTHOMERReader& operator=(const AliHLTHOMERReader&);
        
 #ifdef USE_ROOT
-        ClassDef(HOMERReader,2);
+        ClassDef(AliHLTHOMERReader,2);
 #endif
     };
 
+/** defined for backward compatibility */
+typedef AliHLTMonitoringReader MonitoringReader;
+/** defined for backward compatibility */
+typedef AliHLTHOMERReader HOMERReader;
+
+// external interface of the HOMER reader
+#define ALIHLTHOMERREADER_CREATE_FROM_BUFFER "AliHLTHOMERReaderCreateFromBuffer"
+#define ALIHLTHOMERREADER_DELETE "AliHLTHOMERReaderDelete"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+  typedef AliHLTHOMERReader* (*AliHLTHOMERReaderCreateFromBuffer_t)(const void* pBuffer, int size);
+  typedef void (*AliHLTHOMERReaderDelete_t)(AliHLTHOMERReader* pInstance);
+  /**
+   * Create instance of HOMER reader.
+   */
+  AliHLTHOMERReader* AliHLTHOMERReaderCreateFromBuffer();
+
+  /**
+   * Delete instance of HOMER reader.
+   */
+  void AliHLTHOMERReaderDelete(AliHLTHOMERReader* pInstance);
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* AliHLTHOMERREADER_H */
index b279f02a530dcdfd3aadf458a6228d861ffabb61..c94005a94397c32d4b06c9efbc581eacdac64f9d 100644 (file)
@@ -47,7 +47,7 @@
 #include <time.h>
 
 
-HOMERWriter::HOMERWriter()
+AliHLTHOMERWriter::AliHLTHOMERWriter()
   :
   fDataOffset(0),
   fBlocks()
@@ -60,19 +60,19 @@ HOMERWriter::HOMERWriter()
     Clear();
     }
 
-HOMERWriter::~HOMERWriter()
+AliHLTHOMERWriter::~AliHLTHOMERWriter()
     {
 // see header file for class documentation
     }
 
-void HOMERWriter::Clear()
+void AliHLTHOMERWriter::Clear()
     {
 // see header file for class documentation
     fDataOffset = 0;
     fBlocks.clear();
     }
 
-void HOMERWriter::AddBlock( const void* descriptor, const void* data )
+void AliHLTHOMERWriter::AddBlock( const void* descriptor, const void* data )
     {
 // see header file for class documentation
     TBlockData bd;
@@ -84,7 +84,7 @@ void HOMERWriter::AddBlock( const void* descriptor, const void* data )
     fBlocks.push_back( bd );
     }
 
-homer_uint32 HOMERWriter::GetTotalMemorySize( bool includeData )
+homer_uint32 AliHLTHOMERWriter::GetTotalMemorySize( bool includeData )
     {
 // see header file for class documentation
     if ( includeData )
@@ -93,7 +93,7 @@ homer_uint32 HOMERWriter::GetTotalMemorySize( bool includeData )
        return HOMERBlockDescriptor::GetHOMERBlockDescriptorSize()*(fBlocks.size()+1);
     }
 
-void HOMERWriter::Copy( void* destination, homer_uint64 eventType, homer_uint64 eventNr, homer_uint64 statusFlags, homer_uint64 nodeID, bool includeData )
+void AliHLTHOMERWriter::Copy( void* destination, homer_uint64 eventType, homer_uint64 eventNr, homer_uint64 statusFlags, homer_uint64 nodeID, bool includeData )
     {
 // see header file for class documentation
     HOMERBlockDescriptor homerBlock;
@@ -102,12 +102,12 @@ void HOMERWriter::Copy( void* destination, homer_uint64 eventType, homer_uint64
     gettimeofday( &now, NULL );
     homerBlock.UseHeader( bd );
     homerBlock.Initialize();
-    homerBlock.SetUInt64Alignment( HOMERWriter::DetermineUInt64Alignment() );
-    homerBlock.SetUInt32Alignment( HOMERWriter::DetermineUInt32Alignment() );
-    homerBlock.SetUInt16Alignment( HOMERWriter::DetermineUInt16Alignment() );
-    homerBlock.SetUInt8Alignment( HOMERWriter::DetermineUInt8Alignment() );
-    homerBlock.SetDoubleAlignment( HOMERWriter::DetermineDoubleAlignment() );
-    homerBlock.SetFloatAlignment( HOMERWriter::DetermineFloatAlignment() );
+    homerBlock.SetUInt64Alignment( AliHLTHOMERWriter::DetermineUInt64Alignment() );
+    homerBlock.SetUInt32Alignment( AliHLTHOMERWriter::DetermineUInt32Alignment() );
+    homerBlock.SetUInt16Alignment( AliHLTHOMERWriter::DetermineUInt16Alignment() );
+    homerBlock.SetUInt8Alignment( AliHLTHOMERWriter::DetermineUInt8Alignment() );
+    homerBlock.SetDoubleAlignment( AliHLTHOMERWriter::DetermineDoubleAlignment() );
+    homerBlock.SetFloatAlignment( AliHLTHOMERWriter::DetermineFloatAlignment() );
     homerBlock.SetType( eventType );
     homerBlock.SetSubType1( eventNr );
     homerBlock.SetSubType2( fBlocks.size() );
@@ -138,7 +138,7 @@ void HOMERWriter::Copy( void* destination, homer_uint64 eventType, homer_uint64
        }
     }
 
-homer_uint8 HOMERWriter::DetermineUInt64Alignment()
+homer_uint8 AliHLTHOMERWriter::DetermineUInt64Alignment()
     {
 // see header file for class documentation
     HOMERWriterAlignment64TestStructure test;
@@ -168,7 +168,7 @@ homer_uint8 HOMERWriter::DetermineUInt64Alignment()
     return 1;
     }
 
-homer_uint8 HOMERWriter::DetermineUInt32Alignment()
+homer_uint8 AliHLTHOMERWriter::DetermineUInt32Alignment()
     {
 // see header file for class documentation
     HOMERWriterAlignment32TestStructure test;
@@ -198,7 +198,7 @@ homer_uint8 HOMERWriter::DetermineUInt32Alignment()
     return 1;
     }
 
-homer_uint8 HOMERWriter::DetermineUInt16Alignment()
+homer_uint8 AliHLTHOMERWriter::DetermineUInt16Alignment()
     {
 // see header file for class documentation
     HOMERWriterAlignment16TestStructure test;
@@ -228,7 +228,7 @@ homer_uint8 HOMERWriter::DetermineUInt16Alignment()
     return 1;
     }
 
-homer_uint8 HOMERWriter::DetermineUInt8Alignment()
+homer_uint8 AliHLTHOMERWriter::DetermineUInt8Alignment()
     {
 // see header file for class documentation
     HOMERWriterAlignment8TestStructure test;
@@ -258,7 +258,7 @@ homer_uint8 HOMERWriter::DetermineUInt8Alignment()
     return 1;
     }
 
-homer_uint8 HOMERWriter::DetermineDoubleAlignment()
+homer_uint8 AliHLTHOMERWriter::DetermineDoubleAlignment()
     {
 // see header file for class documentation
     HOMERWriterAlignmentDoubleTestStructure test;
@@ -288,7 +288,7 @@ homer_uint8 HOMERWriter::DetermineDoubleAlignment()
     return 1;
     }
 
-homer_uint8 HOMERWriter::DetermineFloatAlignment()
+homer_uint8 AliHLTHOMERWriter::DetermineFloatAlignment()
     {
 // see header file for class documentation
     HOMERWriterAlignmentFloatTestStructure test;
@@ -318,6 +318,17 @@ homer_uint8 HOMERWriter::DetermineFloatAlignment()
     return 1;
     }
 
+AliHLTHOMERWriter* AliHLTHOMERWriterCreate()
+    {
+// see header file for function documentation
+      return new AliHLTHOMERWriter();
+    }
+
+void AliHLTHOMERWriterDelete(AliHLTHOMERWriter* pInstance)
+    {
+// see header file for function documentation
+      if (pInstance) delete pInstance;
+    }
 
 
 /*
index 0554483489b5598e693d30b7b5aee3e18ea49d62..2fb72e8e29cae8203be5b3fa2270f251dc339043 100644 (file)
 
 
 
-class HOMERWriter
+class AliHLTHOMERWriter
     {
     public:
 
-       HOMERWriter();
-       virtual ~HOMERWriter();
+       AliHLTHOMERWriter();
+       virtual ~AliHLTHOMERWriter();
 
        void Clear();
 
@@ -157,11 +157,36 @@ class HOMERWriter
 
         std::vector<TBlockData> fBlocks; //!transient
 #ifdef USE_ROOT
-      ClassDef(HOMERWriter,0);
+      ClassDef(AliHLTHOMERWriter,0);
 #endif
     };
 
 
+/** defined for backward compatibility */
+typedef AliHLTHOMERWriter HOMERWriter;
+
+// external interface of the HOMER writer
+#define ALIHLTHOMERWRITER_CREATE "AliHLTHOMERWriterCreate"
+#define ALIHLTHOMERWRITER_DELETE "AliHLTHOMERWriterDelete"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+  typedef AliHLTHOMERWriter* (*AliHLTHOMERWriterCreate_t)(const void* pBuffer, int size);
+  typedef void (*AliHLTHOMERWriterDelete_t)(AliHLTHOMERWriter* pInstance);
+  /**
+   * Create instance of HOMER writer.
+   */
+  AliHLTHOMERWriter* AliHLTHOMERWriterCreate();
+
+  /**
+   * Delete instance of HOMER writer.
+   */
+  void AliHLTHOMERWriterDelete(AliHLTHOMERWriter* pInstance);
+#ifdef __cplusplus
+}
+#endif