76 desc.add<uint32_t>(
"maxChannelsF01HE", 10000u);
77 desc.add<uint32_t>(
"maxChannelsF5HB", 10000u);
78 desc.add<uint32_t>(
"maxChannelsF3HB", 10000u);
85 qie11DigiToken_{consumes<QIE11DigiCollection>(ps.getParameter<
edm::InputTag>(
"qie11DigiLabel"))},
86 digisF01HEToken_{produces<ProductTypef01>(ps.getParameter<
std::string>(
"digisLabelF01HE"))},
87 digisF5HBToken_{produces<ProductTypef5>(ps.getParameter<
std::string>(
"digisLabelF5HB"))},
88 digisF3HBToken_{produces<ProductTypef3>(ps.getParameter<
std::string>(
"digisLabelF3HB"))} {
89 config_.maxChannelsF01HE = ps.getParameter<uint32_t>(
"maxChannelsF01HE");
90 config_.maxChannelsF5HB = ps.getParameter<uint32_t>(
"maxChannelsF5HB");
91 config_.maxChannelsF3HB = ps.getParameter<uint32_t>(
"maxChannelsF3HB");
101 if (
cs and
cs->enabled()) {
102 hf01_.reserve(config_.maxChannelsF01HE);
103 hf5_.reserve(config_.maxChannelsF5HB);
104 hf3_.reserve(config_.maxChannelsF3HB);
126 if (not hbheDigis->
empty()) {
127 auto const nsamples = (*hbheDigis)[0].size();
128 auto const stride = hcal::compute_stride<hcal::Flavor5>(nsamples);
138 if (not qie11Digis->
empty()) {
139 auto const nsamples = qie11Digis->
samples();
140 auto const stride01 = hcal::compute_stride<hcal::Flavor1>(nsamples);
141 auto const stride3 = hcal::compute_stride<hcal::Flavor3>(nsamples);
157 for (
auto const&
hbhe : *hbheDigis) {
158 auto const id =
hbhe.id().rawId();
162 auto const stride = hcal::compute_stride<hcal::Flavor5>(
hbhe.size());
166 uint16_t header_word = (1 << 15) | (0x5 << 12) | (0 << 10) | ((
hbhe.sample(0).capid() & 0x3) << 8);
169 uint16_t s0 = (0 << 7) | (static_cast<uint8_t>(
hbhe.sample(2 *
i).adc()) & 0x7f);
170 uint16_t s1 = (0 << 7) | (static_cast<uint8_t>(
hbhe.sample(2 *
i + 1).adc()) & 0x7f);
171 uint16_t
sample = (s1 << 8) | s0;
176 for (
unsigned int i = 0;
i < qie11Digis->
size();
i++) {
178 assert(digi.samples() == qie11Digis->
samples() &&
"collection nsamples must equal per digi samples");
179 if (digi.flavor() == 0
or digi.flavor() == 1) {
182 auto const id = digi.detid().rawId();
189 }
else if (digi.flavor() == 3) {
192 auto const id = digi.detid().rawId();
195 hf3_.
data.push_back((*qie11Digis)[
i][hw]);
202 auto lambdaToTransfer = [&ctx](
auto*
dest,
auto const&
src) {
205 using vector_type =
typename std::remove_reference<decltype(
src)>
::type;
207 using dest_data_type =
typename std::remove_pointer<decltype(
dest)>
::type;
217 lambdaToTransfer(
df5_.npresamples.get(),
hf5_.npresamples);