]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/misc/AliTransBit.h
Bugfix in GetMemorySize.
[u/mrichter/AliRoot.git] / HLT / misc / AliTransBit.h
1 #ifndef ALITRANSBIT_H
2 #define ALITRANSBIT_H
3
4 #include "AliL3RootTypes.h"
5
6 class AliTransBit {
7 public:
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;
19 protected:
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
29 class AliTransBit_v1 : public AliTransBit {
30 public:
31   virtual void Update();
32   virtual Double_t FindOptimumX0();
33 protected:
34   ClassDef(AliTransBit_v1,1)  // Tclusters
35 };
36
37 class AliTransBit_v2 : public AliTransBit {
38 public:
39   virtual void Update();
40   virtual Double_t FindOptimumX0();
41 protected:
42   ClassDef(AliTransBit_v2,1)  // Tclusters
43 };
44
45
46 Int_t AliTransBit::Get0to1(Int_t val0)
47 {
48   //
49   //return compressed bit values
50   return fTable0[val0];
51 }
52  
53 Int_t AliTransBit::Get1to0(Int_t val1)
54 {
55   //return uncompressed bit value
56   return fTable1[val1];
57 }
58
59
60 #endif //ALITRANSBIT_H