8230f242 |
1 | #ifndef ALITRDDATAARRAYI_H |
2 | #define ALITRDDATAARRAYI_H |
6f1e466d |
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); |
dd9a6ee3 |
25 | AliTRDdataArrayI(const AliTRDdataArrayI &a); |
8230f242 |
26 | virtual ~AliTRDdataArrayI(); |
dd9a6ee3 |
27 | AliTRDdataArrayI &operator=(const AliTRDdataArrayI &a); |
6f1e466d |
28 | |
29 | virtual void Allocate(Int_t nrow, Int_t ncol, Int_t ntime); |
43da34c0 |
30 | virtual void Copy(TObject &a); |
6f1e466d |
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 | |
504a18fe |
38 | void SetData(Int_t row, Int_t col, Int_t time, Int_t value); |
a2b90f83 |
39 | void SetDataUnchecked(Int_t row, Int_t col, Int_t time, Int_t value) |
40 | { SetDataFast(GetIdx1Unchecked(row,col),time,value); }; |
41 | |
6f1e466d |
42 | virtual void SetThreshold(Int_t threshold) { fThreshold = threshold; }; |
43 | |
793ff80c |
44 | virtual Int_t GetData(Int_t row, Int_t col, Int_t time) const; |
a2b90f83 |
45 | Int_t GetDataUnchecked(Int_t row, Int_t col, Int_t time) const |
46 | { return GetDataFast(GetIdx1Unchecked(row,col),time); }; |
47 | |
793ff80c |
48 | virtual Int_t GetThreshold() const { return fThreshold; }; |
6f1e466d |
49 | |
50 | virtual Int_t GetSize(); |
51 | virtual Int_t GetDataSize(); |
52 | virtual Int_t GetOverThreshold(Int_t threshold); |
53 | |
54 | protected: |
55 | |
ff821236 |
56 | void SetDataFast(Int_t idx1, Int_t idx2, Int_t value); |
57 | Int_t GetDataFast(Int_t idx1, Int_t idx2) const; |
6f1e466d |
58 | |
793ff80c |
59 | Int_t GetData1(Int_t idx1, Int_t idx2) const; |
6f1e466d |
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 | |
6f1e466d |
76 | #endif |
77 | |
793ff80c |
78 | |