12#include <framework/logging/Logger.h>
46 void setCharge(
int moduleID,
unsigned channel,
double charge)
48 unsigned module = moduleID - 1;
50 B2ERROR(
"Invalid module number, constant not set (" << ClassName() <<
")");
54 B2ERROR(
"Invalid channel number, constant not set (" << ClassName() <<
")");
68 unsigned module = moduleID - 1;
70 B2ERROR(
"Invalid module number, status not set (" << ClassName() <<
")");
74 B2ERROR(
"Invalid channel number, status not set (" << ClassName() <<
")");
86 double getCharge(
int moduleID,
unsigned channel)
const
88 unsigned module = moduleID - 1;
90 B2WARNING(
"Invalid module number, returning 0 (" << ClassName() <<
")");
94 B2WARNING(
"Invalid channel number, returning 0 (" << ClassName() <<
")");
108 unsigned module = moduleID - 1;
122 unsigned module = moduleID - 1;
136 unsigned module = moduleID - 1;
Class to store integrated charge per channel.
bool isCalibrated(int moduleID, unsigned channel) const
Returns calibration status.
void setCharge(int moduleID, unsigned channel, double charge)
Sets the integrated charge for a single channel and switches status to calibrated.
@ c_numChannels
number of channels per module
@ c_numModules
number of modules
TOPCalIntegratedCharge()
Default constructor.
float m_charge[c_numModules][c_numChannels]
integrated charge [C/cm^2]
double getCharge(int moduleID, unsigned channel) const
Returns the integrated charge of a single channel.
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
ClassDef(TOPCalIntegratedCharge, 1)
ClassDef.
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.