]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/BASE/AliHLTOUTHomerBuffer.h
various fixes in the HLTOUT treatment
[u/mrichter/AliRoot.git] / HLT / BASE / AliHLTOUTHomerBuffer.h
1 //-*- Mode: C++ -*-
2 // @(#) $Id$
3
4 #ifndef ALIHLTOUTHOMERBUFFER_H
5 #define ALIHLTOUTHOMERBUFFER_H
6 /* This file is property of and copyright by the ALICE HLT Project        * 
7  * ALICE Experiment at CERN, All rights reserved.                         *
8  * See cxx source for full Copyright notice                               */
9
10 /** @file   AliHLTOUTHomerBuffer.h
11     @author Matthias Richter
12     @date   
13     @brief  HLTOUT data wrapper for a data buffer.
14
15 // see below for class documentation
16 // or
17 // refer to README to build package
18 // or
19 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
20                                                                           */
21 #include "AliHLTOUT.h"
22
23 class AliHLTHOMERReader;
24 class AliHLTMonitoringReader;
25 class AliHLTHOMERLibManager;
26
27 /**
28  * @class AliHLTOUTHomerBuffer
29  * Handler of HLTOUT data for buffer input.
30  */
31 class AliHLTOUTHomerBuffer : public AliHLTOUT {
32  public:
33   /** constructor */
34   AliHLTOUTHomerBuffer(const AliHLTUInt8_t* pBuffer, int size);
35   /** destructor */
36   virtual ~AliHLTOUTHomerBuffer();
37
38  protected:
39   /**
40    * Step trough data blocks of a HOMER reader and generate index.
41    */
42   int ScanReader(AliHLTMonitoringReader* pReader, AliHLTUInt32_t majorIndex=0);
43
44   /** dynamic loader manager for HOMER library */
45   AliHLTHOMERLibManager* fpManager; //!transient
46
47  private:
48   /** standard constructor prohibited */
49   AliHLTOUTHomerBuffer();
50   /** copy constructor prohibited */
51   AliHLTOUTHomerBuffer(const AliHLTOUTHomerBuffer&);
52   /** assignment operator prohibited */
53   AliHLTOUTHomerBuffer& operator=(const AliHLTOUTHomerBuffer&);
54
55   /**
56    * Generate the index of the HLTOUT data from the data buffer.
57    */
58   virtual int GenerateIndex();
59
60   /**
61    * Get the data buffer
62    * @param index   [in]  index of the block
63    * @param pBuffer [out] buffer of the selected data block
64    * @param size    [out] size of the selected data block
65    */
66   virtual int GetDataBuffer(AliHLTUInt32_t index, const AliHLTUInt8_t* &pBuffer, 
67                             AliHLTUInt32_t& size);
68
69   /**
70    * Check byte order of data block
71    */
72   virtual AliHLTOUTByteOrder_t CheckBlockByteOrder(AliHLTUInt32_t index);
73
74   /**
75    * Check alignment of data block
76    */
77   virtual int CheckBlockAlignment(AliHLTUInt32_t index, AliHLTOUT::AliHLTOUTDataType_t type);
78
79   /** data buffer */
80   const AliHLTUInt8_t* fpBuffer; //! transient
81
82   /** size of data buffer */
83   int fSize; //! transient
84
85   /** instance of the HOMER reader */
86   AliHLTHOMERReader* fpReader;  //!transient
87
88   ClassDef(AliHLTOUTHomerBuffer, 0)
89 };
90 #endif