]>
Commit | Line | Data |
---|---|---|
8230f242 | 1 | #ifndef ALITRDDATAARRAY_H |
2 | #define ALITRDDATAARRAY_H | |
f7336fa3 | 3 | |
4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
7 | /* $Id$ */ | |
8 | ||
f7336fa3 | 9 | #include "AliTRDsegmentID.h" |
10 | ||
11 | ///////////////////////////////////////////////////////////// | |
12 | // General container for data from TRD detector segments // | |
13 | // Adapted from AliDigits, origin M.Ivanov // | |
14 | ///////////////////////////////////////////////////////////// | |
15 | ||
793ff80c | 16 | class AliTRDarrayI; |
17 | ||
f7336fa3 | 18 | class AliTRDdataArray : public AliTRDsegmentID { |
19 | ||
20 | public: | |
21 | ||
22 | AliTRDdataArray(); | |
6f1e466d | 23 | AliTRDdataArray(Int_t nrow, Int_t ncol,Int_t ntime); |
dd9a6ee3 | 24 | AliTRDdataArray(const AliTRDdataArray &d); |
8230f242 | 25 | virtual ~AliTRDdataArray(); |
dd9a6ee3 | 26 | AliTRDdataArray &operator=(const AliTRDdataArray &d); |
f7336fa3 | 27 | |
e0d47c25 | 28 | virtual void Copy(TObject &d) const; |
6f1e466d | 29 | virtual void Allocate(Int_t nrow, Int_t ncol,Int_t ntime); |
30 | virtual void Reset(); | |
f7336fa3 | 31 | |
625f5260 | 32 | virtual Int_t GetNrow() const { return fNrow; }; |
33 | virtual Int_t GetNcol() const { return fNcol; }; | |
34 | virtual Int_t GetNtime() const { return fNtime; }; | |
793ff80c | 35 | Int_t GetIndex(Int_t row, Int_t col, Int_t time) const; |
a2b90f83 | 36 | Int_t GetIndexUnchecked(Int_t row, Int_t col, Int_t time) const |
625f5260 | 37 | { return time * fNrow*fNcol |
38 | + GetIdx1Unchecked(row,col); }; | |
39 | Int_t GetBufType() const { return fBufType; }; | |
40 | virtual Int_t GetNelems() const { return fNelems; }; | |
41 | ||
42 | virtual Bool_t HasData() const { return fNtime ? 1 : 0; }; | |
f7336fa3 | 43 | |
44 | protected: | |
45 | ||
793ff80c | 46 | Int_t GetIdx1(Int_t row, Int_t col) const; |
acc49af9 | 47 | Int_t GetIdx1Unchecked(Int_t row, Int_t col) const |
a2b90f83 | 48 | { return row + col * fNrow; }; |
2745a409 | 49 | inline Bool_t CheckBounds(Int_t idx1, Int_t idx2); |
50 | inline Bool_t OutOfBoundsError(Int_t idx1, Int_t idx2); | |
f7336fa3 | 51 | |
52 | Int_t fNrow; // Number of rows of the detector segement | |
53 | Int_t fNcol; // Number of columns of the detector segment | |
54 | Int_t fNtime; // Number of timebins of the detector segment | |
55 | ||
56 | Int_t fNdim1; // First dimension of the array (row * column) | |
57 | Int_t fNdim2; // Second dimension of the array (time, not compressed) | |
f7336fa3 | 58 | |
f7336fa3 | 59 | AliTRDarrayI *fIndex; // Index position of column |
60 | Int_t fBufType; // Type of the buffer - defines the compression algorithm | |
f7336fa3 | 61 | Int_t fNelems; // Total number of elements |
62 | Int_t fCurrentIdx1; // !Current index 1 | |
63 | Int_t fCurrentIdx2; // !Current index 2 | |
64 | Int_t fCurrentIndex; // !Current index in field | |
65 | ||
66 | ClassDef(AliTRDdataArray,1) // Data container for one TRD detector segment | |
67 | ||
68 | }; | |
69 | ||
f7336fa3 | 70 | #endif |
71 |