]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/Cal/AliTRDCalPadStatus.h
TOF raw data format: updated version
[u/mrichter/AliRoot.git] / TRD / Cal / AliTRDCalPadStatus.h
CommitLineData
7754cd1f 1#ifndef ALITRDCALPADSTATUS_H
2#define ALITRDCALPADSTATUS_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
18class AliTRDCalPadStatus : public TNamed {
19
20 public:
21
22 enum { kNplan = 6, kNcham = 5, kNsect = 18, kNdet = 540 };
23 enum { kMasked = 2, kPadBridgedLeft = 4, kPadBridgedRight = 8 };
24
25 AliTRDCalPadStatus();
26 AliTRDCalPadStatus(const Text_t* name, const Text_t* title);
27 AliTRDCalPadStatus(const AliTRDCalPadStatus &c);
28 virtual ~AliTRDCalPadStatus();
29 AliTRDCalPadStatus &operator=(const AliTRDCalPadStatus &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 fROC[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 Bool_t IsBridgedLeft(Int_t d, Int_t col, Int_t row) const { return CheckStatus(d, col, row, kPadBridgedLeft); };
39 Bool_t IsBridgedRight(Int_t d, Int_t col, Int_t row) const { return CheckStatus(d, col, row, kPadBridgedRight); };
40 inline Bool_t CheckStatus(Int_t d, Int_t col, Int_t row, Int_t bitMask) const;
41
42 protected:
43
44 AliTRDCalSingleChamberStatus *fROC[kNdet]; // Array of ROC objects which contain the values per pad
45
46 ClassDef(AliTRDCalPadStatus,1) // TRD calibration class for MCM status
47
48};
49
50Bool_t AliTRDCalPadStatus::CheckStatus(Int_t d, Int_t col, Int_t row, Int_t bitMask) const
51{
52 AliTRDCalSingleChamberStatus* roc = GetCalROC(d);
53 if (!roc)
54 return kFALSE;
55
56 return (roc->GetStatus(col, row) & bitMask) ? kTRUE : kFALSE;
57}
58
59#endif