9#include <framework/logging/Logger.h>
11#include <arich/dbobjects/ARICHChannelMask.h>
19 std::fill_n(
m_DetectorMask, N_HAPDS * N_CHANNELS / 32 + 1, 0xFFFFFFFF);
24 if (module > N_HAPDS || channel > N_CHANNELS) { B2ERROR(
"ARICHChannelMask::setActiveCh: module ID / channel ID out of range!");
return;}
25 int ch = (module - 1) * N_CHANNELS + channel;
27 unsigned int idx = ch / 32;
34 for (
int i = 0; i < N_CHANNELS; i++) {
41 int fst = N_CHANNELS / 4 * apd;
42 for (
int i = fst; i < fst + N_CHANNELS / 4; i++) {
49 int ch = (moduleID - 1) * N_CHANNELS + channelID;
51 unsigned int idx = ch / 32;
59 cout << endl <<
"ARICH masked channels" << endl << endl;
60 for (
int i = 0; i < N_HAPDS; i++) {
63 for (
int j = 0; j < N_CHANNELS; j++) {
65 if (first) cout <<
"Module " << i + 1 <<
": " ;
70 if (!first) cout << endl << endl;
void setActiveHAPD(unsigned modId, bool active)
Set active/non-active HAPD module.
ARICHChannelMask()
Default constructor.
void setActiveCh(unsigned modId, unsigned chNo, bool active)
Set active/non-active channel.
void setActiveAPD(unsigned modId, unsigned apdId, bool active)
Set active/non-active APD of HAPD module.
uint32_t m_DetectorMask[N_HAPDS *N_CHANNELS/32+1]
Detector Mask of active channels.
void print() const
dump content
bool isActive(unsigned modId, unsigned chNo) const
Check if channel is active.
Abstract base class for different kinds of events.