3 #ifndef ALIHLTDATAINFLATERHUFFMAN_H
4 #define ALIHLTDATAINFLATERHUFFMAN_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 *
9 /// @file AliHLTDataInflaterHuffman.h
10 /// @author Matthias Richter
12 /// @brief Data inflater implementation for huffman encoded data
15 #include "AliHLTDataInflater.h"
20 class AliHLTDataInflaterHuffman : public AliHLTDataInflater
23 /// standard constructor
24 AliHLTDataInflaterHuffman();
26 ~AliHLTDataInflaterHuffman();
28 /// add a parameter definition to the configuration, return reference id
29 int AddParameterDefinition(const char* name, unsigned bitLength);
31 /// init list of decoders
32 int InitDecoders(TList* decoderlist);
34 /// overloaded from AliHLTDataInflater
35 virtual bool NextValue(AliHLTUInt64_t& value, AliHLTUInt32_t& length);
36 /// switch to next parameter
37 virtual int NextParameter() {
38 if (fHuffmanCoders.size()==0) return -1;
39 if (fLegacyMode>0) return fCurrentParameter;
41 if ((++fCurrentParameter)>=(int)fHuffmanCoders.size()) fCurrentParameter=0;
42 return fCurrentParameter;
46 void Print(Option_t* option = "") const;
47 /// clear the object and reset pointer references
48 virtual void Clear(Option_t * option ="");
52 /** copy constructor prohibited */
53 AliHLTDataInflaterHuffman(const AliHLTDataInflaterHuffman&);
54 /** assignment operator prohibited */
55 AliHLTDataInflaterHuffman& operator=(const AliHLTDataInflaterHuffman&);
57 /// index of the decoders in the decoder list
58 vector<AliHLTHuffman*> fHuffmanCoders; //! index of decoders
60 /// list of huffman coders identified by parameter name
61 TList* fHuffmanCoderList; //! list of huffman coders
63 /// current parameter during reading
64 int fCurrentParameter; //!
65 /// legacy mode to handle code not using NextParameter()
68 AliHLTUInt64_t fInput; //!
69 /// valid MSBs in the buffered input
70 AliHLTUInt32_t fInputLength; //!
72 ClassDef(AliHLTDataInflaterHuffman, 0)
75 #endif //ALIHLTDATAINFLATERHUFFMAN_H