5#ifndef TrigT1RPChardware_RPCReadOut_H
6#define TrigT1RPChardware_RPCReadOut_H
33 for (
ubit16 i = 0; i < n; i++) {
36 output = output | (v << p);
40 template <
size_t n>
ubit16 set16Bits(
const std::array<ubit16, n> &pos,
const std::array<ubit16, n> &val)
const {
42 for (
size_t i = 0; i < n; ++i) { output |= (val[i] << pos[i]); }
50 for (
ubit16 i = 0; i <
length; i++) { CMfield = CMfield | 1 << (position + i); }
51 output = (input & CMfield) >> position;
unsigned short int ubit16
ubit16 set16Bits(const std::array< ubit16, n > &pos, const std::array< ubit16, n > &val) const
static constexpr ubit16 s_last2bitsON
static constexpr ubit16 s_last4bitsON
ubit16 get16Bits(const ubit16 input, const ubit16 position, const ubit16 length) const
ubit16 set16Bits(const ubit16 n, const ubit16 *pos, const ubit16 *val) const
static constexpr ubit16 s_first8bitsON