]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/Cal/AliTRDCalSingleChamberStatus.h
Making online tracklets usable in offline reconstruction
[u/mrichter/AliRoot.git] / TRD / Cal / AliTRDCalSingleChamberStatus.h
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
28   AliTRDCalSingleChamberStatus();
29   AliTRDCalSingleChamberStatus(Int_t p, Int_t c, Int_t cols);
30   AliTRDCalSingleChamberStatus(const AliTRDCalSingleChamberStatus &c);
31   virtual                      ~AliTRDCalSingleChamberStatus();
32   AliTRDCalSingleChamberStatus &operator=(const AliTRDCalSingleChamberStatus &c);
33
34   virtual void    Copy(TObject &c) const;
35
36           Bool_t  IsMasked(Int_t col, Int_t row) const       { return ((GetStatus(col,row) & kMasked) 
37                                                                        ? kTRUE 
38                                                                        : kFALSE);                 };
39           Bool_t  IsBridgedLeft(Int_t col, Int_t row) const  { return ((GetStatus(col, row) & kPadBridgedLeft)                                            ? kTRUE                                                                         : kFALSE);                 };
40           Bool_t  IsBridgedRight(Int_t col, Int_t row) const { return ((GetStatus(col, row) & kPadBridgedRight)                                           ? kTRUE                                                                         : kFALSE);                 };
41           Bool_t  IsNotConnected(Int_t col, Int_t row) const { return ((GetStatus(col, row) & kNotConnected)                                           ? kTRUE                                                                         : kFALSE);                 };
42           Int_t   GetNrows() const                           { return fNrows;                     };
43           Int_t   GetNcols() const                           { return fNcols;                     };
44
45           Int_t   GetChannel(Int_t col, Int_t row) const     { return row+col*fNrows;             };
46           Int_t   GetNchannels() const                       { return fNchannels;                 };
47           Char_t  GetStatus(Int_t ich) const                 { return fData[ich];                 };
48           Char_t  GetStatus(Int_t col, Int_t row) const      { return fData[GetChannel(col,row)]; };
49
50           void    SetStatus(Int_t ich, Char_t vd)            { fData[ich] = vd;                   };
51           void    SetStatus(Int_t col, Int_t row, Char_t vd) { fData[GetChannel(col,row)] = vd;   };
52
53  protected:
54
55           Int_t   fPla;                    //  Plane number
56           Int_t   fCha;                    //  Chamber number
57
58           Int_t   fNrows;                  //  Number of rows
59           Int_t   fNcols;                  //  Number of columns
60
61           Int_t   fNchannels;              //  Number of channels
62           Char_t *fData;                   //[fNchannels] Data
63
64   ClassDef(AliTRDCalSingleChamberStatus,1) //  TRD ROC calibration class
65
66 };
67
68 #endif