]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/comp/AliHLTCOMPHuffmanOccurrenceData.h
Changes for #82873: Module debugging broken (Christian)
[u/mrichter/AliRoot.git] / HLT / comp / AliHLTCOMPHuffmanOccurrenceData.h
1 //-*- Mode: C++ -*-
2 // $Id$
3 #ifndef ALIHLTCOMPHUFFMANOCCURRENCEDATA_H
4 #define ALIHLTCOMPHUFFMANOCCURRENCEDATA_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   AliHLTCOMPHuffmanOccurrenceData.h
22 /// @author Jenny Wagner
23 /// @date   29-08-2007
24 /// @brief  Data class containing the occurrence table of ADC-values
25 ///
26
27 #include "AliHLTLogging.h"
28 #include "AliHLTDataTypes.h"
29
30 // type definitions needed for the Huffman compression
31
32 /** @class   AliHLTCOMPHuffmanOccurrenceData
33     @author Jenny Wagner
34     @date   29-08-2007
35     @brief  The Huffman Occurrence Data containing the struture of the ADC-value occurrence table 
36 */
37 class AliHLTCOMPHuffmanOccurrenceData : public TObject, public AliHLTLogging
38 {
39 public:
40
41   /** typedef for the array data of occurrence data */
42   typedef struct
43   {
44     Int_t famplitude; // ADC-value
45     Int_t fabundance; // occurrence = abundance of ADV-value
46     Int_t fcode;       // internal boolean used to decide whether 0 or 1 is appended to Huffman code
47   } AliHLTCOMPHuffmanDataStruct;
48   
49   /** standard constructor */
50   AliHLTCOMPHuffmanOccurrenceData();
51
52   /** destructor */
53   virtual ~AliHLTCOMPHuffmanOccurrenceData();
54
55   /** convert one entry of occurrence table into a class instance of HuffmanOccurrenceData */
56   void SetHuffmanOccurrenceData(const AliHLTCOMPHuffmanDataStruct& occurrencetableentry);
57
58   /** return one entry of occurrence table */
59   AliHLTCOMPHuffmanDataStruct* GetHuffmanOccurrenceData(AliHLTCOMPHuffmanDataStruct* occurrencetableentry) const;
60
61   int GetAmplitude() const {return famplitude;}
62   int GetAbundance() const {return fabundance;}
63
64 private:
65
66    /** copy constructor prohibited */
67   AliHLTCOMPHuffmanOccurrenceData(const AliHLTCOMPHuffmanOccurrenceData&);
68
69   /** assignment operator prohibited */
70   AliHLTCOMPHuffmanOccurrenceData& operator=(const AliHLTCOMPHuffmanOccurrenceData&);
71
72   /** 10-bit ADC value used for conversion from struct to class */
73   Int_t famplitude;  // 10-bit ADC-value
74   /** occurrence = abundance used for conversion from struct to class */
75   Int_t fabundance; // occurrence of one 10-bit ADC-value
76   Int_t fcode;       // internal variable used for sorting the binary tree (nothing to do with Huffman code!)
77   
78   ClassDef(AliHLTCOMPHuffmanOccurrenceData, 1)
79     
80     };
81 #endif
82