]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/misc/AliL3TransBit.h
Update to the current version in the Bergen CVS. Most important
[u/mrichter/AliRoot.git] / HLT / misc / AliL3TransBit.h
1 // @(#) $Id$
2
3 #ifndef ALIL3TRANSBIT_H
4 #define ALIL3TRANSBIT_H
5
6 #include "AliL3RootTypes.h"
7
8 class AliL3TransBit {
9  public:
10   AliL3TransBit();
11   virtual ~AliL3TransBit();
12   inline Int_t Get0to1(Int_t val0);
13   inline Int_t Get1to0(Int_t val1);
14   Int_t GetBit0() {return fBit0;}
15   Int_t GetBit1() {return fBit1;}
16   Double_t GetX0() {return fX0;}
17   void SetBits(Int_t bit0, Int_t bit1) {fBit0=bit0;fBit1=bit1;}
18   void SetX0(Double_t x0) {fX0=x0;}
19   virtual void Update()=0;
20   virtual Double_t FindOptimumX0()=0;
21  protected:
22   Int_t  * fTable0; //! table
23   Int_t  * fTable1; //! table
24   Int_t fBit0;
25   Int_t fBit1;
26   Double_t fX0;
27
28   ClassDef(AliL3TransBit,1)
29 };
30
31 class AliL3TransBit_v1 : public AliL3TransBit {
32  public:
33   virtual void Update();
34   virtual Double_t FindOptimumX0();
35  protected:
36   
37   ClassDef(AliL3TransBit_v1,1)
38 };
39
40 class AliL3TransBit_v2 : public AliL3TransBit {
41  public:
42   virtual void Update();
43   virtual Double_t FindOptimumX0();
44  protected:
45
46   ClassDef(AliL3TransBit_v2,1)
47 };
48
49 Int_t AliL3TransBit::Get0to1(Int_t val0)
50 {
51   //return compressed bit values
52   return fTable0[val0];
53 }
54  
55 Int_t AliL3TransBit::Get1to0(Int_t val1)
56 {
57   //return uncompressed bit value
58   return fTable1[val1];
59 }
60
61 #endif 
62