]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/AliTRDarrayADC.h
Adding missing include
[u/mrichter/AliRoot.git] / TRD / AliTRDarrayADC.h
CommitLineData
b65e5048 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
16class 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];};
b72f4eaf 34 inline void GetData(Int_t r, Int_t c, Int_t t, Int_t n, Short_t *vals) const;
b65e5048 35 Short_t GetDataB(Int_t nrow, Int_t ncol, Int_t ntime) const;
36 UChar_t GetPadStatus(Int_t nrow, Int_t ncol, Int_t ntime) const;
37 void SetPadStatus(Int_t nrow, Int_t ncol, Int_t ntime, UChar_t status);
38 Bool_t IsPadCorrupted(Int_t nrow, Int_t ncol, Int_t ntime);
39 void Compress();
40 void Expand();
41 Int_t GetNtime() const {return fNtime;};
42 Int_t GetNrow() const {return fNrow;};
43 Int_t GetNcol() const {return fNcol;};
44 Int_t GetDim() const {return fNAdim;};
0d64b05f 45 void DeleteNegatives();
705d9e7b 46 void Reset();
b65e5048 47
48 protected:
49
50 Int_t fNdet; //ID number of the chamber
51 Int_t fNrow; //Number of rows
52 Int_t fNcol; //Number of columns
53 Int_t fNtime; //Number of time bins
54 Int_t fNAdim; //Dimension of the ADC array
55 Short_t* fADC; //[fNAdim] //Pointer to adc values
56
57 ClassDef(AliTRDarrayADC,1) //ADC container class
58
59};
b72f4eaf 60
61inline void AliTRDarrayADC::GetData(Int_t r, Int_t c, Int_t t, Int_t n, Short_t *vals) const
62{
63 for(Int_t ic=n, idx = (r*fNcol+c)*fNtime+t; ic--; idx+=fNtime) vals[ic] = fADC[idx];
64}
65
b65e5048 66#endif