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

The Class for ARICH HAPD channel mask. More...

#include <ARICHChannelMask.h>

Inheritance diagram for ARICHChannelMask:
Collaboration diagram for ARICHChannelMask:

Public Member Functions

 ARICHChannelMask ()
 Default constructor.
 
bool isActive (unsigned modId, unsigned chNo) const
 Check if channel is active. More...
 
void setActiveCh (unsigned modId, unsigned chNo, bool active)
 Set active/non-active channel. More...
 
void setActiveHAPD (unsigned modId, bool active)
 Set active/non-active HAPD module. More...
 
void setActiveAPD (unsigned modId, unsigned apdId, bool active)
 Set active/non-active APD of HAPD module. More...
 
void print () const
 dump content
 

Private Member Functions

 ClassDef (ARICHChannelMask, 1)
 ClassDef, must be the last term before the closing {}.
 

Private Attributes

uint32_t m_DetectorMask [N_HAPDS *N_CHANNELS/32+1] = {0xFFFFFFFF}
 Detector Mask of active channels.
 

Detailed Description

The Class for ARICH HAPD channel mask.

holds mask of non-active channels of all installed HAPDs By default all channels are active

Definition at line 25 of file ARICHChannelMask.h.

Member Function Documentation

◆ isActive()

bool isActive ( unsigned  modId,
unsigned  chNo 
) const

Check if channel is active.

Parameters
modIdmodule ID number
chNoasic channel number
Returns
true if active

Definition at line 47 of file ARICHChannelMask.cc.

48 {
49  int ch = (moduleID - 1) * N_CHANNELS + channelID;
50  int bit = ch % 32;
51  unsigned int idx = ch / 32;
52  if (m_DetectorMask[idx] & (1 << bit)) return true;
53  return false;
54 }
uint32_t m_DetectorMask[N_HAPDS *N_CHANNELS/32+1]
Detector Mask of active channels.

◆ setActiveAPD()

void setActiveAPD ( unsigned  modId,
unsigned  apdId,
bool  active 
)

Set active/non-active APD of HAPD module.

Parameters
modIdmodule ID number
apdIdapd chip ID number
activetrue if active

Definition at line 39 of file ARICHChannelMask.cc.

◆ setActiveCh()

void setActiveCh ( unsigned  modId,
unsigned  chNo,
bool  active 
)

Set active/non-active channel.

Parameters
modIdmodule ID number
chNoasic channel number
activetrue if active

Definition at line 22 of file ARICHChannelMask.cc.

◆ setActiveHAPD()

void setActiveHAPD ( unsigned  modId,
bool  active 
)

Set active/non-active HAPD module.

Parameters
modIdmodule ID number
activetrue if active

Definition at line 32 of file ARICHChannelMask.cc.


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