]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/AliTRDarrayADC.h
Introduce new digits structures by Hermes with ZS in digitzer stage
[u/mrichter/AliRoot.git] / TRD / AliTRDarrayADC.h
1 #ifndef ALITRDARRAYADC_H
2 #define ALITRDARRAYADC_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * 
4  * See cxx source for full Copyright notice */ 
5
6 /* $Id: AliTRDarrayADC.h 23387 2008-01-17 17:25:16Z cblume $ */
7
8 ///////////////////////////////////////////////
9 //                                           //
10 // Container class for ADC values            //
11 //                                           // 
12 ///////////////////////////////////////////////
13
14 #include <TObject.h>
15
16 class AliTRDarrayADC: public TObject
17 {
18  public:
19
20   AliTRDarrayADC();
21   AliTRDarrayADC(Int_t nrow, Int_t ncol, Int_t ntime);
22   AliTRDarrayADC(const AliTRDarrayADC &b);
23   ~AliTRDarrayADC();
24   AliTRDarrayADC &operator=(const AliTRDarrayADC &b);
25
26   void    Allocate(Int_t nrow, Int_t ncol, Int_t ntime);
27   void    SetNdet(Int_t ndet) {fNdet=ndet;};  
28   Int_t   GetNdet()  const {return fNdet;};
29   void    SetData(Int_t nrow, Int_t ncol, Int_t ntime, Short_t value)
30                         {fADC[(nrow*fNcol+ncol)*fNtime+ntime]=value;};
31   Bool_t  HasData() const {return fNtime ? 1 : 0;};
32   Short_t GetData(Int_t nrow, Int_t ncol, Int_t ntime) const
33                        {return fADC[(nrow*fNcol+ncol)*fNtime+ntime];};
34   Short_t GetDataB(Int_t nrow, Int_t ncol, Int_t ntime) const;
35   UChar_t GetPadStatus(Int_t nrow, Int_t ncol, Int_t ntime) const;
36   void    SetPadStatus(Int_t nrow, Int_t ncol, Int_t ntime, UChar_t status);
37   Bool_t  IsPadCorrupted(Int_t nrow, Int_t ncol, Int_t ntime);
38   void    Compress();
39   void    Expand();
40   Int_t   GetNtime() const {return fNtime;};
41   Int_t   GetNrow() const {return fNrow;};
42   Int_t   GetNcol() const {return fNcol;};
43   Int_t   GetDim() const {return fNAdim;};
44
45  protected:
46
47   Int_t fNdet;    //ID number of the chamber
48   Int_t fNrow;    //Number of rows
49   Int_t fNcol;    //Number of columns
50   Int_t fNtime;   //Number of time bins
51   Int_t fNAdim;   //Dimension of the ADC array
52   Short_t* fADC;  //[fNAdim]   //Pointer to adc values
53
54   ClassDef(AliTRDarrayADC,1) //ADC container class
55     
56 };
57 #endif