]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/comp/AliHLTCOMPHuffmanData.cxx
added TPC Krypton CF and associated component (Kenneth)
[u/mrichter/AliRoot.git] / HLT / comp / AliHLTCOMPHuffmanData.cxx
1 //-*- Mode: C++ -*-
2 /**************************************************************************
3  * This file is property of and copyright by the ALICE HLT Project        * 
4  * All rights reserved.                                                   *
5  *                                                                        *
6  * Primary Author: Jenny Wagner  (jwagner@cern.ch)                        *
7  *                                                                        *
8  * Permission to use, copy, modify and distribute this software and its   *
9  * documentation strictly for non-commercial purposes is hereby granted   *
10  * without fee, provided that the above copyright notice appears in all   *
11  * copies and that both the copyright notice and this permission notice   *
12  * appear in the supporting documentation. The authors make no claims     *
13  * about the suitability of this software for any purpose. It is          * 
14  * provided "as is" without express or implied warranty.                  *
15  **************************************************************************/
16
17 #include "AliHLTCOMPHuffmanData.h"
18
19 #if __GNUC__ >= 3
20 using namespace std;
21 #endif
22
23 ClassImp(AliHLTCOMPHuffmanData)
24
25 /** @file   ALIHLTCOMPHuffmanData.cxx
26     @author Jenny Wagner
27     @date   29-08-2007
28             changed on 03-12-2007
29     @brief see header file for documentation
30 */
31
32 /** construction without any arguments (used for isolated tests) */
33 AliHLTCOMPHuffmanData::AliHLTCOMPHuffmanData()
34   :
35   fOrigin(kAliHLTVoidDataOrigin),
36   fDataSpec(0)
37 {
38   // see header file for class documentation
39   // or
40   // refer to README to build package
41   // or
42   // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
43 }
44
45 /** HuffmanData destructor  */
46 AliHLTCOMPHuffmanData::~AliHLTCOMPHuffmanData()
47 {
48   /* destructor, see header file for class documentation */
49 }
50
51 /** get data from OCDB and write them into instance of HuffmanData */
52 void AliHLTCOMPHuffmanData::InitHuffmanData(AliHLTCOMPHuffmanOccurrenceData::AliHLTCOMPHuffmanDataStruct* occurrencetable, AliHLTCOMPHuffmanCodeData::AliHLTCOMPHuffmanCodeStruct* codetable)
53 {
54   // see header file for class documentation
55   for(Int_t ii = 0; ii < TIMEBINS; ii++)
56     {
57       fOccurrenceTable[ii].SetHuffmanOccurrenceData(occurrencetable[ii]);
58       
59       fCodeTable[ii].SetHuffmanCodeData(codetable[ii]);
60     }
61 }
62
63 AliHLTCOMPHuffmanOccurrenceData::AliHLTCOMPHuffmanDataStruct* AliHLTCOMPHuffmanData::GetOccurrenceTable(AliHLTCOMPHuffmanOccurrenceData::AliHLTCOMPHuffmanDataStruct* occurrencetable) 
64 {
65   // see header file for class documentation
66   for (Int_t ii = 0; ii < TIMEBINS; ii++)
67     {
68       fOccurrenceTable[ii].GetHuffmanOccurrenceData(&(occurrencetable[ii]));
69     }
70
71   return occurrencetable;
72   
73 }
74
75 AliHLTCOMPHuffmanCodeData::AliHLTCOMPHuffmanCodeStruct* AliHLTCOMPHuffmanData::GetCodeTable(AliHLTCOMPHuffmanCodeData::AliHLTCOMPHuffmanCodeStruct* codetable)
76 {
77   // see header file for class documentation
78   for (Int_t ii = 0; ii < TIMEBINS; ii++)
79     {
80       fCodeTable[ii].GetHuffmanCodeData(&(codetable[ii]));
81     }
82
83   return codetable;
84 }
85
86 Int_t AliHLTCOMPHuffmanData::SetOCDBSpecifications(TString origin, Int_t dataspec)
87 {
88   // see header file for class documentation
89   fOrigin = origin;
90   fDataSpec = dataspec;
91
92   return 0;
93 }
94