Conversion table class for 10-8bit compression.
[u/mrichter/AliRoot.git] / HLT / misc / AliTransBit.h
CommitLineData
1a3c8f6e 1#ifndef ALITRANSBIT_H
2#define ALITRANSBIT_H
3
4#include "AliL3RootTypes.h"
5
6class AliTransBit : public TObject {
7public:
8 AliTransBit();
9 virtual ~AliTransBit();
10 inline Int_t Get0to1(Int_t val0);
11 inline Int_t Get1to0(Int_t val1);
12 Int_t GetBit0() {return fBit0;}
13 Int_t GetBit1() {return fBit1;}
14 Double_t GetX0() {return fX0;}
15 void SetBits(Int_t bit0, Int_t bit1) {fBit0=bit0;fBit1=bit1;}
16 void SetX0(Double_t x0) {fX0=x0;}
17 virtual void Update()=0;
18 virtual Double_t FindOptimumX0()=0;
19protected:
20 Int_t * fTable0; //! table
21 Int_t * fTable1; //! table
22 Int_t fBit0;
23 Int_t fBit1;
24 Double_t fX0;
25 ClassDef(AliTransBit,1) // Tclusters
26};
27
28
29class AliTransBit_v1 : public AliTransBit {
30public:
31 virtual void Update();
32 virtual Double_t FindOptimumX0();
33protected:
34 ClassDef(AliTransBit_v1,1) // Tclusters
35};
36
37class AliTransBit_v2 : public AliTransBit {
38public:
39 virtual void Update();
40 virtual Double_t FindOptimumX0();
41protected:
42 ClassDef(AliTransBit_v2,1) // Tclusters
43};
44
45
46Int_t AliTransBit::Get0to1(Int_t val0)
47{
48 //
49 //return compressed bit values
50 return fTable0[val0];
51}
52
53Int_t AliTransBit::Get1to0(Int_t val1)
54{
55 //return uncompressed bit value
56 return fTable1[val1];
57}
58
59
60#endif //ALITRANSBIT_H