]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/BASE/AliHLTOUTHomerBuffer.cxx
enhanced HOMER reader to work on normal buffer
[u/mrichter/AliRoot.git] / HLT / BASE / AliHLTOUTHomerBuffer.cxx
CommitLineData
4de7334f 1// $Id$
2
3/**************************************************************************
4 * This file is property of and copyright by the ALICE HLT Project *
5 * ALICE Experiment at CERN, All rights reserved. *
6 * *
7 * Primary Authors: Matthias Richter <Matthias.Richter@ift.uib.no> *
8 * for The ALICE HLT Project. *
9 * *
10 * Permission to use, copy, modify and distribute this software and its *
11 * documentation strictly for non-commercial purposes is hereby granted *
12 * without fee, provided that the above copyright notice appears in all *
13 * copies and that both the copyright notice and this permission notice *
14 * appear in the supporting documentation. The authors make no claims *
15 * about the suitability of this software for any purpose. It is *
16 * provided "as is" without express or implied warranty. *
17 **************************************************************************/
18
19/** @file AliHLTOUTHomerBuffer.cxx
20 @author Matthias Richter
21 @date
22 @brief HLTOUT data wrapper for AliRawReader. */
23
24// see header file for class documentation
25// or
26// refer to README to build package
27// or
28// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
29
30#include <cerrno>
31#include "AliHLTOUTHomerBuffer.h"
32#include "AliHLTHOMERReader.h"
33
34/** ROOT macro for the implementation of ROOT specific class methods */
35ClassImp(AliHLTOUTHomerBuffer)
36
37AliHLTOUTHomerBuffer::AliHLTOUTHomerBuffer(const AliHLTUInt8_t* pBuffer)
38 :
39 AliHLTOUT(),
40 fpBuffer(pBuffer),
41 fpReader(NULL)
42{
43 // see header file for class documentation
44 // or
45 // refer to README to build package
46 // or
47 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
48}
49
50AliHLTOUTHomerBuffer::~AliHLTOUTHomerBuffer()
51{
52 // see header file for class documentation
53}
54
55int AliHLTOUTHomerBuffer::GenerateIndex()
56{
57 // see header file for class documentation
58 int iResult=0;
59 return iResult;
60}
61
62int AliHLTOUTHomerBuffer::GetDataBuffer(AliHLTUInt32_t index, const AliHLTUInt8_t* &pBuffer,
63 AliHLTUInt32_t& size)
64{
65 // see header file for class documentation
66 int iResult=0;
67 if (fpReader) {
68 if ((pBuffer=static_cast<const AliHLTUInt8_t*>(fpReader->GetBlockData(index)))!=NULL) {
69 size=fpReader->GetBlockDataLength(index);
70 } else {
71 iResult=-ENOENT;
72 }
73 } else {
74 iResult=-ENODEV;
75 }
76 return iResult;
77}