]>
Commit | Line | Data |
---|---|---|
176d8684 | 1 | //-*- Mode: C++ -*- |
2 | // @(#) $Id$ | |
3 | ||
4 | #ifndef ALIHLTOUTRAWREADER_H | |
5 | #define ALIHLTOUTRAWREADER_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 AliHLTOUTRawReader.h | |
11 | @author Matthias Richter | |
12 | @date | |
13 | @brief HLTOUT data wrapper for AliRawReader. | |
64defa03 | 14 | */ |
176d8684 | 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 | |
64defa03 | 20 | |
176d8684 | 21 | #include "AliHLTOUTHomerBuffer.h" |
22 | ||
23 | class AliRawReader; | |
24 | class AliHLTHOMERReader; | |
25 | ||
26 | /** | |
27 | * @class AliHLTOUTRawReader | |
28 | * Handler of HLTOUT data for AliRawReader input. | |
29 | */ | |
30 | class AliHLTOUTRawReader : public AliHLTOUTHomerBuffer { | |
31 | public: | |
32 | /** constructor */ | |
33 | AliHLTOUTRawReader(AliRawReader* pRawReader); | |
34 | /** destructor */ | |
35 | virtual ~AliHLTOUTRawReader(); | |
36 | ||
37 | protected: | |
38 | ||
39 | private: | |
40 | /** standard constructor prohibited */ | |
41 | AliHLTOUTRawReader(); | |
42 | /** copy constructor prohibited */ | |
43 | AliHLTOUTRawReader(const AliHLTOUTRawReader&); | |
44 | /** assignment operator prohibited */ | |
45 | AliHLTOUTRawReader& operator=(const AliHLTOUTRawReader&); | |
46 | ||
47 | /** | |
48 | * Generate the index of the HLTOUT data from the data buffer. | |
49 | */ | |
50 | int GenerateIndex(); | |
51 | ||
52 | /** | |
53 | * Get the data buffer | |
54 | * @param index [in] index of the block | |
55 | * @param pBuffer [out] buffer of the selected data block | |
56 | * @param size [out] size of the selected data block | |
57 | */ | |
58 | int GetDataBuffer(AliHLTUInt32_t index, const AliHLTUInt8_t* &pBuffer, | |
59 | AliHLTUInt32_t& size); | |
60 | ||
44dc7683 | 61 | /** |
62 | * Open HOMER reader for the data buffer. | |
63 | * The function expects the data buffer including all headers (CDH | |
64 | * and HLTOUT header). The offset for the HLT payload is determined from | |
65 | * the headers and the optional HLT decision data. | |
66 | * @param pSrc data buffer | |
67 | * @param size size of the buffer in byte | |
68 | * @return instance of HOMER reader | |
69 | */ | |
70 | AliHLTHOMERReader* OpenReader(UChar_t* pSrc, unsigned int size); | |
71 | ||
176d8684 | 72 | /** the rawreader */ |
73 | AliRawReader* fpRawreader; //!transient | |
74 | ||
75 | /** current instance of the HOMER reader */ | |
76 | AliHLTHOMERReader* fpCurrent; //!transient | |
77 | ||
78 | /** DDL id offset shift for index | |
79 | * bit 16-31: DDL id, bit 0-15 block no | |
80 | */ | |
81 | static const int fgkIdShift; //!transient | |
82 | ||
83 | ClassDef(AliHLTOUTRawReader, 0) | |
84 | }; | |
85 | #endif |