Adding macros to create Calibration objects
[u/mrichter/AliRoot.git] / TRD / TRDbase / AliTRDCalChamberStatus.h
CommitLineData
2e32a5ae 1#ifndef ALITRDCalChamberStatus_H
2#define ALITRDCalChamberStatus_H
7754cd1f 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// //
2745a409 10// TRD calibration class for the status of a readout chamber //
7754cd1f 11// //
12///////////////////////////////////////////////////////////////////////////////
13
b2277aa2 14#include <Rtypes.h>
7754cd1f 15#include "TNamed.h"
16
6c1053a8 17class TH2D;
7754cd1f 18class AliTRDCalChamberStatus : public TNamed {
2745a409 19
20 public:
21
22 enum { kNdet = 540, kNstacks = 90, kNcham = 5, kNsect = 18 };
67abca5c 23 enum { kGood = 0, kNoData = 1, kNoDataHalfChamberSideA = 2, kNoDataHalfChamberSideB = 3, kBadCalibrated = 4, kNotCalibrated = 5};
7754cd1f 24
2745a409 25 AliTRDCalChamberStatus();
26 AliTRDCalChamberStatus(const Text_t* name, const Text_t* title);
27
28 Char_t GetStatus(Int_t det) const { return fStatus[det]; };
b2277aa2 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); }
67abca5c 37 Bool_t IsNotCalibrated(Int_t det) const { return TESTBIT(fStatus[det], kNotCalibrated); }
b2277aa2 38
39 TH2D *Plot(Int_t sm, Int_t rphi); // Plot fStatus for sm and halfchamberside
40 TH2D *PlotNoData(Int_t sm, Int_t rphi); // Plot data status for sm and halfchamberside
41 TH2D *PlotBadCalibrated(Int_t sm, Int_t rphi); // Plot calibration status for sm and halfchamberside
42 TH2D *Plot(Int_t sm); // Plot fStatus for sm
6c1053a8 43
44
2745a409 45 protected:
7754cd1f 46
2745a409 47 Char_t fStatus[kNdet]; // Status byte
7754cd1f 48
2745a409 49 ClassDef(AliTRDCalChamberStatus,1) // Defines the status of a single readout chamber
7754cd1f 50
7754cd1f 51};
52
e5ba3dfd 53#endif