1 #ifndef DataFormats_HcalRecHit_CaloRecHitAuxSetter_h_ 2 #define DataFormats_HcalRecHit_CaloRecHitAuxSetter_h_ 11 {*u &= ~(mask <<
offset); *u |= ((value &
mask) << offset);}
15 {
return (u >> offset) &
mask;}
18 {
if (b) {*u |= (1
U << bitnum);}
else {*u &= ~(1
U << bitnum);}}
21 {
if (b) {*u |= (1
U << bitnum);}}
24 {
if (!b) {*u &= ~(1
U << bitnum);}}
27 {
return u & (1
U << bitnum);}
30 #endif // DataFormats_HcalRecHit_CaloRecHitAuxSetter_h_
constexpr void setBit(uint32_t *u, const unsigned bitnum, const bool b)
constexpr void orBit(uint32_t *u, const unsigned bitnum, const bool b)
constexpr void setField(uint32_t *u, const unsigned mask, const unsigned offset, const unsigned value)
constexpr void andBit(uint32_t *u, const unsigned bitnum, const bool b)
constexpr unsigned getField(const uint32_t u, const unsigned mask, const unsigned offset)
constexpr bool getBit(const uint32_t u, const unsigned bitnum)