11#include <unordered_map>
12#include <unordered_set>
59 void maskDrain(
unsigned short sensorID,
unsigned int drainID)
64 auto& drains = mapIter->second;
66 if (drains.find(drainID) == drains.end())
67 drains.insert(drainID);
72 drains.insert(drainID);
82 void maskRow(
unsigned short sensorID,
unsigned int vCellID)
87 auto& rows = mapIter->second;
89 if (rows.find(vCellID) == rows.end())
110 auto& singles = mapIter->second;
112 if (singles.find(pixID) == singles.end())
113 singles.insert(pixID);
118 singles.insert(pixID);
140 bool isDeadRow(
unsigned short sensorID,
unsigned int vCellID)
const
145 auto& deadRows = mapIter->second;
147 if (deadRows.find(vCellID) != deadRows.end())
158 bool isDeadDrain(
unsigned short sensorID,
unsigned int drainID)
const
163 auto& deadDrains = mapIter->second;
165 if (deadDrains.find(drainID) != deadDrains.end())
181 auto& deadSingles = mapIter->second;
183 if (deadSingles.find(pixID) != deadSingles.end())
207 std::unordered_map<unsigned short, DeadChannelSet>
m_MapRows;
The payload telling which PXD pixel is dead (=Readout system does not receive signals)
void maskSensor(unsigned short sensorID)
Mask sensor.
const std::unordered_map< unsigned short, DeadChannelSet > & getDeadSinglePixelMap() const
Return unordered_map with all dead single pixels in PXD.
const std::unordered_map< unsigned short, DeadChannelSet > & getDeadRowMap() const
Return unordered_map with all dead drains in PXD.
std::unordered_map< unsigned short, DeadChannelSet > m_MapRows
Structure holding sets of dead rows for all sensors by sensor id (unsigned short).
void maskRow(unsigned short sensorID, unsigned int vCellID)
Mask single row.
const std::unordered_map< unsigned short, DeadChannelSet > & getDeadDrainMap() const
Return unordered_map with all dead rows in PXD.
std::unordered_map< unsigned short, DeadChannelSet > m_MapDrains
Structure holding sets of dead drains for all sensors by sensor id (unsigned short).
std::unordered_set< unsigned int > m_MapSensors
Structure holding dead sensors by sensor id.
bool isDeadSensor(unsigned short sensorID) const
Check whether a sensor is dead.
std::unordered_set< unsigned int > DeadChannelSet
Structure to hold set of dead channel indexed by their unique id (unsigned int), stored in hash table...
ClassDef(PXDDeadPixelPar, 2)
ClassDef, must be the last term before the closing {}.
void maskSinglePixel(unsigned short sensorID, unsigned int pixID)
Mask single pixel.
void maskDrain(unsigned short sensorID, unsigned int drainID)
Mask single drain.
bool isDeadSinglePixel(unsigned short sensorID, unsigned int pixID) const
Check whether a single pixel is dead.
std::unordered_map< unsigned short, DeadChannelSet > m_MapSingles
Structure holding sets of dead single pixels for all sensors by sensor id (unsigned short).
bool isDeadDrain(unsigned short sensorID, unsigned int drainID) const
Check whether a drain is dead.
PXDDeadPixelPar()
Default constructor.
const std::unordered_set< unsigned int > & getDeadSensorMap() const
Return unordered_set with all dead sensors in PXD.
bool isDeadRow(unsigned short sensorID, unsigned int vCellID) const
Check whether a row is dead.
Abstract base class for different kinds of events.