]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/comp/AliHLTCOMPHuffmanData.cxx
excluding deprecated classes from libAliHLTComp, library stays as an empty body for...
[u/mrichter/AliRoot.git] / HLT / comp / AliHLTCOMPHuffmanData.cxx
CommitLineData
e3107b54 1// $Id$
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///**************************************************************************
c2440081 16
c2440081 17#include "AliHLTCOMPHuffmanData.h"
c2440081 18
19#if __GNUC__ >= 3
20using namespace std;
21#endif
22
23ClassImp(AliHLTCOMPHuffmanData)
24
e3107b54 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///
bf7a3243 31
c2440081 32AliHLTCOMPHuffmanData::AliHLTCOMPHuffmanData()
e3107b54 33 : TObject()
34 , AliHLTLogging()
35 , fOccurrenceTable()
36 , fCodeTable()
37 , fOrigin(kAliHLTVoidDataOrigin)
38 , fDataSpec(0)
c2440081 39{
40 // see header file for class documentation
41 // or
42 // refer to README to build package
43 // or
44 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
45}
46
c2440081 47AliHLTCOMPHuffmanData::~AliHLTCOMPHuffmanData()
48{
e3107b54 49 // destructor, see header file for class documentation
c2440081 50}
51
e3107b54 52int AliHLTCOMPHuffmanData::InitHuffmanData(const AliHLTCOMPHuffmanOccurrenceData::AliHLTCOMPHuffmanDataStruct* occurrencetable,
53 const AliHLTCOMPHuffmanCodeData::AliHLTCOMPHuffmanCodeStruct* codetable)
c2440081 54{
e3107b54 55 // init internal occurrencetable and codetable
56 for(Int_t ii = 0; ii < TIMEBINS; ii++) {
57 fOccurrenceTable[ii].SetHuffmanOccurrenceData(occurrencetable[ii]);
58 fCodeTable[ii].SetHuffmanCodeData(codetable[ii]);
59 }
60
61 return 0;
c2440081 62}
63
e3107b54 64AliHLTCOMPHuffmanOccurrenceData::AliHLTCOMPHuffmanDataStruct* AliHLTCOMPHuffmanData::GetOccurrenceTable(AliHLTCOMPHuffmanOccurrenceData::AliHLTCOMPHuffmanDataStruct* occurrencetable) const
c2440081 65{
e3107b54 66 // copy occurrencetable to target
67 for (Int_t ii = 0; ii < TIMEBINS; ii++) {
68 fOccurrenceTable[ii].GetHuffmanOccurrenceData(&(occurrencetable[ii]));
69 }
c2440081 70
e3107b54 71 return 0;
c2440081 72}
73
e3107b54 74AliHLTCOMPHuffmanCodeData::AliHLTCOMPHuffmanCodeStruct* AliHLTCOMPHuffmanData::GetCodeTable(AliHLTCOMPHuffmanCodeData::AliHLTCOMPHuffmanCodeStruct* codetable) const
c2440081 75{
e3107b54 76 // copy code table to target
77 for (Int_t ii = 0; ii < TIMEBINS; ii++) {
78 fCodeTable[ii].GetHuffmanCodeData(&(codetable[ii]));
79 }
c2440081 80
e3107b54 81 return 0;
c2440081 82}
92272b35 83
e3107b54 84int AliHLTCOMPHuffmanData::SetOCDBSpecifications(const TString& origin, Int_t dataspec)
92272b35 85{
e3107b54 86 // set data block properties
92272b35 87 fOrigin = origin;
88 fDataSpec = dataspec;
89
90 return 0;
91}