![]() |
Project
|
CCDB container for bad (masked) channels in CPV. More...
#include <BadChannelMap.h>
Public Member Functions | |
BadChannelMap ()=default | |
Constructor. | |
BadChannelMap (short test) | |
Constructur used to build test bad map. | |
~BadChannelMap ()=default | |
Destructor. | |
BadChannelMap & | operator+= (const BadChannelMap &rhs) |
Add bad channel map to this bad channel map. | |
bool | operator== (const BadChannelMap &other) const |
Comparison of two bad channel maps. | |
void | addBadChannel (unsigned short channelID) |
Add bad cell to the container. | |
void | setChannelGood (unsigned short channelID) |
Mark channel as good. | |
bool | isChannelGood (unsigned short channelID) const |
Get the status of a certain cell. | |
void | getHistogramRepresentation (short mod, TH2 *h) const |
Convert map into 2D histogram representation. | |
void | PrintStream (std::ostream &stream) const |
Print bad channels on a given stream. | |
CCDB container for bad (masked) channels in CPV.
The bad channel map contains channels which are marked to be bad and excluded from reonstruction: clusterization or other analysis processes.
Bad channels can be added via bcm.addBadChannel(1234); goodness of channel can be restored with bcm.setChannelGood(1234) ;
Reading the channel status is done via bool status = bcm.isChannelGood(1234); Calling isChannelGood for cells beyond CPV will return the status bad.
For visualization a 2D histogram with the cell status as function of x(phi) vs z for each module can be created on the fly from the bad channel map. As the histogram is created dynamically from the absolute cell ID an instance of the CPV Geometry is required - otherwise an empty histogram is created.
The bad channel map can be created from multiple bad channel maps using the operator +=. This allows for the combination of the bad channel map from multiple time slices.
Definition at line 56 of file BadChannelMap.h.
|
default |
Constructor.
BadChannelMap::BadChannelMap | ( | short | test | ) |
Constructur used to build test bad map.
Definition at line 23 of file BadChannelMap.cxx.
|
default |
Destructor.
Add bad cell to the container.
channelID | Absolute ID of the bad channel |
mask | type of the bad channel |
Adding new bad channel to the container. In case a cell with the same ID is already present in the container, the mask status is updated. Otherwise it is added.
Only bad or warm cells are added to the container. In case the mask type is GOOD_CELL, the entry is removed from the container if present before, otherwise the cell is ignored.
Definition at line 97 of file BadChannelMap.h.
Convert map into 2D histogram representation.
mod | Module number |
h | Histogram of size 64*56 to be filled with the bad channel map. |
Convert bad channel map into a 2D map with phi(64) vs z(56) dimensions. Entries in the histogram are:
Definition at line 52 of file BadChannelMap.cxx.
|
inline |
Get the status of a certain cell.
channelID | channel for which to obtain the channel status |
Provide the mask status of a cell.
Definition at line 120 of file BadChannelMap.h.
|
inline |
Add bad channel map to this bad channel map.
rhs | Bad channel map to be added to this bad channel map |
Adding bad channels of another bad channel map to this bad channel map.
Definition at line 74 of file BadChannelMap.h.
|
inline |
Comparison of two bad channel maps.
Testing two bad channel maps for equalness.
Definition at line 84 of file BadChannelMap.h.
void BadChannelMap::PrintStream | ( | std::ostream & | stream | ) | const |
Print bad channels on a given stream.
stream | Stream on which the bad channel map is printed on |
Printing all bad channels store in the bad channel map on the stream.
The function is called in the operator<< providing direct access to protected members. Explicit calls by the users is normally not necessary.
Definition at line 82 of file BadChannelMap.cxx.
Mark channel as good.
channelID | Absolute ID of the channel |
Setting channel as good.
Definition at line 108 of file BadChannelMap.h.