Line data Source code
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 :
8 : ////////////////////////////////////////////////////////////////////////////
9 : // //
10 : // TRD calibration base class containing status values for one ROC //
11 : // //
12 : ////////////////////////////////////////////////////////////////////////////
13 :
14 : #include <TObject.h>
15 :
16 : //_____________________________________________________________________________
17 : class AliTRDCalSingleChamberStatus : public TObject {
18 :
19 : public:
20 :
21 : enum { kMasked = 2
22 : , kPadBridgedLeft = 4
23 : , kPadBridgedRight = 8
24 : , kReadSecond = 16
25 : , kNotConnected = 32};
26 :
27 : AliTRDCalSingleChamberStatus();
28 : AliTRDCalSingleChamberStatus(Int_t p, Int_t c, Int_t cols);
29 : AliTRDCalSingleChamberStatus(const AliTRDCalSingleChamberStatus &c);
30 : virtual ~AliTRDCalSingleChamberStatus();
31 : AliTRDCalSingleChamberStatus &operator=(const AliTRDCalSingleChamberStatus &c);
32 :
33 : virtual void Copy(TObject &c) const;
34 :
35 0 : Bool_t IsMasked(Int_t col, Int_t row) const { return ((GetStatus(col,row) & kMasked)
36 : ? kTRUE
37 : : kFALSE); };
38 0 : Bool_t IsBridgedLeft(Int_t col, Int_t row) const { return ((GetStatus(col, row) & kPadBridgedLeft) ? kTRUE : kFALSE); };
39 0 : Bool_t IsBridgedRight(Int_t col, Int_t row) const { return ((GetStatus(col, row) & kPadBridgedRight) ? kTRUE : kFALSE); };
40 0 : Bool_t IsNotConnected(Int_t col, Int_t row) const { return ((GetStatus(col, row) & kNotConnected) ? kTRUE : kFALSE); };
41 0 : Int_t GetNrows() const { return fNrows; };
42 0 : Int_t GetNcols() const { return fNcols; };
43 :
44 1820808 : Int_t GetChannel(Int_t col, Int_t row) const { return row+col*fNrows; };
45 0 : Int_t GetNchannels() const { return fNchannels; };
46 0 : Char_t GetStatus(Int_t ich) const { return fData[ich]; };
47 1820808 : Char_t GetStatus(Int_t col, Int_t row) const { return fData[GetChannel(col,row)]; };
48 :
49 0 : void SetStatus(Int_t ich, Char_t vd) { fData[ich] = vd; };
50 0 : void SetStatus(Int_t col, Int_t row, Char_t vd) { fData[GetChannel(col,row)] = vd; };
51 :
52 : protected:
53 :
54 : Int_t fPla; // Plane number
55 : Int_t fCha; // Chamber number
56 :
57 : Int_t fNrows; // Number of rows
58 : Int_t fNcols; // Number of columns
59 :
60 : Int_t fNchannels; // Number of channels
61 : Char_t *fData; //[fNchannels] Data
62 :
63 3294 : ClassDef(AliTRDCalSingleChamberStatus,1) // TRD ROC calibration class
64 :
65 : };
66 :
67 : #endif
|