Belle II Software  release-08-01-10
TOPCalChannelMask Class Reference

Channel status for all 512 channels of 16 modules. More...

#include <TOPCalChannelMask.h>

Inheritance diagram for TOPCalChannelMask:
Collaboration diagram for TOPCalChannelMask:

Public Types

enum  EStatus {
  c_Active = 0 ,
  c_Dead = 1 ,
  c_Noisy = 2
}
 Status of the channel.
 

Public Member Functions

 TOPCalChannelMask ()
 Default constructor.
 
void setStatus (int moduleID, unsigned channel, EStatus status)
 Sets the status for a single channel. More...
 
void setActive (int moduleID, unsigned channel)
 Sets a specific channel as active. More...
 
void setDead (int moduleID, unsigned channel)
 Sets a specific channel as dead. More...
 
void setNoisy (int moduleID, unsigned channel)
 Sets a specific channel as noisy. More...
 
EStatus getStatus (int moduleID, unsigned channel) const
 Returns the status of a single channel. More...
 
bool isActive (int moduleID, unsigned channel) const
 Returns false if the channel is dead or noisy, and true is the channel is active. More...
 
int getNumOfChannels () const
 Returns number of all channels.
 
int getNumOfModuleChannels () const
 Returns number of channels in a module.
 
int getNumOfActiveChannels () const
 Returns number of active channels.
 
int getNumOfDeadChannels () const
 Returns number of dead channels.
 
int getNumOfNoisyChannels () const
 Returns number of noisy channels.
 
double getActiveFraction () const
 Returns fraction of active channels.
 
int getNumOfActiveChannels (int moduleID) const
 Returns number of module active channels.
 
int getNumOfDeadChannels (int moduleID) const
 Returns number of module dead channels.
 
int getNumOfNoisyChannels (int moduleID) const
 Returns number of module noisy channels.
 
double getActiveFraction (int moduleID) const
 Returns fraction of module active channels.
 

Private Types

enum  {
  c_numModules = 16 ,
  c_numChannels = 512
}
 Sizes. More...
 

Private Member Functions

bool check (const int module, const unsigned channel) const
 Check input module and channel arguments are sane.
 
int getNumOf (EStatus check) const
 Counts and returns the number of channels having a given status. More...
 
int getNumOf (EStatus check, int moduleID) const
 Counts and returns the number of channels od a module having a given status. More...
 
 ClassDef (TOPCalChannelMask, 1)
 ClassDef.
 

Private Attributes

EStatus m_status [c_numModules][c_numChannels] = {{ c_Active }}
 channel status
 

Detailed Description

Channel status for all 512 channels of 16 modules.

The Channel condition is stored as the enum EStatus with the convention: c_Active = 0 active channel c_Dead = 1 dead channel c_Noisy = 2 noisy channel. A simple method isActive has been implemented to return false if the channel has been masked for whatever reason and true if the channel is active.

Definition at line 29 of file TOPCalChannelMask.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private

Sizes.

Enumerator
c_numModules 

number of modules

c_numChannels 

number of channels per module

Definition at line 172 of file TOPCalChannelMask.h.

172  {c_numModules = 16,
173  c_numChannels = 512
174  };
@ c_numChannels
number of channels per module
@ c_numModules
number of modules

The documentation for this class was generated from the following files: