Line data Source code
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 9392 : void SetNdet(Int_t ndet) {fNdet=ndet;};
29 0 : Int_t GetNdet() const {return fNdet;};
30 376 : Int_t GetNrow() const {return fNrow;};
31 376 : Int_t GetNcol() const {return fNcol;};
32 4696 : Int_t GetNtime() const {return fNtime;};
33 : Float_t GetDataByAdcCol(Int_t row, Int_t col, Int_t time) const
34 0 : {return fSignal[(row*fNumberOfChannels+col)*fNtime+time];};
35 : void SetDataByAdcCol(Int_t row, Int_t col, Int_t time, Float_t value)
36 0 : {fSignal[(row*fNumberOfChannels+col)*fNtime+time]=value;};
37 5072 : Bool_t HasData() const {return fNtime ? 1 : 0;};
38 0 : Int_t GetDim() const {return fNdim;};
39 : Int_t GetOverThreshold(Float_t threshold) const;
40 : void Compress(Float_t minval);
41 : void Expand();
42 : void Reset();
43 : Float_t GetData(Int_t nrow, Int_t ncol, Int_t ntime) const;
44 : void SetData(Int_t nrow, Int_t ncol, Int_t ntime, Float_t value);
45 : static void CreateLut();
46 :
47 : protected:
48 :
49 : Int_t fNdet; //ID number of the chamber
50 : Int_t fNrow; //Number of rows of the chamber
51 : Int_t fNcol; //Number of columns of the chamber
52 : Int_t fNumberOfChannels; // Number of MCM channels per row
53 : Int_t fNtime; //Number of time bins
54 : Int_t fNdim; //Dimension of the array
55 : Float_t *fSignal; //[fNdim] //Pointer to signals
56 : static Short_t *fgLutPadNumbering; // [fNcol] Look Up Table
57 :
58 58 : ClassDef(AliTRDarraySignal,3) //Signal container class
59 :
60 : };
61 : #endif
|