]>
Commit | Line | Data |
---|---|---|
c2440081 | 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 | ||
c2440081 | 17 | #include "AliHLTCOMPHuffmanData.h" |
c2440081 | 18 | |
19 | #if __GNUC__ >= 3 | |
20 | using namespace std; | |
21 | #endif | |
22 | ||
23 | ClassImp(AliHLTCOMPHuffmanData) | |
24 | ||
bf7a3243 | 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 | ||
c2440081 | 32 | /** construction without any arguments (used for isolated tests) */ |
33 | AliHLTCOMPHuffmanData::AliHLTCOMPHuffmanData() | |
af2ed151 | 34 | : |
35 | fOrigin(kAliHLTVoidDataOrigin), | |
36 | fDataSpec(0) | |
c2440081 | 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 */ | |
bf7a3243 | 52 | void AliHLTCOMPHuffmanData::InitHuffmanData(AliHLTCOMPHuffmanOccurrenceData::AliHLTCOMPHuffmanDataStruct* occurrencetable, AliHLTCOMPHuffmanCodeData::AliHLTCOMPHuffmanCodeStruct* codetable) |
c2440081 | 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 | ||
bf7a3243 | 63 | AliHLTCOMPHuffmanOccurrenceData::AliHLTCOMPHuffmanDataStruct* AliHLTCOMPHuffmanData::GetOccurrenceTable(AliHLTCOMPHuffmanOccurrenceData::AliHLTCOMPHuffmanDataStruct* occurrencetable) |
c2440081 | 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 | ||
bf7a3243 | 75 | AliHLTCOMPHuffmanCodeData::AliHLTCOMPHuffmanCodeStruct* AliHLTCOMPHuffmanData::GetCodeTable(AliHLTCOMPHuffmanCodeData::AliHLTCOMPHuffmanCodeStruct* codetable) |
c2440081 | 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 | } | |
92272b35 | 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 |