Project
Loading...
Searching...
No Matches
StatusHelper.cxx
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
15
16#include "TRDQC/StatusHelper.h"
18#include <fairlogger/Logger.h>
19
20using namespace o2::trd;
21
22void HalfChamberStatusQC::maskChamber(int sec, int stack, int ly)
23{
24 int det = HelperMethods::getDetector(sec, stack, ly);
25 mStatus.set(det * 2);
26 mStatus.set(det * 2 + 1);
27}
28
30{
31 int det = HelperMethods::getDetector(sec, stack, ly);
32 mStatus.set(det * 2);
33}
34
36{
37 int det = HelperMethods::getDetector(sec, stack, ly);
38 mStatus.set(det * 2 + 1);
39}
40
42{
43 LOG(info) << "The following half-chambers are masked:";
44 for (int iHc = 0; iHc < constants::MAXHALFCHAMBER; ++iHc) {
45 if (mStatus.test(iHc)) {
46 char side = (iHc % 2 == 0) ? 'A' : 'B'; // 0 - side A, 1 - side B
47 int det = iHc / 2;
48 int sec = HelperMethods::getSector(det);
51 if (side == 'A' && mStatus.test(iHc + 1)) {
52 // full chamber is masked
53 LOGF(info, "%02d_%d_%d", sec, stack, layer);
54 iHc++;
55 } else {
56 LOGF(info, "%02d_%d_%d_%c", sec, stack, layer, side);
57 }
58 }
59 }
60}
uint32_t side
Definition RawData.h:0
uint32_t stack
Definition RawData.h:1
Helper with 'permanent' status of TRD half-chambers to support QC plots.
void maskHalfChamberB(int sec, int stack, int ly)
void maskChamber(int sec, int stack, int ly)
void maskHalfChamberA(int sec, int stack, int ly)
GLenum GLuint GLint GLint layer
Definition glcorearb.h:1310
constexpr int MAXHALFCHAMBER
the maximum number of installed half-chambers
Definition Constants.h:31
static int getDetector(int sector, int stack, int layer)
static int getStack(int det)
static int getLayer(int det)
static int getSector(int det)
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"