3 #ifndef ALIHLTCOMPHUFFMANOCCURRENCEDATA_H
4 #define ALIHLTCOMPHUFFMANOCCURRENCEDATA_H
6 ///**************************************************************************
7 ///* This file is property of and copyright by the ALICE HLT Project *
8 ///* All rights reserved. *
10 ///* Primary Author: Jenny Wagner (jwagner@cern.ch) *
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 ///**************************************************************************
21 /// @file AliHLTCOMPHuffmanOccurrenceData.h
22 /// @author Jenny Wagner
24 /// @brief Data class containing the occurrence table of ADC-values
27 #include "AliHLTLogging.h"
28 #include "AliHLTDataTypes.h"
30 // type definitions needed for the Huffman compression
32 /** @class AliHLTCOMPHuffmanOccurrenceData
35 @brief The Huffman Occurrence Data containing the struture of the ADC-value occurrence table
37 class AliHLTCOMPHuffmanOccurrenceData : public TObject, public AliHLTLogging
41 /** typedef for the array data of occurrence data */
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;
49 /** standard constructor */
50 AliHLTCOMPHuffmanOccurrenceData();
53 virtual ~AliHLTCOMPHuffmanOccurrenceData();
55 /** convert one entry of occurrence table into a class instance of HuffmanOccurrenceData */
56 void SetHuffmanOccurrenceData(const AliHLTCOMPHuffmanDataStruct& occurrencetableentry);
58 /** return one entry of occurrence table */
59 AliHLTCOMPHuffmanDataStruct* GetHuffmanOccurrenceData(AliHLTCOMPHuffmanDataStruct* occurrencetableentry) const;
61 int GetAmplitude() const {return famplitude;}
62 int GetAbundance() const {return fabundance;}
66 /** copy constructor prohibited */
67 AliHLTCOMPHuffmanOccurrenceData(const AliHLTCOMPHuffmanOccurrenceData&);
69 /** assignment operator prohibited */
70 AliHLTCOMPHuffmanOccurrenceData& operator=(const AliHLTCOMPHuffmanOccurrenceData&);
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!)
78 ClassDef(AliHLTCOMPHuffmanOccurrenceData, 1)