10 const unsigned anodeStates[2],
11 const unsigned u_soiPhase,
13 using namespace CaloRecHitAuxSetter;
15 const int wantedPhase = u_soiPhase < 2U ? u_soiPhase : 2U;
17 for (
unsigned ianode = 0; ianode < 2; ++ianode) {
21 const int nRaw = anodeInfo->
nRaw();
22 const int soiStored = anodeInfo->
soi();
23 if (soiStored < nRaw) {
30 if (soiStored > wantedPhase)
31 shift = soiStored - wantedPhase;
32 if (shift + nStore > nRaw)
33 shift = nRaw - nStore;
37 for (
int iadc = 0; iadc < nStore; ++iadc) {
38 const int istored = iadc +
shift;
40 setField(&aux, 0xff, iadc * 8, ts.adc());
41 if (istored == soiStored)
51 "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
constexpr unsigned nRaw() const
constexpr raw_type getRaw(const unsigned which) const
static const unsigned OFF_STATUS
constexpr void setAuxHF(const uint32_t u)
static const unsigned MASK_STATUS
constexpr unsigned soi() const
static const unsigned OFF_SOI
static const unsigned MASK_CAPID
static const unsigned MASK_SOI
static void setAux(const HFPreRecHit &prehit, const unsigned anodeStates[2], unsigned soiPhase, HFRecHit *rechit)
static unsigned int const shift
constexpr HFQIE10Info const * getHFQIE10Info(unsigned index) const
constexpr void setAux(uint32_t value)