9#include <top/dbobjects/TOPCalChannelMask.h> 
   11#include <framework/logging/Logger.h> 
   23    int module = moduleID - 1;
 
   24    if (!
check(module, channel)) {
 
   25      B2WARNING(
"Channel status not set");
 
   33    int module = moduleID - 1;
 
   34    if (!
check(module, channel)) {
 
   35      B2WARNING(
"Channel status 'active' not set");
 
   38    m_status[module][channel] = c_Active;
 
   43    int module = moduleID - 1;
 
   44    if (!
check(module, channel)) {
 
   45      B2WARNING(
"Channel status 'dead' not set");
 
   53    int module = moduleID - 1;
 
   54    if (!
check(module, channel)) {
 
   55      B2WARNING(
"Channel status 'noisy' not set");
 
   62                                                          unsigned channel)
 const 
   64    int module = moduleID - 1;
 
   65    if (!
check(module, channel)) {
 
   66      B2WARNING(
"Returning dead channel value");
 
   74    int module = moduleID - 1;
 
   75    if (!
check(module, channel)) {
 
   76      B2WARNING(
"Returning false");
 
   79    return (
m_status[module][channel] == c_Active);
 
   85      B2ERROR(
"Invalid module number (" << ClassName() << 
")");
 
   89      B2ERROR(
"Invalid module number (" << ClassName() << 
")");
 
   93      B2ERROR(
"Invalid channel number (" << ClassName() << 
")");
 
  102    for (
const auto& statuses : 
m_status) {
 
  103      for (
const auto status : statuses) {
 
  104        if (status == 
check) n++;
 
  112    unsigned module = moduleID - 1;
 
  115      const auto& statuses = 
m_status[module];
 
  116      for (
const auto status : statuses) {
 
  117        if (status == 
check) n++;
 
  121    B2ERROR(
"Invalid module number (" << ClassName() << 
")");
 
EStatus m_status[c_numModules][c_numChannels]
channel status
@ c_numChannels
number of channels per module
@ c_numModules
number of modules
EStatus
Status of the channel.
void setActive(int moduleID, unsigned channel)
Sets a specific channel as active.
int getNumOf(EStatus check) const
Counts and returns the number of channels having a given status.
void setNoisy(int moduleID, unsigned channel)
Sets a specific channel as noisy.
void setDead(int moduleID, unsigned channel)
Sets a specific channel as dead.
void setStatus(int moduleID, unsigned channel, EStatus status)
Sets the status for a single channel.
bool isActive(int moduleID, unsigned channel) const
Returns false if the channel is dead or noisy, and true is the channel is active.
EStatus getStatus(int moduleID, unsigned channel) const
Returns the status of a single channel.
bool check(const int module, const unsigned channel) const
Check input module and channel arguments are sane.
Abstract base class for different kinds of events.