12#include <framework/logging/Logger.h>
51 void setNoise(
int moduleID,
unsigned channel,
double rmsNoise)
53 unsigned module = moduleID - 1;
55 B2ERROR(
"Invalid module number, constant not set (" << ClassName() <<
")");
59 B2ERROR(
"Invalid channel number, constant not set (" << ClassName() <<
")");
73 unsigned module = moduleID - 1;
75 B2ERROR(
"Invalid module number, status not set (" << ClassName() <<
")");
79 B2ERROR(
"Invalid channel number, status not set (" << ClassName() <<
")");
91 double getNoise(
int moduleID,
unsigned channel)
const
93 unsigned module = moduleID - 1;
95 B2WARNING(
"Invalid module number, returning 0 (" << ClassName() <<
")");
99 B2WARNING(
"Invalid channel number, returning 0 (" << ClassName() <<
")");
113 unsigned module = moduleID - 1;
127 unsigned module = moduleID - 1;
141 unsigned module = moduleID - 1;
bool isCalibrated(int moduleID, unsigned channel) const
Returns calibration status.
void setNoise(int moduleID, unsigned channel, double rmsNoise)
Sets the noise r.m.s for a single channel and switches status to calibrated.
double getNoise(int moduleID, unsigned channel) const
Returns the noise r.m.s of a single channel (0 or negative: data not available)
EStatus m_status[c_numModules][c_numChannels]
calibration status
TOPCalChannelNoise()
Default constructor.
void setUnusable(int moduleID, unsigned channel)
Switches calibration status to unusable to flag badly calibrated constant.
ClassDef(TOPCalChannelNoise, 2)
ClassDef.
EStatus
Calibration status of a constant.
@ c_Calibrated
good calibrated value
@ c_Unusable
bad calibrated value
@ c_Default
uncalibrated default value
bool isDefault(int moduleID, unsigned channel) const
Returns calibration status.
@ c_numChannels
number of channels per module
@ c_numModules
number of modules
bool isUnusable(int moduleID, unsigned channel) const
Returns calibration status.
float m_rmsNoise[c_numModules][c_numChannels]
noise [ADC counts]
Abstract base class for different kinds of events.