]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TRD/Cal/AliTRDCalChamberStatus.h
Move JETANdev to JETAN (step 3)
[u/mrichter/AliRoot.git] / TRD / Cal / AliTRDCalChamberStatus.h
index 7a063c20f40bbddd9bfe16626c606850e0235402..3afade0f96342b932f177c453405251d891a9d7c 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef AliTRDCalChamberStatus_H
-#define AliTRDCalChamberStatus_H
+#ifndef ALITRDCalChamberStatus_H
+#define ALITRDCalChamberStatus_H
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
 
@@ -7,30 +7,47 @@
 
 ///////////////////////////////////////////////////////////////////////////////
 //                                                                           //
-//  TRD calibration class for status of supermodules                         //
+//  TRD calibration class for the status of a readout chamber                //
 //                                                                           //
 ///////////////////////////////////////////////////////////////////////////////
 
+#include <Rtypes.h>
 #include "TNamed.h"
 
+class TH2D;
 class AliTRDCalChamberStatus : public TNamed {
-  public:
-    enum { kNdet = 540, kNstacks = 90, kNcham = 5, kNsect = 18 };
-    enum { kInstalled = 1, kMasked = 2 };
+
+ public:
+
+  enum { kNdet = 540, kNstacks = 90, kNcham = 5, kNsect = 18 };
+  enum { kGood = 0, kNoData = 1, kNoDataHalfChamberSideA = 2, kNoDataHalfChamberSideB = 3, kBadCalibrated = 4, kNotCalibrated = 5};
   
-    AliTRDCalChamberStatus();
-    AliTRDCalChamberStatus(const Text_t* name, const Text_t* title);
+  AliTRDCalChamberStatus();
+  AliTRDCalChamberStatus(const Text_t* name, const Text_t* title);
+
+  Char_t GetStatus(Int_t det) const          { return fStatus[det];   };
+  void   SetStatus(Int_t det, Char_t status);
+  void   UnsetStatusBit(Int_t det, Char_t status);
+
+  Bool_t IsGood(Int_t det) const             { return TESTBIT(fStatus[det], kGood);                   }
+  Bool_t IsNoData(Int_t det) const           { return TESTBIT(fStatus[det], kNoData);                 }
+  Bool_t IsNoDataSideA(Int_t det) const      { return TESTBIT(fStatus[det], kNoDataHalfChamberSideA); }
+  Bool_t IsNoDataSideB(Int_t det) const      { return TESTBIT(fStatus[det], kNoDataHalfChamberSideB); }
+  Bool_t IsBadCalibrated(Int_t det) const    { return TESTBIT(fStatus[det], kBadCalibrated);          }
+  Bool_t IsNotCalibrated(Int_t det) const    { return TESTBIT(fStatus[det], kNotCalibrated);          }
+
+ TH2D *Plot(Int_t sm, Int_t rphi);           // Plot fStatus for sm and halfchamberside  
+ TH2D *PlotNoData(Int_t sm, Int_t rphi);     // Plot data status for sm and halfchamberside  
+ TH2D *PlotBadCalibrated(Int_t sm, Int_t rphi); // Plot calibration status for sm and halfchamberside  
+ TH2D *Plot(Int_t sm);                       // Plot fStatus for sm 
+
 
-    const Char_t GetStatus(Int_t det) const { return fStatus[det]; };
-    void SetStatus(Int_t det, Char_t status) { fStatus[det] = status; };
+ protected:
 
-    Bool_t IsInstalled(Int_t sm) const { return (GetStatus(sm) & kInstalled) ? kTRUE : kFALSE; }
-    Bool_t IsMasked(Int_t sm) const { return (GetStatus(sm) & kMasked) ? kTRUE : kFALSE; }
+  Char_t fStatus[kNdet];                    //  Status byte
 
-  protected:
-    Char_t fStatus[kNdet];                    //  status byte
+  ClassDef(AliTRDCalChamberStatus,1)        //  Defines the status of a single readout chamber
 
-    ClassDef(AliTRDCalChamberStatus,1)
 };
 
 #endif