16#include <fairlogger/Logger.h>
71 const int MAXROWS = 208,
73 auto hist =
new TH2S(
"badchannelmap",
"Bad Channel Map", MAXCOLS, -0.5,
double(MAXCOLS) - 0.5, MAXROWS, -0.5,
double(MAXROWS) - 0.5);
74 hist->SetDirectory(
nullptr);
77 for (
size_t cellID = 0; cellID < mBadCells.size(); cellID++) {
79 if (mBadCells.test(cellID)) {
81 }
else if (mDeadCells.test(cellID)) {
83 }
else if (mWarmCells.test(cellID)) {
87 auto position = geo->GlobalRowColFromIndex(cellID);
92 LOG(
error) <<
"Geometry needs to be initialized";
99 for (
size_t cellID = 0; cellID < mDeadCells.size(); cellID++) {
100 if (rhs.mDeadCells.test(cellID)) {
101 mDeadCells.set(cellID);
102 if (mBadCells.test(cellID)) {
103 mBadCells.reset(cellID);
105 if (mWarmCells.test(cellID)) {
106 mWarmCells.reset(cellID);
109 if (rhs.mBadCells.test(cellID) && !mDeadCells.test(cellID)) {
110 mBadCells.set(cellID);
111 if (mWarmCells.test(cellID)) {
112 mWarmCells.reset(cellID);
115 if (rhs.mWarmCells.test(cellID) && !(mBadCells.test(cellID) || mDeadCells.test(cellID))) {
116 mWarmCells.set(cellID);
124 return mBadCells ==
other.mBadCells && mWarmCells ==
other.mWarmCells && mDeadCells ==
other.mDeadCells;
130 stream <<
"Number of bad cells: " << mBadCells.count() <<
"\n";
131 stream <<
"Number of dead cells: " << mDeadCells.count() <<
"\n";
132 stream <<
"Number of warm cells: " << mWarmCells.count() <<
"\n";
133 for (
size_t cellID = 0; cellID < mBadCells.size(); cellID++) {
134 if (mBadCells.test(cellID)) {
135 stream <<
"Channel " << cellID <<
": Bad cell\n";
137 if (mDeadCells.test(cellID)) {
138 stream <<
"Channel " << cellID <<
": Dead cell\n";
140 if (mWarmCells.test(cellID)) {
141 stream <<
"Channel " << cellID <<
": Warm cell\n";
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char e
char error[CURL_ERROR_SIZE]
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.
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.
Error handling for invalid index in calibration request.
Error handling access to non-initialized geometry.
static Geometry * GetInstance()
Get geometry instance. It should have been set before.
GLsizei const GLfloat * value
std::ostream & operator<<(std::ostream &stream, const Cell &cell)
Stream operator for EMCAL cell.
VectorOfTObjectPtrs other
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"