]>
Commit | Line | Data |
---|---|---|
b65e5048 | 1 | #ifndef ALITRDARRAYSIGNAL_H |
2 | #define ALITRDARRAYSIGNAL_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id: AliTRDarraySignal.h 23387 2008-01-17 17:25:16Z cblume $ */ | |
7 | ||
8 | ///////////////////////////////////////////// | |
9 | // // | |
10 | // Container Class for Signals // | |
11 | // // | |
12 | ///////////////////////////////////////////// | |
13 | ||
14 | #include <TObject.h> | |
15 | ||
16 | class AliTRDarraySignal: public TObject | |
17 | { | |
18 | ||
19 | public: | |
20 | ||
21 | AliTRDarraySignal(); | |
22 | AliTRDarraySignal(Int_t nrow, Int_t ncol,Int_t ntime); | |
23 | AliTRDarraySignal(const AliTRDarraySignal &d); | |
24 | ~AliTRDarraySignal(); | |
25 | AliTRDarraySignal &operator=(const AliTRDarraySignal &d); | |
26 | ||
27 | void Allocate(Int_t nrow, Int_t ncol, Int_t ntime); | |
28 | void SetNdet(Int_t ndet) {fNdet=ndet;}; | |
29 | Int_t GetNdet() const {return fNdet;}; | |
30 | Int_t GetNrow() const {return fNrow;}; | |
31 | Int_t GetNcol() const {return fNcol;}; | |
32 | Int_t GetNtime() const {return fNtime;}; | |
33 | Float_t GetData(Int_t row, Int_t col, Int_t time) const | |
34 | {return fSignal[(row*fNcol+col)*fNtime+time];}; | |
35 | void SetData(Int_t row, Int_t col, Int_t time, Float_t value) | |
36 | {fSignal[(row*fNcol+col)*fNtime+time]=value;}; | |
37 | Bool_t HasData() const {return fNtime ? 1 : 0;}; | |
38 | Int_t GetDim() const {return fNdim;}; | |
39 | Int_t GetOverThreshold(Float_t threshold); | |
40 | void Compress(Float_t minval); | |
41 | void Expand(); | |
705d9e7b | 42 | void Reset(); |
b65e5048 | 43 | |
44 | protected: | |
45 | ||
46 | Int_t fNdet; //ID number of the chamber | |
47 | Int_t fNrow; //Number of rows of the chamber | |
48 | Int_t fNcol; //Number of columns of the chamber | |
49 | Int_t fNtime; //Number of time bins | |
50 | Int_t fNdim; //Dimension of the array | |
51 | Float_t *fSignal; //[fNdim] //Pointer to signals | |
52 | ||
53 | ClassDef(AliTRDarraySignal,1) //Signal container class | |
54 | ||
55 | }; | |
56 | #endif |