5 std::map<std::string, std::string>::const_iterator
j =
params.find(
name);
9 return strtol(
j->second.c_str(),
nullptr, 0);
26 int adc = 0, capid = 0;
27 bool dv = (w1 & 0x10000) != 0;
28 bool er = (w1 & 0x20000) != 0;
32 adc = (
w2 & 0xFE00) >> 9;
33 capid = (w1 & 0x0180) >> 7;
36 adc = (
w2 & 0xFE) >> 1;
37 capid = (w1 & 0x0060) >> 5;
40 adc = (w1 & 0xFE00) >> 9;
41 capid = (w1 & 0x0018) >> 3;
50 if (bunch < npresamples)
52 <<
"Asked for " << npresamples <<
" presamples with event at bunch " << bunch;
53 if (nsamples - npresamples + bunch >= (
int)(
pattern_.size() / 2))
55 <<
"Asked for " << nsamples <<
" with event at " << bunch <<
" and " << npresamples <<
" presamples, but only " 56 <<
pattern_.size() / 2 <<
" bunches are available";
58 std::vector<HcalQIESample> retval;
59 retval.reserve(nsamples);
61 for (
int i = 0;
i < nsamples;
i++) {
62 int bc = bunch +
i - npresamples;
63 retval.push_back(
unpack(bc, fiberChan));
constexpr void setHTR(int crate, int slot, int tb)
common ppss p3p6s2 common epss epspn46 common const1 w2
HcalFiberPattern(const std::map< std::string, std::string > ¶ms, const std::vector< uint32_t > &data)
HcalElectronicsId getId(int fiberChan)
std::vector< uint32_t > pattern_
char data[epos_bytes_allocation]
std::vector< HcalQIESample > getSamples(int bunch, int npresamples, int nsamples, int fiberChan)
HcalQIESample unpack(int bc, int fc)
static int setIf(const std::string &name, const std::map< std::string, std::string > ¶ms)
Readout chain identification for Hcal.
uint16_t *__restrict__ uint16_t const *__restrict__ adc