3 #ifndef ALIHLTCOMPHUFFMANDATA_H
4 #define ALIHLTCOMPHUFFMANDATA_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 AliHLTCOMPHuffmanData.h
24 @brief The Huffman Data containing the Huffman code table and the occurrence table of ADV-values
27 #include "AliHLTLogging.h"
28 #include "AliHLTDataTypes.h"
29 #include "AliHLTCOMPHuffmanOccurrenceData.h"
30 #include "AliHLTCOMPHuffmanCodeData.h"
32 // type definitions needed for the Huffman compression
33 /** @class AliHLTCOMPHuffmanData
36 @brief The Huffman Data containing the Huffman code table and the occurrence table of ADC-values
41 class AliHLTCOMPHuffmanData : public TObject, public AliHLTLogging
45 /** typedef for the nodes in the Huffman tree */
46 typedef struct AliHLTCOMPHuffmanTreeData_t
48 AliHLTCOMPHuffmanOccurrenceData::AliHLTCOMPHuffmanData_t leafcontents;
49 AliHLTCOMPHuffmanTreeData_t* left;
50 AliHLTCOMPHuffmanTreeData_t* right;
51 AliHLTCOMPHuffmanTreeData_t* parent;
53 AliHLTCOMPHuffmanTreeData_t* next;
54 AliHLTCOMPHuffmanTreeData_t* previous;
56 } AliHLTCOMPHuffmanTreeData_t;
59 /** standard constructor */
60 AliHLTCOMPHuffmanData();
63 virtual ~AliHLTCOMPHuffmanData();
65 /** get data from OCDB (currently from ROOT-file) and write into instance of HuffmanData
66 * @param occurrencetable pointer to occurrence table
67 * @param codetable pointer to Huffman code table
69 void InitHuffmanData(AliHLTCOMPHuffmanOccurrenceData::AliHLTCOMPHuffmanData_t* occurrencetable, AliHLTCOMPHuffmanCodeData::AliHLTCOMPHuffmanCode_t* codetable);
71 /** return occurrence table to be used/written somewhere else (intialisation of Huffman Compressor tables)
72 * @param occurrence table pointer to occurrence table
74 AliHLTCOMPHuffmanOccurrenceData::AliHLTCOMPHuffmanData_t* GetOccurrenceTable(AliHLTCOMPHuffmanOccurrenceData::AliHLTCOMPHuffmanData_t* occurrencetable);
76 /** return code table to be used/ written somewhere else (initialisation of the Huffman Compressor tables)
77 * @param codetable pointer to Huffman code table
79 AliHLTCOMPHuffmanCodeData::AliHLTCOMPHuffmanCode_t* GetCodeTable(AliHLTCOMPHuffmanCodeData::AliHLTCOMPHuffmanCode_t* codetable);
83 /** copy constructor prohibited */
84 AliHLTCOMPHuffmanData(const AliHLTCOMPHuffmanData&);
86 /** assignment operator prohibited */
87 AliHLTCOMPHuffmanData& operator=(const AliHLTCOMPHuffmanData&);
89 /** array of instances of HuffmanOccurrenceData that contains occurrence table */
90 AliHLTCOMPHuffmanOccurrenceData fOccurrenceTable[TIMEBINS]; // occurrence table for all ADC-values
91 /** array of instances of HuffmanCodeData thtat contains complete Huffman code table */
92 AliHLTCOMPHuffmanCodeData fCodeTable[TIMEBINS]; // Huffman translation table for all ADC-values
94 ClassDef(AliHLTCOMPHuffmanData, 1)