]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/misc/AliL3TransBit.h
New version of SPD raw-data reconstruction. The format now correponds to the actual...
[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) const;
13   inline Int_t Get1to0(Int_t val1) const;
14   Int_t GetBit0() const {return fBit0;}
15   Int_t GetBit1() const {return fBit1;}
16   Double_t GetX0() const {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; // bit 0
25   Int_t fBit1; // bit 1
26   Double_t fX0; // optimal X value(?)
27
28   ClassDef(AliL3TransBit,1)
29 };
30
31 class AliL3TransBitV1 : public AliL3TransBit {
32  public:
33   virtual ~AliL3TransBitV1(){}
34   virtual void Update();
35   virtual Double_t FindOptimumX0();
36  protected:
37   
38   ClassDef(AliL3TransBitV1,1)
39 };
40
41 class AliL3TransBitV2 : public AliL3TransBit {
42  public:
43   virtual ~AliL3TransBitV2(){}
44   virtual void Update();
45   virtual Double_t FindOptimumX0();
46  protected:
47
48   ClassDef(AliL3TransBitV2,1)
49 };
50
51 Int_t AliL3TransBit::Get0to1(Int_t val0) const
52 {
53   //return compressed bit values
54   return fTable0[val0];
55 }
56  
57 Int_t AliL3TransBit::Get1to0(Int_t val1) const
58 {
59   //return uncompressed bit value
60   return fTable1[val1];
61 }
62
63 #endif 
64