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 *
10 /** @file AliHLTOUTHomerBuffer.h
11 @author Matthias Richter
13 @brief HLTOUT data wrapper for a data buffer.
16 #include "AliHLTOUT.h"
17 #include "AliHLTLogging.h"
19 class AliHLTHOMERReader;
20 class AliHLTMonitoringReader;
21 class AliHLTHOMERLibManager;
24 * @class AliHLTOUTHomerBuffer
25 * Handler of HLTOUT data for buffer input.
27 * The class supports the AliHLTOUT interface in order to access the
28 * individual data blocks of a HOMER data collection. An AliHOMERReader
29 * is created to interpret the data. The class can serve as base for
30 * other HLTOUT implementations supporting different kinds of input like
31 * the AliHLTOUTHomerCollection and its childs AliHLTOUTRawReader and
32 * AliHLTOUTDigitReader.
34 * @note The buffer is expected to contain the HOMER data block only, no
35 * CDH and HLT headers.
37 class AliHLTOUTHomerBuffer : public AliHLTOUT, public AliHLTLogging {
40 AliHLTOUTHomerBuffer(const AliHLTUInt8_t* pBuffer, int size);
42 virtual ~AliHLTOUTHomerBuffer();
46 * Step trough data blocks of a HOMER reader and generate index.
48 int ScanReader(AliHLTMonitoringReader* pReader, AliHLTUInt32_t majorIndex=0);
50 /** dynamic loader manager for HOMER library */
51 AliHLTHOMERLibManager* fpManager; //!transient
54 /** standard constructor prohibited */
55 AliHLTOUTHomerBuffer();
56 /** copy constructor prohibited */
57 AliHLTOUTHomerBuffer(const AliHLTOUTHomerBuffer&);
58 /** assignment operator prohibited */
59 AliHLTOUTHomerBuffer& operator=(const AliHLTOUTHomerBuffer&);
62 * Generate the index of the HLTOUT data from the data buffer.
64 virtual int GenerateIndex();
68 * @param [in] index index of the block
69 * @param [out] pBuffer buffer of the selected data block
70 * @param [out] size size of the selected data block
72 virtual int GetDataBuffer(AliHLTUInt32_t index, const AliHLTUInt8_t* &pBuffer,
73 AliHLTUInt32_t& size);
76 * Check byte order of data block
78 virtual AliHLTOUTByteOrder CheckBlockByteOrder(AliHLTUInt32_t index);
81 * Check alignment of data block
83 virtual int CheckBlockAlignment(AliHLTUInt32_t index, AliHLTOUT::AliHLTOUTDataType type);
86 const AliHLTUInt8_t* fpBuffer; //! transient
88 /** size of data buffer */
89 int fSize; //! transient
91 /** instance of the HOMER reader */
92 AliHLTHOMERReader* fpReader; //!transient
94 ClassDef(AliHLTOUTHomerBuffer, 0)