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