9#include <top/dbobjects/TOPCalChannelT0.h>
10#include <framework/logging/Logger.h>
22 unsigned module = moduleID - 1;
24 B2ERROR(
"Invalid module number, constant not set (" << ClassName() <<
")");
28 B2ERROR(
"Invalid channel number, constant not set (" << ClassName() <<
")");
31 m_T0[module][channel] = T0;
32 m_errT0[module][channel] = errT0;
39 unsigned module = moduleID - 1;
41 B2ERROR(
"Invalid module number, status not set (" << ClassName() <<
")");
45 B2ERROR(
"Invalid channel number, status not set (" << ClassName() <<
")");
68 B2INFO(
"Slot " << m + 1 <<
": average of " << s <<
" ns subtracted.");
75 unsigned module = moduleID - 1;
77 B2WARNING(
"Invalid module number, returning 0 (" << ClassName() <<
")");
81 B2WARNING(
"Invalid channel number, returning 0 (" << ClassName() <<
")");
84 return m_T0[module][channel];
90 unsigned module = moduleID - 1;
92 B2WARNING(
"Invalid module number, returning 0 (" << ClassName() <<
")");
96 B2WARNING(
"Invalid channel number, returning 0 (" << ClassName() <<
")");
99 return m_errT0[module][channel];
105 unsigned module = moduleID - 1;
114 unsigned module = moduleID - 1;
123 unsigned module = moduleID - 1;
EStatus m_status[c_numModules][c_numChannels]
calibration status
float m_T0[c_numModules][c_numChannels]
calibration constants
float m_errT0[c_numModules][c_numChannels]
errors on constants
@ c_Calibrated
good calibrated value
@ c_Unusable
bad calibrated value
@ c_Default
uncalibrated default value
@ c_numChannels
number of channels per module
@ c_numModules
number of modules
bool isCalibrated(int moduleID, unsigned channel) const
Returns calibration status.
double getT0(int moduleID, unsigned channel) const
Returns T0 of a single channel.
void suppressAverage()
Subtracts arithmetic average of a module from constants whose status is not c_Default.
void setT0(int moduleID, unsigned channel, double T0, double errT0)
Sets calibration for a single channel and switches status to calibrated.
void setUnusable(int moduleID, unsigned channel)
Switches calibration status to unusable to flag badly calibrated constant.
double getT0Error(int moduleID, unsigned channel) const
Returns error on T0 of a single channel.
bool isDefault(int moduleID, unsigned channel) const
Returns calibration status.
bool isUnusable(int moduleID, unsigned channel) const
Returns calibration status.
Abstract base class for different kinds of events.