]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/Cal/AliTRDCalSingleChamberStatus.h
Switch to the new raw reader (Julian, Raphaelle)
[u/mrichter/AliRoot.git] / TRD / Cal / AliTRDCalSingleChamberStatus.h
CommitLineData
c893147d 1#ifndef ALITRDCALSINGLECHAMBERSTATUS_H
2#define ALITRDCALSINGLECHAMBERSTATUS_H
7754cd1f 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
fa7427d0 24 , kReadSecond = 16
c893147d 25 , kNotConnected = 32};
0e09df31 26
7754cd1f 27 AliTRDCalSingleChamberStatus();
28 AliTRDCalSingleChamberStatus(Int_t p, Int_t c, Int_t cols);
29 AliTRDCalSingleChamberStatus(const AliTRDCalSingleChamberStatus &c);
2745a409 30 virtual ~AliTRDCalSingleChamberStatus();
31 AliTRDCalSingleChamberStatus &operator=(const AliTRDCalSingleChamberStatus &c);
7754cd1f 32
2745a409 33 virtual void Copy(TObject &c) const;
7754cd1f 34
0e09df31 35 Bool_t IsMasked(Int_t col, Int_t row) const { return ((GetStatus(col,row) & kMasked)
36 ? kTRUE
37 : kFALSE); };
fa7427d0 38 Bool_t IsBridgedLeft(Int_t col, Int_t row) const { return ((GetStatus(col, row) & kPadBridgedLeft) ? kTRUE : kFALSE); };
39 Bool_t IsBridgedRight(Int_t col, Int_t row) const { return ((GetStatus(col, row) & kPadBridgedRight) ? kTRUE : kFALSE); };
40 Bool_t IsNotConnected(Int_t col, Int_t row) const { return ((GetStatus(col, row) & kNotConnected) ? kTRUE : kFALSE); };
0e09df31 41 Int_t GetNrows() const { return fNrows; };
42 Int_t GetNcols() const { return fNcols; };
7754cd1f 43
0e09df31 44 Int_t GetChannel(Int_t col, Int_t row) const { return row+col*fNrows; };
45 Int_t GetNchannels() const { return fNchannels; };
46 Char_t GetStatus(Int_t ich) const { return fData[ich]; };
47 Char_t GetStatus(Int_t col, Int_t row) const { return fData[GetChannel(col,row)]; };
2745a409 48
0e09df31 49 void SetStatus(Int_t ich, Char_t vd) { fData[ich] = vd; };
50 void SetStatus(Int_t col, Int_t row, Char_t vd) { fData[GetChannel(col,row)] = vd; };
7754cd1f 51
52 protected:
53
2745a409 54 Int_t fPla; // Plane number
55 Int_t fCha; // Chamber number
7754cd1f 56
2745a409 57 Int_t fNrows; // Number of rows
58 Int_t fNcols; // Number of columns
7754cd1f 59
2745a409 60 Int_t fNchannels; // Number of channels
61 Char_t *fData; //[fNchannels] Data
7754cd1f 62
2745a409 63 ClassDef(AliTRDCalSingleChamberStatus,1) // TRD ROC calibration class
7754cd1f 64
65};
66
67#endif