Belle II Software development
|
Channel status for all 512 channels of 16 modules. More...
#include <TOPCalChannelMask.h>
Public Types | |
enum | EStatus { c_Active = 0 , c_Dead = 1 , c_Noisy = 2 } |
Status of the channel. More... | |
Public Member Functions | |
TOPCalChannelMask () | |
Default constructor. | |
void | setStatus (int moduleID, unsigned channel, EStatus status) |
Sets the status for a single channel. | |
void | setActive (int moduleID, unsigned channel) |
Sets a specific channel as active. | |
void | setDead (int moduleID, unsigned channel) |
Sets a specific channel as dead. | |
void | setNoisy (int moduleID, unsigned channel) |
Sets a specific channel as noisy. | |
EStatus | getStatus (int moduleID, unsigned channel) const |
Returns the status of 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. | |
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. | |
int | getNumOf (EStatus check, int moduleID) const |
Counts and returns the number of channels od a module having a given status. | |
ClassDef (TOPCalChannelMask, 1) | |
ClassDef. | |
Private Attributes | |
EStatus | m_status [c_numModules][c_numChannels] = {{ c_Active }} |
channel status | |
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.
|
private |
Sizes.
Enumerator | |
---|---|
c_numModules | number of modules |
c_numChannels | number of channels per module |
Definition at line 172 of file TOPCalChannelMask.h.
enum EStatus |
Status of the channel.
Definition at line 35 of file TOPCalChannelMask.h.
|
inline |
|
inline |
Returns fraction of active channels.
Definition at line 118 of file TOPCalChannelMask.h.
|
inline |
Returns fraction of module active channels.
Definition at line 141 of file TOPCalChannelMask.h.
|
inline |
Returns number of active channels.
Definition at line 103 of file TOPCalChannelMask.h.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
private |
channel status
Definition at line 176 of file TOPCalChannelMask.h.