Project
Loading...
Searching...
No Matches
BadChannelMap.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#ifndef ALICEO2_EMCAL_BADCHANNELMAP
12#define ALICEO2_EMCAL_BADCHANNELMAP
13
14#include <iosfwd>
15#include <bitset>
16#include <Rtypes.h>
17
18class TH2;
19
20namespace o2
21{
22
23namespace emcal
24{
25
72{
73 public:
76 enum class MaskType_t : char {
77 GOOD_CELL,
78 BAD_CELL,
79 WARM_CELL,
81 };
82
84 BadChannelMap() = default;
85
87 ~BadChannelMap() = default;
88
97
104 bool operator==(const BadChannelMap& other) const;
105
118 void addBadChannel(unsigned short channelID, MaskType_t mask);
119
128 MaskType_t getChannelStatus(unsigned short channelID) const;
129
142 TH2* getHistogramRepresentation() const;
143
153 void PrintStream(std::ostream& stream) const;
154
155 private:
156 std::bitset<17664> mDeadCells;
157 std::bitset<17664> mBadCells;
158 std::bitset<17664> mWarmCells;
159
160 ClassDefNV(BadChannelMap, 1);
161};
162
170std::ostream& operator<<(std::ostream& in, const BadChannelMap& bcm);
171
179std::ostream& operator<<(std::ostream& in, const BadChannelMap::MaskType_t& masktype);
180
181} // namespace emcal
182
183} // namespace o2
184
185#endif
uint8_t channelID
Definition RawEventData.h:8
CCDB container for masked cells in EMCAL.
void PrintStream(std::ostream &stream) const
Print bad channels on a given stream.
MaskType_t getChannelStatus(unsigned short channelID) const
Get the status of a certain cell.
BadChannelMap()=default
Constructor.
bool operator==(const BadChannelMap &other) const
Comparison of two bad channel maps.
MaskType_t
Definition of mask types in the bad channel map.
@ DEAD_CELL
Dead cell, no data obtained.
@ BAD_CELL
Bad cell, must be excluded.
@ GOOD_CELL
GOOD cell, can be used without problems.
@ WARM_CELL
Warm cell, to be used with care.
void addBadChannel(unsigned short channelID, MaskType_t mask)
Add bad cell to the container.
BadChannelMap & operator+=(const BadChannelMap &rhs)
Add bad channel map to this bad channel map.
TH2 * getHistogramRepresentation() const
Convert map into 2D histogram representation.
~BadChannelMap()=default
Destructor.
GLuint GLuint stream
Definition glcorearb.h:1806
GLint GLuint mask
Definition glcorearb.h:291
std::ostream & operator<<(std::ostream &stream, const Cell &cell)
Stream operator for EMCAL cell.
Definition Cell.cxx:355
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
VectorOfTObjectPtrs other