4 #ifndef ALIHLTTPCCOMPMODELINFLATER_H
5 #define ALIHLTTPCCOMPMODELINFLATER_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 *
10 /** @file AliHLTTPCCompModelInflater.h
11 @author Timm Steinbeck
13 @brief Declaration of an uncompressor class for TPC track data. */
15 #include "AliHLTTPCTrackArray.h"
16 #include "AliHLTTPCTrackletDataFormat.h"
17 #include "AliHLTTPCClusterDataFormat.h"
18 #include "AliHLTLogging.h"
19 #include "AliHLTTPCModels.h"
22 * @class AliHLTTPCCompModelInflater
23 * @brief A HLT TPC track compressor.
25 * A class that can compress HLT TPC track model data
26 * The model inflater is the counterpart of the deflater component
27 * which decompresses the data after a conversion and compression.
28 * The deflater is followed by a deconverter in order to get the
29 * original standard HLT cluster track format back
32 class AliHLTTPCCompModelInflater: public AliHLTLogging
35 /** standard constructor */
36 AliHLTTPCCompModelInflater();
37 /** standard destructor */
38 virtual ~AliHLTTPCCompModelInflater();
40 /** function to decompress tracks
41 * @param inData AliHLTUInt8_t* pointer to input
42 * @param inputSize UInt_t const& input data size
43 * @param output AliHLTUInt8_t* pointer to output
44 * @param outputSize UInt_t& output data size
45 * @return zero upon success
47 int DecompressTracks( AliHLTUInt8_t* inData, UInt_t const& inputSize, AliHLTUInt8_t* output, UInt_t& outputSize );
49 /** function to decompress remaining clusters
50 * @param inData AliHLTUInt8_t* pointer to input
51 * @param inputSize UInt_t const& input data size
52 * @param output AliHLTUInt8_t* pointer to output
53 * @param outputSize UInt_t& output data size
54 * @return zero upon success
56 int DecompressRemainingClusters( AliHLTUInt8_t* inData, UInt_t const& inputSize, AliHLTUInt8_t* output, UInt_t& outputSize );
60 /** function to initialise the bit data input
61 * @param input AliHLTUInt8_t* pointer to input data
62 * @param inputSize UInt_t input data size
64 void InitBitDataInput( AliHLTUInt8_t* input, UInt_t inputSize );
66 /** function to close bit data input */
67 void CloseBitDataInput()
71 /** function to get current byte input position
72 * @return unsigned long value of current byte input position
74 unsigned long GetCurrentByteInputPosition() const
76 return (unsigned long)( fBitDataCurrentInput - fBitDataCurrentInputStart );
79 /** function to get current bit input position
80 * @return unsigned value of current bit input position
82 unsigned GetCurrentBitInputPosition() const
84 return fBitDataCurrentPosInWord;
87 /** function to get current input byte
88 * @return AliHLTUInt8_t value of current input byte
90 AliHLTUInt8_t GetCurrentInputByte() const
92 return fBitDataCurrentWord;
95 /** function to determine end of bit input
96 * @return boolean if end is reached or not
98 bool EndOfBitInput() const
100 return (fBitDataCurrentInput>=fBitDataCurrentInputEnd);
103 /** function to get bit data input size bytes
104 * @return UInt_t value of bit data input size bytes
106 UInt_t GetBitDataInputSizeBytes() const
108 return fBitDataCurrentInput-fBitDataCurrentInputStart;
111 /** function to determine input bit
112 * @return boolean (if bit is 1 or 0)
114 bool InputBit( AliHLTUInt8_t & value );
116 /** function to determine input bits below 8 bits
117 * @param value AliHLTUInt8_t &
118 * @param bitCount UInt_t const &
121 bool InputBits( AliHLTUInt8_t & value, UInt_t const & bitCount );
123 /** function to determine input bits between 8 and 16 bits
124 * @param value AliHLTUInt16_t &
125 * @param bitCount UInt_t const &
128 bool InputBits( AliHLTUInt16_t & value, UInt_t const & bitCount );
130 /** function to determine input bits between 16 and 32 bits
131 * @param value AliHLTUInt32_t &
132 * @param bitCount UInt_t const &
135 bool InputBits( AliHLTUInt32_t & value, UInt_t const & bitCount );
137 /** function to determine input bits between 16 and 32 bits
138 * @param value Int_t_t &
139 * @param bitCount UInt_t const &
142 bool InputBits( Int_t & value, UInt_t const & bitCount );
144 /** function to determine input bits between 32 and 64 bits
145 * @param value AliHLTUInt64_t &
146 * @param bitCount UInt_t const &
149 bool InputBits( AliHLTUInt64_t & value, UInt_t const & bitCount );
151 /** function pad 8 bits */
154 /** function to determine input bytes
155 * @param data AliHLTUInt8_t* pointer to input data
156 * @param byteCount UInt_t const &
159 bool InputBytes( AliHLTUInt8_t* data, UInt_t const & byteCount );
162 /** copy constructor prohibited */
163 AliHLTTPCCompModelInflater(const AliHLTTPCCompModelInflater&);
164 /** assignment operator prohibited */
165 AliHLTTPCCompModelInflater& operator=(const AliHLTTPCCompModelInflater&);
167 /** member variable for bit data current word */
168 AliHLTUInt8_t fBitDataCurrentWord; // member variable for bit data current word
169 /** member variable for bit data current position in word */
170 UInt_t fBitDataCurrentPosInWord;// member variable for bit data current position in word
171 /** member variable for bit data current input */
172 AliHLTUInt8_t *fBitDataCurrentInput; // member variable for bit data current input
173 /** member variable for bit data current input start */
174 AliHLTUInt8_t *fBitDataCurrentInputStart; // member variable for bit data current input star
175 /** member variable for bit data current input end */
176 AliHLTUInt8_t *fBitDataCurrentInputEnd; // member variable for bit data current input end
178 ClassDef(AliHLTTPCCompModelInflater, 0);