Project
Loading...
Searching...
No Matches
ChamberStatus.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
12#ifndef O2_TRD_CHAMBERSTATUS_H
13#define O2_TRD_CHAMBERSTATUS_H
14
16// //
17// Store the status of all the readout chambers across the TRD //
18// 2019 - Ported from various bits of AliRoot (SHTM) //
19// Most things were stored in AliTRDcalROC,AliTRDcalPad, AliTRDcalDet //
20// Note to old aliroot:
21// This is analgous to
23
24#include <array>
25#include "Rtypes.h"
27class TH2D;
28
29namespace o2
30{
31namespace trd
32{
33
35{
36 public:
37 enum {
38 Good = 1 << 0,
39 NoData = 1 << 1,
42 BadCalibrated = 1 << 4,
43 NotCalibrated = 1 << 5
44 };
45
46 ChamberStatus() = default;
47 ~ChamberStatus() = default;
48 //
49 char getStatus(int det) const { return mStatus[det]; }
50 void setStatus(int det, char bit);
51 void setRawStatus(int det, char status) { mStatus[det] = status; };
52 bool isGood(int det) const { return (mStatus[det] & Good); }
53 bool isNoData(int det) const { return (mStatus[det] & NoData); }
54 bool isNoDataSideA(int det) const { return (mStatus[det] & NoDataHalfChamberSideA); }
55 bool isNoDataSideB(int det) const { return (mStatus[det] & NoDataHalfChamberSideB); }
56 bool isBadCalibrated(int det) const { return (mStatus[det] & BadCalibrated); }
57 bool isNotCalibrated(int det) const { return (mStatus[det] & NotCalibrated); }
58
59 TH2D* plot(int sm, int rphi); // Plot mStatus for sm and halfchamberside
60 TH2D* plotNoData(int sm, int rphi); // Plot data status for sm and halfchamberside
61 TH2D* plotBadCalibrated(int sm, int rphi); // Plot calibration status for sm and halfchamberside
62 TH2D* plot(int sm); // Plot mStatus for sm
63 private:
64 std::array<char, constants::MAXCHAMBER> mStatus{};
65 ClassDefNV(ChamberStatus, 1);
66};
67} // namespace trd
68} // namespace o2
69#endif
Global TRD definitions and constants.
bool isNoDataSideB(int det) const
bool isGood(int det) const
bool isNoDataSideA(int det) const
TH2D * plotBadCalibrated(int sm, int rphi)
bool isNotCalibrated(int det) const
void setStatus(int det, char bit)
bool isBadCalibrated(int det) const
void setRawStatus(int det, char status)
TH2D * plot(int sm, int rphi)
TH2D * plotNoData(int sm, int rphi)
bool isNoData(int det) const
char getStatus(int det) const
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...