]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/BASE/AliHLTDataInflaterSimple.h
bug fix: call AliVVevent() in AliESDevent constructor
[u/mrichter/AliRoot.git] / HLT / BASE / AliHLTDataInflaterSimple.h
CommitLineData
9409b4b1 1//-*- Mode: C++ -*-
2// $Id$
3#ifndef ALIHLTDATAINFLATERSIMPLE_H
4#define ALIHLTDATAINFLATERSIMPLE_H
5//* This file is property of and copyright by the ALICE HLT Project *
6//* ALICE Experiment at CERN, All rights reserved. *
7//* See cxx source for full Copyright notice *
8
9/// @file AliHLTDataInflaterSimple.h
10/// @author Matthias Richter
11/// @date 2011-09-01
12/// @brief Data inflater implementation for format of AliHLTDataDeflaterSimple
13/// @note
14
15#include "AliHLTDataInflater.h"
16#include "AliHLTDataDeflaterSimple.h"
17
18class AliHLTDataInflaterSimple : public AliHLTDataInflater
19{
20public:
21 /// standard constructor
22 AliHLTDataInflaterSimple();
23 /// destructor
24 ~AliHLTDataInflaterSimple();
25
26 /// add a parameter definition to the configuration, return reference id
27 int AddParameterDefinition(const char* name, int bitLength, int reducedBitLength);
28
29 /// overloaded from AliHLTDataInflater
30 virtual bool NextValue(AliHLTUInt64_t& value, AliHLTUInt32_t& length);
70d61ae2 31 /// switch to next parameter
32 virtual int NextParameter() {
33 if (fParameterDefinitions.size()==0) return -1;
34 if (fLegacyMode>0) return fCurrentParameter;
35 fLegacyMode=0;
36 if ((++fCurrentParameter)>=(int)fParameterDefinitions.size()) fCurrentParameter=0;
37 return fCurrentParameter;
38 }
9409b4b1 39
40protected:
41private:
42 /** copy constructor prohibited */
43 AliHLTDataInflaterSimple(const AliHLTDataInflaterSimple&);
44 /** assignment operator prohibited */
45 AliHLTDataInflaterSimple& operator=(const AliHLTDataInflaterSimple&);
46
47 /// parameter definitions
48 vector<AliHLTDataDeflaterSimple::AliHLTDataDeflaterParameter> fParameterDefinitions; //!
49
50 /// current parameter during reading
51 int fCurrentParameter; //!
70d61ae2 52 /// legacy mode to handle code not using NextParameter()
53 int fLegacyMode;
9409b4b1 54
55 ClassDef(AliHLTDataInflaterSimple, 0)
56};
57
58#endif //ALIHLTDATAINFLATERSIMPLE_H