Belle II Software development
BKLMStatus Class Reference

BKLM hit status. More...

#include <BKLMStatus.h>

Public Member Functions

 BKLMStatus ()
 Constructor.
 
 ~BKLMStatus ()
 Destructor.
 

Static Public Member Functions

static int getMaximalStrip (int module)
 Get maximal strip number.
 
static void setMaximalStrip (int &module, int strip)
 Set maximal strip number.
 

Static Protected Attributes

static constexpr int BKLM_MAXSTRIP_BIT = 15
 Bit position for maxStrip-1 [0..47].
 
static constexpr int BKLM_MAXSTRIP_MASK = (63 << BKLM_MAXSTRIP_BIT)
 Bit mask for maxStrip-1 [0..47].
 

Detailed Description

BKLM hit status.

Definition at line 20 of file BKLMStatus.h.

Constructor & Destructor Documentation

◆ BKLMStatus()

BKLMStatus ( )
inline

Constructor.

Definition at line 27 of file BKLMStatus.h.

28 {
29 }

◆ ~BKLMStatus()

~BKLMStatus ( )
inline

Destructor.

Definition at line 34 of file BKLMStatus.h.

35 {
36 }

Member Function Documentation

◆ getMaximalStrip()

static int getMaximalStrip ( int  module)
inlinestatic

Get maximal strip number.

Definition at line 41 of file BKLMStatus.h.

42 {
43 return ((module & BKLM_MAXSTRIP_MASK) >> BKLM_MAXSTRIP_BIT) + 1;
44 }
static constexpr int BKLM_MAXSTRIP_BIT
Bit position for maxStrip-1 [0..47].
Definition: BKLMStatus.h:65
static constexpr int BKLM_MAXSTRIP_MASK
Bit mask for maxStrip-1 [0..47].
Definition: BKLMStatus.h:68

◆ setMaximalStrip()

static void setMaximalStrip ( int &  module,
int  strip 
)
inlinestatic

Set maximal strip number.

Definition at line 49 of file BKLMStatus.h.

50 {
51
52#ifdef __clang_analyzer__
53 // unused junk assignment purely to calm the nerves of the clang analyzer
54 // (references the two arguments to avoid nattering about unused variables)
55 module = module + (strip - 1);
56#else
57 // the clang analyzer falsely thinks that this bitwise operation produces garbage
58 module = (module & (~BKLM_MAXSTRIP_MASK)) | ((strip - 1) << BKLM_MAXSTRIP_BIT);
59#endif
60 }

Member Data Documentation

◆ BKLM_MAXSTRIP_BIT

constexpr int BKLM_MAXSTRIP_BIT = 15
staticconstexprprotected

Bit position for maxStrip-1 [0..47].

Definition at line 65 of file BKLMStatus.h.

◆ BKLM_MAXSTRIP_MASK

constexpr int BKLM_MAXSTRIP_MASK = (63 << BKLM_MAXSTRIP_BIT)
staticconstexprprotected

Bit mask for maxStrip-1 [0..47].

Definition at line 68 of file BKLMStatus.h.


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