5 std::map<std::string, std::string>::const_iterator j=params.find(name);
6 if (j==params.end())
throw cms::Exception(
"InvalidFormat") <<
"Missing parameter '" << name <<
"'";
7 else return strtol(j->second.c_str(),
nullptr,0);
24 bool dv=(w1&0x10000)!=0;
25 bool er=(w1&0x20000)!=0;
47 if (bunch<npresamples)
throw cms::Exception(
"InvalidArgument") <<
"Asked for " << npresamples <<
" presamples with event at bunch " << bunch;
48 if (nsamples-npresamples+bunch>=(
int)(
pattern_.size()/2))
throw cms::Exception(
"InvalidArgument") <<
"Asked for " << nsamples <<
" with event at " << bunch <<
" and " << npresamples <<
" presamples, but only " <<
pattern_.size()/2 <<
" bunches are available";
50 std::vector<HcalQIESample> retval;
51 retval.reserve(nsamples);
53 for (
int i=0;
i<nsamples;
i++) {
54 int bc=bunch+
i-npresamples;
55 retval.push_back(
unpack(bc,fiberChan));
int adc(sample_type sample)
get the ADC sample (12 bits)
common ppss p3p6s2 common epss epspn46 common const1 w2
HcalFiberPattern(const std::map< std::string, std::string > ¶ms, const std::vector< uint32_t > &data)
void setHTR(int crate, int slot, int tb)
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.