]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/AliTRDdataArrayF.h
Merge with TRD-develop
[u/mrichter/AliRoot.git] / TRD / AliTRDdataArrayF.h
1 #ifndef ALITRDDATAARRAYF_H
2 #define ALITRDDATAARRAYF_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 /* $Id: AliTRDdataArrayF.h,v */
8  
9 #include   "AliTRDdataArray.h"
10
11 /////////////////////////////////////////////////////////////
12 //                                                         //
13 //  General container for float data from TRD detector     //
14 //  segments.                                              //
15 //  Adapted from AliDigits, origin M.Ivanov                //
16 //                                                         //
17 /////////////////////////////////////////////////////////////
18
19 class AliTRDarrayF;
20
21 class AliTRDdataArrayF : public AliTRDdataArray {
22
23  public:
24
25   AliTRDdataArrayF();
26   AliTRDdataArrayF(Int_t nrow, Int_t ncol,Int_t ntime);
27   AliTRDdataArrayF(const AliTRDdataArrayF &a);
28   virtual ~AliTRDdataArrayF();
29   AliTRDdataArrayF &operator=(const AliTRDdataArrayF &a);
30
31   virtual void    Allocate(Int_t nrow, Int_t ncol,Int_t ntime);
32   virtual void    Copy(TObject &a);
33   virtual void    Compress(Int_t bufferType, Float_t threshold);
34   virtual void    Compress(Int_t bufferType); 
35   virtual void    Expand();
36   virtual Bool_t  First();
37   virtual Bool_t  Next(); 
38   virtual void    Reset();
39
40           void    SetData(Int_t row, Int_t col, Int_t time, Float_t value);
41   virtual void    SetThreshold(Float_t threshold) { fThreshold = threshold; };
42
43   virtual Float_t GetData(Int_t row, Int_t col, Int_t time) const;
44   virtual Float_t GetThreshold() const            { return fThreshold;  };
45
46   virtual Int_t   GetSize();
47   virtual Int_t   GetDataSize(); 
48   virtual Int_t   GetOverThreshold(Float_t threshold);  
49
50  protected:
51
52   inline  void    SetDataFast(Int_t idx1, Int_t idx2, Float_t value); 
53   inline  Float_t GetDataFast(Int_t idx1, Int_t idx2) const; 
54
55   Float_t         GetData1(Int_t idx1, Int_t idx2) const; 
56   void            Expand1(); 
57   void            Compress1(); 
58   void            Expand2();
59   void            Compress2();
60   Bool_t          First0();
61   Bool_t          Next0(); 
62   Bool_t          First1();
63   Bool_t          Next1();
64
65   AliTRDarrayF  *fElements;        // Buffer of 4 bytes floats for the array content
66   Float_t        fThreshold;       // Threshold for zero suppression
67  
68   ClassDef(AliTRDdataArrayF,1)     // Container for float data of one TRD detector segment
69
70 };
71  
72 #endif
73