30 size_t const totalItems = sipmCharacteristics.getTypes();
32 auto product = std::make_unique<hcal::HcalSiPMCharacteristicsPortableHost>(totalItems,
cms::alpakatools::host());
34 auto view = product->view();
36 for (uint32_t
i = 0;
i < sipmCharacteristics.getTypes();
i++) {
38 auto const type = sipmCharacteristics.getType(
i);
41 if (static_cast<uint32_t>(
type) !=
i + 1)
43 <<
"Wrong assumption for HcalSiPMcharacteristics type values, " 44 <<
"should be type value <- type index + 1" << std::endl
45 <<
"Observed type value = " <<
type <<
" and index = " <<
i << std::endl;
48 sipmCharacteristics.getPixels(
type),
49 sipmCharacteristics.getNonLinearities(
type)[0],
50 sipmCharacteristics.getNonLinearities(
type)[1],
51 sipmCharacteristics.getNonLinearities(
type)[2],
52 sipmCharacteristics.getCrossTalk(
type),
53 sipmCharacteristics.getAuxi1(
type),
54 sipmCharacteristics.getAuxi2(
type));
std::unique_ptr< hcal::HcalSiPMCharacteristicsPortableHost > produce(HcalSiPMCharacteristicsRcd const &iRecord)
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
uint32_t cc[maxCellsPerHit]
HcalSiPMCharacteristicsESProducer(edm::ParameterSet const &iConfig)
PRODUCT const & get(ESGetToken< PRODUCT, T > const &iToken) const
edm::ESGetToken< HcalSiPMCharacteristics, HcalSiPMCharacteristicsRcd > sipmCharacteristicsToken_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
#define DEFINE_FWK_EVENTSETUP_ALPAKA_MODULE(type)