]>
Commit | Line | Data |
---|---|---|
4de7334f | 1 | //-*- Mode: C++ -*- |
2 | // @(#) $Id$ | |
3 | ||
4 | #ifndef ALIHLTOUTHOMERBUFFER_H | |
5 | #define ALIHLTOUTHOMERBUFFER_H | |
b005ef92 | 6 | //* This file is property of and copyright by the ALICE HLT Project * |
7 | //* ALICE Experiment at CERN, All rights reserved. * | |
d4a18597 | 8 | //* See cxx source for full Copyright notice * |
4de7334f | 9 | |
10 | /** @file AliHLTOUTHomerBuffer.h | |
11 | @author Matthias Richter | |
12 | @date | |
13 | @brief HLTOUT data wrapper for a data buffer. | |
b005ef92 | 14 | */ |
4de7334f | 15 | |
4de7334f | 16 | #include "AliHLTOUT.h" |
b005ef92 | 17 | #include "AliHLTLogging.h" |
4de7334f | 18 | |
049b43b2 | 19 | class AliHLTHOMERReader; |
a183f221 | 20 | class AliHLTMonitoringReader; |
049b43b2 | 21 | class AliHLTHOMERLibManager; |
4de7334f | 22 | |
23 | /** | |
24 | * @class AliHLTOUTHomerBuffer | |
25 | * Handler of HLTOUT data for buffer input. | |
d4a18597 | 26 | * |
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. | |
33 | * | |
34 | * @note The buffer is expected to contain the HOMER data block only, no | |
35 | * CDH and HLT headers. | |
4de7334f | 36 | */ |
b005ef92 | 37 | class AliHLTOUTHomerBuffer : public AliHLTOUT, public AliHLTLogging { |
4de7334f | 38 | public: |
39 | /** constructor */ | |
049b43b2 | 40 | AliHLTOUTHomerBuffer(const AliHLTUInt8_t* pBuffer, int size); |
4de7334f | 41 | /** destructor */ |
42 | virtual ~AliHLTOUTHomerBuffer(); | |
43 | ||
44 | protected: | |
049b43b2 | 45 | /** |
46 | * Step trough data blocks of a HOMER reader and generate index. | |
47 | */ | |
a183f221 | 48 | int ScanReader(AliHLTMonitoringReader* pReader, AliHLTUInt32_t majorIndex=0); |
049b43b2 | 49 | |
50 | /** dynamic loader manager for HOMER library */ | |
51 | AliHLTHOMERLibManager* fpManager; //!transient | |
4de7334f | 52 | |
53 | private: | |
54 | /** standard constructor prohibited */ | |
55 | AliHLTOUTHomerBuffer(); | |
56 | /** copy constructor prohibited */ | |
57 | AliHLTOUTHomerBuffer(const AliHLTOUTHomerBuffer&); | |
58 | /** assignment operator prohibited */ | |
59 | AliHLTOUTHomerBuffer& operator=(const AliHLTOUTHomerBuffer&); | |
60 | ||
61 | /** | |
62 | * Generate the index of the HLTOUT data from the data buffer. | |
63 | */ | |
64 | virtual int GenerateIndex(); | |
65 | ||
66 | /** | |
67 | * Get the data buffer | |
68 | * @param index [in] index of the block | |
69 | * @param pBuffer [out] buffer of the selected data block | |
70 | * @param size [out] size of the selected data block | |
71 | */ | |
72 | virtual int GetDataBuffer(AliHLTUInt32_t index, const AliHLTUInt8_t* &pBuffer, | |
73 | AliHLTUInt32_t& size); | |
74 | ||
049b43b2 | 75 | /** |
76 | * Check byte order of data block | |
77 | */ | |
13398559 | 78 | virtual AliHLTOUTByteOrder CheckBlockByteOrder(AliHLTUInt32_t index); |
049b43b2 | 79 | |
80 | /** | |
81 | * Check alignment of data block | |
82 | */ | |
13398559 | 83 | virtual int CheckBlockAlignment(AliHLTUInt32_t index, AliHLTOUT::AliHLTOUTDataType type); |
049b43b2 | 84 | |
4de7334f | 85 | /** data buffer */ |
86 | const AliHLTUInt8_t* fpBuffer; //! transient | |
87 | ||
049b43b2 | 88 | /** size of data buffer */ |
89 | int fSize; //! transient | |
90 | ||
4de7334f | 91 | /** instance of the HOMER reader */ |
049b43b2 | 92 | AliHLTHOMERReader* fpReader; //!transient |
4de7334f | 93 | |
94 | ClassDef(AliHLTOUTHomerBuffer, 0) | |
95 | }; | |
96 | #endif |