 |
Belle II Software
release-05-02-19
|
14 #include <framework/logging/Logger.h>
27 class TOPCalChannelThreshold:
public TObject {
50 void setThr(
int moduleID,
unsigned channel,
short Thr)
52 unsigned module = moduleID - 1;
54 B2ERROR(
"Invalid module number, constant not set (" << ClassName() <<
")");
58 B2ERROR(
"Invalid channel number, constant not set (" << ClassName() <<
")");
61 m_Thr[module][channel] = Thr;
72 unsigned module = moduleID - 1;
74 B2ERROR(
"Invalid module number, status not set (" << ClassName() <<
")");
78 B2ERROR(
"Invalid channel number, status not set (" << ClassName() <<
")");
90 short getThr(
int moduleID,
unsigned channel)
const
92 unsigned module = moduleID - 1;
94 B2WARNING(
"Invalid module number, returning 0 (" << ClassName() <<
")");
98 B2WARNING(
"Invalid channel number, returning 0 (" << ClassName() <<
")");
101 return m_Thr[module][channel];
112 unsigned module = moduleID - 1;
124 bool isDefault(
int moduleID,
unsigned channel)
const
126 unsigned module = moduleID - 1;
138 bool isUnusable(
int moduleID,
unsigned channel)
const
140 unsigned module = moduleID - 1;
bool isDefault(int moduleID, unsigned channel) const
Returns calibration status.
void setUnusable(int moduleID, unsigned channel)
Switches calibration status to unusable to flag badly calibrated constant.
bool isUnusable(int moduleID, unsigned channel) const
Returns calibration status.
bool isCalibrated(int moduleID, unsigned channel) const
Returns calibration status.
EStatus
Calibration status of a constant.
@ c_numModules
number of modules
EStatus m_status[c_numModules][c_numChannels]
calibration status
short getThr(int moduleID, unsigned channel) const
Returns the threshold (in ADC counts) of a single channel.
TOPCalChannelThreshold()
Default constructor.
Abstract base class for different kinds of events.
@ c_Calibrated
good calibrated value
@ c_Unusable
bad calibrated value
void setThr(int moduleID, unsigned channel, short Thr)
Sets the threshold (in ADC counts) for a single channel and switches status to calibrated.
@ c_numChannels
number of channels per module
@ c_Default
uncalibrated default value
short m_Thr[c_numModules][c_numChannels]
threshold value in ADC counts.
ClassDef(TOPCalChannelThreshold, 2)
ClassDef.