]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/Cal/AliTRDCalChamberStatus.h
- coverity fixes
[u/mrichter/AliRoot.git] / TRD / Cal / AliTRDCalChamberStatus.h
1 #ifndef ALITRDCalChamberStatus_H
2 #define ALITRDCalChamberStatus_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id$ */
7
8 ///////////////////////////////////////////////////////////////////////////////
9 //                                                                           //
10 //  TRD calibration class for the status of a readout chamber                //
11 //                                                                           //
12 ///////////////////////////////////////////////////////////////////////////////
13
14 #include <Rtypes.h>
15 #include "TNamed.h"
16
17 class TH2D;
18 class AliTRDCalChamberStatus : public TNamed {
19
20  public:
21
22   enum { kNdet = 540, kNstacks = 90, kNcham = 5, kNsect = 18 };
23   enum { kGood = 0, kNoData = 1, kNoDataHalfChamberSideA = 2, kNoDataHalfChamberSideB = 3, kBadCalibrated = 4};
24   
25   AliTRDCalChamberStatus();
26   AliTRDCalChamberStatus(const Text_t* name, const Text_t* title);
27
28   Char_t GetStatus(Int_t det) const          { return fStatus[det];   };
29   void   SetStatus(Int_t det, Char_t status);
30   void   UnsetStatusBit(Int_t det, Char_t status);
31
32   Bool_t IsGood(Int_t det) const             { return TESTBIT(fStatus[det], kGood);                   }
33   Bool_t IsNoData(Int_t det) const           { return TESTBIT(fStatus[det], kNoData);                 }
34   Bool_t IsNoDataSideA(Int_t det) const      { return TESTBIT(fStatus[det], kNoDataHalfChamberSideA); }
35   Bool_t IsNoDataSideB(Int_t det) const      { return TESTBIT(fStatus[det], kNoDataHalfChamberSideB); }
36   Bool_t IsBadCalibrated(Int_t det) const    { return TESTBIT(fStatus[det], kBadCalibrated);          }
37
38  TH2D *Plot(Int_t sm, Int_t rphi);           // Plot fStatus for sm and halfchamberside  
39  TH2D *PlotNoData(Int_t sm, Int_t rphi);     // Plot data status for sm and halfchamberside  
40  TH2D *PlotBadCalibrated(Int_t sm, Int_t rphi); // Plot calibration status for sm and halfchamberside  
41  TH2D *Plot(Int_t sm);                       // Plot fStatus for sm 
42
43
44  protected:
45
46   Char_t fStatus[kNdet];                    //  Status byte
47
48   ClassDef(AliTRDCalChamberStatus,1)        //  Defines the status of a single readout chamber
49
50 };
51
52 #endif