Project
Loading...
Searching...
No Matches
PadBadChannelMap.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
13
14using namespace o2::focal;
15
20
21void PadBadChannelMap::init()
22{
23 // Mark all channels as good channels
24 for (std::size_t index = 0; index < mChannelStatus.size(); index++) {
25 mChannelStatus[index] = static_cast<uint8_t>(MaskType_t::GOOD_CHANNEL);
26 }
27}
28
30{
31 init();
32}
33
34void PadBadChannelMap::setChannelStatus(std::size_t layer, std::size_t channel, MaskType_t masktype)
35{
36 mChannelStatus[getChannelIndex(layer, channel)] = static_cast<uint8_t>(masktype);
37}
38
40{
41 return static_cast<MaskType_t>(mChannelStatus[getChannelIndex(layer, channel)]);
42}
43
44std::size_t PadBadChannelMap::getChannelIndex(std::size_t layer, std::size_t channel) const
45{
47 throw ChannelIndexException(layer, channel);
48 }
50}
MaskType_t getChannelStatus(std::size_t layer, std::size_t channel) const
void setChannelStatus(std::size_t layer, std::size_t channel, MaskType_t channeltype)
GLuint index
Definition glcorearb.h:781
GLenum GLuint GLint GLint layer
Definition glcorearb.h:1310
constexpr int PADLAYER_MODULE_NCHANNELS
Definition Constants.h:16
constexpr int PADS_NLAYERS
Definition Constants.h:18