12#include <framework/logging/Logger.h>
48 void setThr(
int moduleID,
unsigned channel,
short Thr)
50 unsigned module = moduleID - 1;
52 B2ERROR(
"Invalid module number, constant not set (" << ClassName() <<
")");
56 B2ERROR(
"Invalid channel number, constant not set (" << ClassName() <<
")");
59 m_Thr[module][channel] = Thr;
70 unsigned module = moduleID - 1;
72 B2ERROR(
"Invalid module number, status not set (" << ClassName() <<
")");
76 B2ERROR(
"Invalid channel number, status not set (" << ClassName() <<
")");
88 short getThr(
int moduleID,
unsigned channel)
const
90 unsigned module = moduleID - 1;
92 B2WARNING(
"Invalid module number, returning 0 (" << ClassName() <<
")");
96 B2WARNING(
"Invalid channel number, returning 0 (" << ClassName() <<
")");
99 return m_Thr[module][channel];
110 unsigned module = moduleID - 1;
124 unsigned module = moduleID - 1;
138 unsigned module = moduleID - 1;
Value of the threshold (in ADC counts) used for the pulse identification, for all 512 channels of 16 ...
short getThr(int moduleID, unsigned channel) const
Returns the threshold (in ADC counts) of a single channel.
bool isCalibrated(int moduleID, unsigned channel) const
Returns calibration status.
@ c_numChannels
number of channels per module
@ c_numModules
number of modules
ClassDef(TOPCalChannelThreshold, 2)
ClassDef.
EStatus m_status[c_numModules][c_numChannels]
calibration status
void setUnusable(int moduleID, unsigned channel)
Switches calibration status to unusable to flag badly calibrated constant.
EStatus
Calibration status of a constant.
@ c_Calibrated
good calibrated value
@ c_Unusable
bad calibrated value
@ c_Default
uncalibrated default value
short m_Thr[c_numModules][c_numChannels]
threshold value in ADC counts.
bool isDefault(int moduleID, unsigned channel) const
Returns calibration status.
TOPCalChannelThreshold()
Default constructor.
void setThr(int moduleID, unsigned channel, short Thr)
Sets the threshold (in ADC counts) for a single channel and switches status to calibrated.
bool isUnusable(int moduleID, unsigned channel) const
Returns calibration status.
Abstract base class for different kinds of events.