60 for (
const auto& fed_id :
fedIds_) {
61 const auto& fed_data = raw_data.FEDData(fed_id);
62 if (fed_data.size() == 0)
65 std::vector<uint32_t> data_32bit;
66 auto* ptr = fed_data.data();
67 size_t fed_size = fed_data.
size();
68 for (
size_t i = 0;
i < fed_size;
i += 4)
69 data_32bit.emplace_back(((*(ptr +
i) & 0xff) << 0) + (((
i + 1) < fed_size) ? ((*(ptr +
i + 1) & 0xff) << 8) : 0) +
70 (((
i + 2) < fed_size) ? ((*(ptr +
i + 2) & 0xff) << 16) : 0) +
71 (((
i + 3) < fed_size) ? ((*(ptr +
i + 3) & 0xff) << 24) : 0));
75 [
this](uint16_t , uint8_t , uint8_t ) {
return (1 <<
numERxsInECOND_) - 1; },
81 auto channeldata =
unpacker_->channelData();
83 for (
unsigned int i = 0;
i < channeldata.size();
i++) {
84 auto data = channeldata.at(
i);
86 const auto&
id =
data.id();
87 auto idraw =
id.raw();
88 auto raw =
data.raw();
89 LogDebug(
"HGCalRawToDigi:produce") <<
"id=" << idraw <<
", raw=" << raw <<
", common mode index=" << cm <<
".";
93 if (
const auto& bad_econds =
unpacker_->badECOND(); !bad_econds.empty()) {
96 <<
"Too many bad ECON-Ds: " << bad_econds.size() <<
" > " <<
badECONDMax_ <<
".";
100 for (
const auto& badECOND : bad_econds)
const edm::EDPutTokenT< HGCalDigiCollection > digisToken_
void push_back(T const &t)
HGCROCChannelDataFrame< HGCalDetId > HGCROCChannelDataFrameSpec
const std::vector< unsigned int > fedIds_
wrapper for a 32b data word identifying a readout channel in the raw data The format is the following...
const unsigned int badECONDMax_
Namespace of DDCMS conversion namespace.
const edm::EDPutTokenT< HGCalElecDigiCollection > elecDigisToken_
char data[epos_bytes_allocation]
const std::unique_ptr< HGCalUnpacker< HGCalElectronicsId > > unpacker_
Log< level::Warning, false > LogWarning
const unsigned int numERxsInECOND_
const edm::EDGetTokenT< FEDRawDataCollection > fedRawToken_