]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/Cal/AliTRDCalSingleChamberStatus.h
AliMUONBlockHeader, AliMUONRawWriter:
[u/mrichter/AliRoot.git] / TRD / Cal / AliTRDCalSingleChamberStatus.h
CommitLineData
7754cd1f 1#ifndef AliTRDCalSingleChamberStatus_H
2#define AliTRDCalSingleChamberStatus_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id: AliTRDCalSingleChamberStatus.h,v */
7
2745a409 8////////////////////////////////////////////////////////////////////////////
9// //
10// TRD calibration base class containing status values for one ROC //
11// //
12////////////////////////////////////////////////////////////////////////////
7754cd1f 13
14#include <TObject.h>
15
16//_____________________________________________________________________________
17class AliTRDCalSingleChamberStatus : public TObject {
18
19 public:
20
0e09df31 21 enum { kMasked = 2
22 , kPadBridgedLeft = 4
23 , kPadBridgedRight = 8
24 , kReadSecond = 16 };
25
7754cd1f 26 AliTRDCalSingleChamberStatus();
27 AliTRDCalSingleChamberStatus(Int_t p, Int_t c, Int_t cols);
28 AliTRDCalSingleChamberStatus(const AliTRDCalSingleChamberStatus &c);
2745a409 29 virtual ~AliTRDCalSingleChamberStatus();
30 AliTRDCalSingleChamberStatus &operator=(const AliTRDCalSingleChamberStatus &c);
7754cd1f 31
2745a409 32 virtual void Copy(TObject &c) const;
7754cd1f 33
0e09df31 34 Bool_t IsMasked(Int_t col, Int_t row) const { return ((GetStatus(col,row) & kMasked)
35 ? kTRUE
36 : kFALSE); };
37
38 Int_t GetNrows() const { return fNrows; };
39 Int_t GetNcols() const { return fNcols; };
7754cd1f 40
0e09df31 41 Int_t GetChannel(Int_t col, Int_t row) const { return row+col*fNrows; };
42 Int_t GetNchannels() const { return fNchannels; };
43 Char_t GetStatus(Int_t ich) const { return fData[ich]; };
44 Char_t GetStatus(Int_t col, Int_t row) const { return fData[GetChannel(col,row)]; };
2745a409 45
0e09df31 46 void SetStatus(Int_t ich, Char_t vd) { fData[ich] = vd; };
47 void SetStatus(Int_t col, Int_t row, Char_t vd) { fData[GetChannel(col,row)] = vd; };
7754cd1f 48
49 protected:
50
2745a409 51 Int_t fPla; // Plane number
52 Int_t fCha; // Chamber number
7754cd1f 53
2745a409 54 Int_t fNrows; // Number of rows
55 Int_t fNcols; // Number of columns
7754cd1f 56
2745a409 57 Int_t fNchannels; // Number of channels
58 Char_t *fData; //[fNchannels] Data
7754cd1f 59
2745a409 60 ClassDef(AliTRDCalSingleChamberStatus,1) // TRD ROC calibration class
7754cd1f 61
62};
63
64#endif