]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/AliTRDdataArrayI.h
small fix
[u/mrichter/AliRoot.git] / TRD / AliTRDdataArrayI.h
1 #ifndef ALITRDDATAARRAYI_H
2 #define ALITRDDATAARRAYI_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: AliTRDdataArrayI.h,v */
8  
9 #include   "AliTRDdataArray.h"
10
11 /////////////////////////////////////////////////////////////
12 //                                                         //
13 //  General container for integer data from TRD detector   //
14 //  segments.                                              //
15 //  Adapted from AliDigits, origin M.Ivanov                //
16 //                                                         //
17 /////////////////////////////////////////////////////////////
18
19 class AliTRDdataArrayI : public AliTRDdataArray {
20
21  public:
22
23   AliTRDdataArrayI();
24   AliTRDdataArrayI(Int_t nrow, Int_t ncol, Int_t ntime);
25   AliTRDdataArrayI(const AliTRDdataArrayI &a);
26   virtual ~AliTRDdataArrayI();
27   AliTRDdataArrayI &operator=(const AliTRDdataArrayI &a);
28
29   virtual void   Allocate(Int_t nrow, Int_t ncol, Int_t ntime);
30   virtual void   Copy(TObject &a) const;
31   virtual void   Compress(Int_t bufferType, Int_t threshold);
32   virtual void   Compress(Int_t bufferType); 
33   virtual void   Expand();
34   virtual Bool_t First();
35   virtual Bool_t Next(); 
36   virtual void   Reset();
37
38           void   SetData(Int_t row, Int_t col, Int_t time, Int_t value);
39           void   SetDataUnchecked(Int_t row, Int_t col, Int_t time, Int_t value)
40                                  { SetDataFast(GetIdx1Unchecked(row,col),time,value); };
41
42   virtual void   SetThreshold(Int_t threshold) { fThreshold = threshold; };
43
44   virtual Int_t  GetData(Int_t row, Int_t col, Int_t time) const;
45           Int_t  GetDataUnchecked(Int_t row, Int_t col, Int_t time) const
46                                  { return GetDataFast(GetIdx1Unchecked(row,col),time); };
47
48   virtual Int_t  GetThreshold() const          { return fThreshold;  };
49
50   virtual Int_t  GetSize() const;
51   virtual Int_t  GetDataSize() const; 
52   virtual Int_t  GetOverThreshold(Int_t threshold);  
53
54  protected:
55
56   void   SetDataFast(Int_t idx1, Int_t idx2, Int_t value);
57   Int_t  GetDataFast(Int_t idx1, Int_t idx2) const;
58
59   Int_t          GetData1(Int_t idx1, Int_t idx2) const; 
60   void           Expand1(); 
61   void           Compress1(); 
62   void           Expand2();
63   void           Compress2();
64   Bool_t         First0();
65   Bool_t         Next0(); 
66   Bool_t         First1();
67   Bool_t         Next1();
68  
69   AliTRDarrayI  *fElements;        // Buffer of 4 bytes integers for the array content
70   Int_t          fThreshold;       // Threshold for zero suppression
71  
72   ClassDef(AliTRDdataArrayI,1)     // Container for integer data of one TRD detector segment
73
74 };
75  
76 #endif
77
78