]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/comp/AliHLTCOMPHuffmanCodeData.h
added TPC Krypton CF and associated component (Kenneth)
[u/mrichter/AliRoot.git] / HLT / comp / AliHLTCOMPHuffmanCodeData.h
1 //-*- Mode: C++ -*-
2
3 #ifndef ALIHLTCOMPHUFFMANCODEDATA_H
4 #define ALIHLTCOMPHUFFMANCODEDATA_H
5
6 /**************************************************************************
7  * This file is property of and copyright by the ALICE HLT Project        * 
8  * All rights reserved.                                                   *
9  *                                                                        *
10  * Primary Author: Jenny Wagner  (jwagner@cern.ch)                        *
11  *                                                                        *
12  * Permission to use, copy, modify and distribute this software and its   *
13  * documentation strictly for non-commercial purposes is hereby granted   *
14  * without fee, provided that the above copyright notice appears in all   *
15  * copies and that both the copyright notice and this permission notice   *
16  * appear in the supporting documentation. The authors make no claims     *
17  * about the suitability of this software for any purpose. It is          * 
18  * provided "as is" without express or implied warranty.                  *
19  **************************************************************************/
20
21 /** @file   AliHLTCOMPHuffmanCodeData.h
22     @author Jenny Wagner
23     @date   29-08-2007
24     @brief  Data class containing the Huffman code table of ADV-values
25 */
26
27 #include "AliHLTLogging.h"
28 #include "AliHLTDataTypes.h"
29
30 // typedef for the final HuffmanCodeArray
31 /** @class   AliHLTCOMPHuffmanCodeData
32     @author Jenny Wagner
33     @date   29-08-2007
34     @brief  The Huffman Code Data containing the struture of the Huffman code table 
35 */
36 class AliHLTCOMPHuffmanCodeData : public TObject, public AliHLTLogging
37 {
38 public:
39
40   /** typedef for the structs in Huffman code table */
41   typedef struct AliHLTCOMPHuffmanCodeStruct
42   {
43     Int_t famplitude; // ADC-value
44     AliHLTUInt64_t fhuffmancode; // maximal possible codelength: 64 bits
45     UInt_t fvalidcodelength; // validcodelength needed as code is of variable length!!
46   } AliHLTCOMPHuffmanCodeStruct;
47   
48   /** standard constructor */
49   AliHLTCOMPHuffmanCodeData();
50
51   /** destructor */
52   virtual ~AliHLTCOMPHuffmanCodeData();
53
54   /** convert Huffman code struct into class instance of HuffmanCodeData */
55   void SetHuffmanCodeData(AliHLTCOMPHuffmanCodeStruct const& codetableentry);
56
57   /** return Huffman code struct */
58   AliHLTCOMPHuffmanCodeStruct* GetHuffmanCodeData(AliHLTCOMPHuffmanCodeStruct* codetableentry);
59
60 private:
61
62   /** copy constructor prohibited */
63   AliHLTCOMPHuffmanCodeData(const AliHLTCOMPHuffmanCodeData&);
64
65   /** assignment operator prohibited */
66   AliHLTCOMPHuffmanCodeData& operator=(const AliHLTCOMPHuffmanCodeData&);
67
68   Int_t famplitude;       // 10-bit ADC-value
69   AliHLTUInt64_t fhuffmancode;   // respective Huffman code with maximal possible codelength: 64 bits
70   Int_t fvalidcodelength; // variable to store the respective valid codelength
71   
72   ClassDef(AliHLTCOMPHuffmanCodeData, 1)
73     
74     };
75 #endif
76