The payload telling which charge threshold to use for PXD pixel.
More...
#include <PXDPixelThresholdPar.h>
|
| typedef std::unordered_map< unsigned int, unsigned short > | SinglePixelThresholdsSet |
| | Structure to hold set of single pixels indexed by their unique id (unsigned int), stored in hash table, together with corresponding charge threshold.
|
| |
The payload telling which charge threshold to use for PXD pixel.
Definition at line 22 of file PXDPixelThresholdPar.h.
◆ SinglePixelThresholdsSet
Structure to hold set of single pixels indexed by their unique id (unsigned int), stored in hash table, together with corresponding charge threshold.
Definition at line 27 of file PXDPixelThresholdPar.h.
◆ PXDPixelThresholdPar()
Default constructor.
Definition at line 30 of file PXDPixelThresholdPar.h.
30: m_defaultThreshold(defaultThr), m_MapSingleThresholds() {}
◆ ~PXDPixelThresholdPar()
◆ getPixelThreshold()
| unsigned short getPixelThreshold |
( |
unsigned short | sensorID, |
|
|
unsigned int | pixID ) const |
|
inline |
Check whether a pixel on a given sensor is OK or not and get threshold.
- Parameters
-
| sensorID | unique ID of the sensor |
| pixID | unique ID of single pixel to set threshold |
- Returns
- charge threshold of the single pixel.
Definition at line 62 of file PXDPixelThresholdPar.h.
63 {
64 auto singleSensorThresholds = m_MapSingleThresholds.find(sensorID);
65 if (singleSensorThresholds != m_MapSingleThresholds.end()) {
66
67 auto& singleThresholds = singleSensorThresholds->second;
68
69 auto singleThr = singleThresholds.find(pixID);
70 if (singleThr != singleThresholds.end()) {
71 return singleThr->second;
72 }
73 }
74
75 return m_defaultThreshold;
76 }
◆ getPixelThresholdMap()
Return unordered_map with all masked single pixels in PXD.
Definition at line 79 of file PXDPixelThresholdPar.h.
79{return m_MapSingleThresholds;}
◆ setSinglePixelThreshold()
| void setSinglePixelThreshold |
( |
unsigned short | sensorID, |
|
|
unsigned int | pixID, |
|
|
unsigned short | pixThr = 255 ) |
|
inline |
Set threshold for single pixel.
- Parameters
-
| sensorID | unique ID of the sensor |
| pixID | unique ID of single pixel to set threshold |
| pixThr | charge threshold of the single pixel |
Definition at line 41 of file PXDPixelThresholdPar.h.
42 {
43 auto mapIterSingles = m_MapSingleThresholds.find(sensorID);
44 if (mapIterSingles != m_MapSingleThresholds.end()) {
45
46 auto& singles = mapIterSingles->second;
47 singles.insert(std::pair <unsigned int, unsigned short>(pixID, pixThr));
48 } else {
49
50 PXDPixelThresholdPar::SinglePixelThresholdsSet singleThresholds;
51
52 singleThresholds.insert(std::pair <unsigned int, unsigned short>(pixID, pixThr));
53 m_MapSingleThresholds[sensorID] = singleThresholds;
54 }
55 }
◆ m_defaultThreshold
| unsigned short m_defaultThreshold |
|
private |
◆ m_MapSingleThresholds
Structure holding sets of masked single pixels for all sensors by sensor id (unsigned short).
Definition at line 87 of file PXDPixelThresholdPar.h.
The documentation for this class was generated from the following file: