9 #include <top/dbobjects/TOPASICGains.h> 
   10 #include <framework/logging/Logger.h> 
   20   bool TOPASICGains::setGains(
const std::vector<float>& gains, 
float error)
 
   23     if (gains.size() != c_WindowSize) {
 
   24       B2ERROR(
"TOPASICGains::setGains:  vector with wrong number of elements");
 
   28     for (
int i = 0; i < c_WindowSize; i++) {
 
   29       float gain = gains[i] * m_unit;
 
   30       if (gain > 0 and (gain + 0.5) < 0x10000) {
 
   31         m_gains[i] = int(gain + 0.5);
 
   37     m_gainError = int(error + 0.5);
 
Abstract base class for different kinds of events.