]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/TRDbase/AliTRDarrayDictionary.h
TRD module
[u/mrichter/AliRoot.git] / TRD / TRDbase / AliTRDarrayDictionary.h
CommitLineData
a65a7e70 1#ifndef ALITRDARRAYDICTIONARY_H
2#define ALITRDARRAYDICTIONARY_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id: AliTRDarrayDictionary.h 23387 2008-01-17 17:25:16Z cblume $ */
7
8///////////////////////////////////////////////////
9// //
10// Container Class for Dictionary Info //
11// //
12///////////////////////////////////////////////////
13
14#include <TObject.h>
15
16class AliTRDarrayDictionary: public TObject
17{
18
19 public:
20
21 AliTRDarrayDictionary();
22 AliTRDarrayDictionary(Int_t nrow, Int_t ncol, Int_t ntime);
23 AliTRDarrayDictionary(const AliTRDarrayDictionary &a);
24 ~AliTRDarrayDictionary();
25 AliTRDarrayDictionary &operator=(const AliTRDarrayDictionary &a);
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 void SetDataByAdcCol(Int_t nrow, Int_t ncol, Int_t ntime, Int_t value)
31 {fDictionary[(nrow*fNumberOfChannels+ncol)*fNtime+ntime]=value;};
32 Int_t GetDataByAdcCol(Int_t nrow, Int_t ncol, Int_t ntime) const
33 {return fDictionary[(nrow*fNumberOfChannels+ncol)*fNtime+ntime];};
34 Int_t GetDim() const {return fNDdim;};
35 void Compress();
36 void Expand();
37 void Reset();
38 Int_t GetData(Int_t nrow, Int_t ncol, Int_t ntime) const;
39 void SetData(Int_t nrow, Int_t ncol, Int_t ntime, Int_t value);
40 static void CreateLut();
41 Bool_t WasExpandCalled() const {return fFlag;};
42
43 protected:
44
45 Int_t fNdet; //ID number of the chamber
46 Int_t fNrow; //Number of rows
47 Int_t fNcol; //Number of columns
48 Int_t fNumberOfChannels; // Number of MCM channels per row
49 Int_t fNtime; //Number of time bins
50 Int_t fNDdim; //Dimension of the Dictionary array
51 Int_t* fDictionary; //[fNDdim] //Pointer to integers array
52 Bool_t fFlag; //! Has Expand() being called before?
53 static Short_t *fgLutPadNumbering; // [fNcol] Look Up Table
54
55 ClassDef(AliTRDarrayDictionary,7) //Dictionary container class
56
57};
58#endif