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) {
217 lambdaToTransfer(
df5_.npresamples.get(),
hf5_.npresamples);
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
T getParameter(std::string const &) const
static const int MAXSAMPLES
void acquire(edm::Event const &, edm::EventSetup const &, edm::WaitingTaskWithArenaHolder) override
static constexpr int HEADER_WORDS
edm::EDPutTokenT< ProductTypef01 > digisF01HEToken_
static void fillDescriptions(edm::ConfigurationDescriptions &)
StoragePolicy::template StorageSelector< uint16_t >::type data
static constexpr int HEADER_WORDS
Container::value_type value_type
edm::EDPutTokenT< ProductTypef3 > digisF3HBToken_
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
edm::EDPutTokenT< ProductTypef5 > digisF5HBToken_
void produce(edm::Event &, edm::EventSetup const &) override
#define DEFINE_FWK_MODULE(type)
static const size_type MAXSAMPLES
StoragePolicy::template StorageSelector< uint32_t >::type ids
edm::EDGetTokenT< HBHEDigiCollection > hbheDigiToken_
~HcalDigisProducerGPU() override=default
cms::cuda::ContextState cudaState_
static constexpr int HEADER_WORDS
HcalDigisProducerGPU(edm::ParameterSet const &ps)
#define cudaCheck(ARG,...)
std::enable_if< std::is_same< T, ::calo::common::tags::Vec >::value, void >::type clear()
edm::EDGetTokenT< QIE11DigiCollection > qie11DigiToken_
DeviceCollectionf01 df01_
uint32_t maxChannelsF01HE