]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/BASE/AliHLTOUTHomerBuffer.h
- singleton functionality added for component and configuration handler
[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
16 #include "AliHLTOUT.h"
17 #include "AliHLTLogging.h"
18
19 class AliHLTHOMERReader;
20 class AliHLTMonitoringReader;
21 class AliHLTHOMERLibManager;
22
23 /**
24  * @class AliHLTOUTHomerBuffer
25  * Handler of HLTOUT data for buffer input.
26  */
27 class AliHLTOUTHomerBuffer : public AliHLTOUT, public AliHLTLogging {
28  public:
29   /** constructor */
30   AliHLTOUTHomerBuffer(const AliHLTUInt8_t* pBuffer, int size);
31   /** destructor */
32   virtual ~AliHLTOUTHomerBuffer();
33
34  protected:
35   /**
36    * Step trough data blocks of a HOMER reader and generate index.
37    */
38   int ScanReader(AliHLTMonitoringReader* pReader, AliHLTUInt32_t majorIndex=0);
39
40   /** dynamic loader manager for HOMER library */
41   AliHLTHOMERLibManager* fpManager; //!transient
42
43  private:
44   /** standard constructor prohibited */
45   AliHLTOUTHomerBuffer();
46   /** copy constructor prohibited */
47   AliHLTOUTHomerBuffer(const AliHLTOUTHomerBuffer&);
48   /** assignment operator prohibited */
49   AliHLTOUTHomerBuffer& operator=(const AliHLTOUTHomerBuffer&);
50
51   /**
52    * Generate the index of the HLTOUT data from the data buffer.
53    */
54   virtual int GenerateIndex();
55
56   /**
57    * Get the data buffer
58    * @param index   [in]  index of the block
59    * @param pBuffer [out] buffer of the selected data block
60    * @param size    [out] size of the selected data block
61    */
62   virtual int GetDataBuffer(AliHLTUInt32_t index, const AliHLTUInt8_t* &pBuffer, 
63                             AliHLTUInt32_t& size);
64
65   /**
66    * Check byte order of data block
67    */
68   virtual AliHLTOUTByteOrder CheckBlockByteOrder(AliHLTUInt32_t index);
69
70   /**
71    * Check alignment of data block
72    */
73   virtual int CheckBlockAlignment(AliHLTUInt32_t index, AliHLTOUT::AliHLTOUTDataType type);
74
75   /** data buffer */
76   const AliHLTUInt8_t* fpBuffer; //! transient
77
78   /** size of data buffer */
79   int fSize; //! transient
80
81   /** instance of the HOMER reader */
82   AliHLTHOMERReader* fpReader;  //!transient
83
84   ClassDef(AliHLTOUTHomerBuffer, 0)
85 };
86 #endif