]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/AliTRDarraySignal.h
Add new online gain tables
[u/mrichter/AliRoot.git] / TRD / AliTRDarraySignal.h
CommitLineData
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
16class 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;};
acf20e8f 33 Float_t GetDataByAdcCol(Int_t row, Int_t col, Int_t time) const
34 {return fSignal[(row*fNumberOfChannels+col)*fNtime+time];};
35 void SetDataByAdcCol(Int_t row, Int_t col, Int_t time, Float_t value)
36 {fSignal[(row*fNumberOfChannels+col)*fNtime+time]=value;};
b65e5048 37 Bool_t HasData() const {return fNtime ? 1 : 0;};
38 Int_t GetDim() const {return fNdim;};
f41a4d6a 39 Int_t GetOverThreshold(Float_t threshold) const;
b65e5048 40 void Compress(Float_t minval);
41 void Expand();
705d9e7b 42 void Reset();
acf20e8f 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();
b65e5048 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
acf20e8f 52 Int_t fNumberOfChannels; // Number of MCM channels per row
b65e5048 53 Int_t fNtime; //Number of time bins
54 Int_t fNdim; //Dimension of the array
acf20e8f 55 Float_t *fSignal; //[fNdim] //Pointer to signals
f41a4d6a 56 static Short_t *fgLutPadNumbering; // [fNcol] Look Up Table
b65e5048 57
f41a4d6a 58 ClassDef(AliTRDarraySignal,3) //Signal container class
b65e5048 59
60};
61#endif