11 const unsigned anodeStates[2],
12 const unsigned u_soiPhase,
17 const int wantedPhase = u_soiPhase < 2
U ? u_soiPhase : 2
U;
19 for (
unsigned ianode=0; ianode<2; ++ianode)
25 const int nRaw = anodeInfo->
nRaw();
26 const int soiStored = anodeInfo->
soi();
36 if (soiStored > wantedPhase)
37 shift = soiStored - wantedPhase;
38 if (shift + nStore > nRaw)
39 shift = nRaw - nStore;
43 for (
int iadc=0; iadc<nStore; ++iadc)
45 const int istored = iadc +
shift;
47 setField(&aux, 0xff, iadc*8, ts.adc());
48 if (istored == soiStored)
59 "Possible states enum must fit into the bit field");
constexpr void setField(uint32_t *u, const unsigned mask, const unsigned offset, const unsigned value)
static const unsigned OFF_CAPID
void setAuxHF(const uint32_t u)
static const unsigned OFF_STATUS
static const unsigned MASK_STATUS
static const unsigned OFF_SOI
HFQIE10Info const * getHFQIE10Info(unsigned index) const
static const unsigned MASK_CAPID
static const unsigned MASK_SOI
raw_type getRaw(const unsigned which) const
static void setAux(const HFPreRecHit &prehit, const unsigned anodeStates[2], unsigned soiPhase, HFRecHit *rechit)
static unsigned int const shift
constexpr void setAux(uint32_t value)