]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/Cal/AliTRDCalMCMStatus.h
Remove AliTRDv2
[u/mrichter/AliRoot.git] / TRD / Cal / AliTRDCalMCMStatus.h
1 #ifndef ALITRDCALMCMSTATUS_H
2 #define ALITRDCALMCMSTATUS_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 MCM status                                     //
11 //                                                                           //
12 ///////////////////////////////////////////////////////////////////////////////
13
14 #include "TNamed.h"
15 #include "AliTRDgeometry.h"
16 #include "AliTRDCalSingleChamberStatus.h"
17
18 class AliTRDCalMCMStatus : public TNamed {
19
20  public:
21  
22   enum { kNplan = 6, kNcham = 5, kNsect = 18, kNdet = 540 };
23   enum { kMasked = 2, kMCMTemperatureBit1 = 4, kMBMTemperatureBit2 = 8 };
24
25   AliTRDCalMCMStatus();
26   AliTRDCalMCMStatus(const Text_t* name, const Text_t* title);
27   AliTRDCalMCMStatus(const AliTRDCalMCMStatus &c);   
28   virtual ~AliTRDCalMCMStatus();
29   AliTRDCalMCMStatus &operator=(const AliTRDCalMCMStatus &c);
30
31   virtual void     Copy(TObject &c) const;
32
33   AliTRDCalSingleChamberStatus *GetCalROC(Int_t d) const { return fROC[d]; };
34   AliTRDCalSingleChamberStatus *GetCalROC(Int_t p, Int_t c, Int_t s) const
35                                                { return GetCalROC(AliTRDgeometry::GetDetector(p,c,s)); };
36
37   Bool_t IsMasked(Int_t d, Int_t col, Int_t row) const { return CheckStatus(d, col, row, kMasked); };
38   inline Bool_t CheckStatus(Int_t d, Int_t col, Int_t row, Int_t bitMask) const;
39
40  protected:
41
42   AliTRDCalSingleChamberStatus *fROC[kNdet];          //  Array of ROC objects which contain the values per pad
43
44   ClassDef(AliTRDCalMCMStatus,1)                      //  TRD calibration class for MCM status
45
46 };
47
48 Bool_t AliTRDCalMCMStatus::CheckStatus(Int_t d, Int_t col, Int_t row, Int_t bitMask) const
49 {
50   AliTRDCalSingleChamberStatus* roc = GetCalROC(d);
51   if (!roc)
52     return kFALSE;
53     
54   return (roc->GetStatus(col, row) & bitMask) ? kTRUE : kFALSE;
55 }
56
57 #endif