24 template <
typename ProductType,
typename... ARGS>
85 desc.add<
bool>(
"produceDummyIntegrityCollections",
false);
87 confDesc.
add(
"ecalDigisFromPortableProducer",
desc);
93 digisInEEToken_{consumes(ps.getParameter<
edm::InputTag>(
"digisInLabelEE"))},
96 digisOutEBToken_{produces<EBDigiCollection>(ps.getParameter<
std::string>(
"digisOutLabelEB"))},
97 digisOutEEToken_{produces<EEDigiCollection>(ps.getParameter<
std::string>(
"digisOutLabelEE"))},
100 produceDummyIntegrityCollections_{ps.getParameter<
bool>(
"produceDummyIntegrityCollections")},
103 ebSrFlagToken_{dummyProduces<EBSrFlagCollection>()},
104 eeSrFlagToken_{dummyProduces<EESrFlagCollection>()},
107 ecalRawDataToken_{dummyProduces<EcalRawDataCollection>()},
110 ebIntegrityGainErrorsToken_{dummyProduces<EBDetIdCollection>(
"EcalIntegrityGainErrors")},
111 ebIntegrityGainSwitchErrorsToken_{dummyProduces<EBDetIdCollection>(
"EcalIntegrityGainSwitchErrors")},
112 ebIntegrityChIdErrorsToken_{dummyProduces<EBDetIdCollection>(
"EcalIntegrityChIdErrors")},
115 eeIntegrityGainErrorsToken_{dummyProduces<EEDetIdCollection>(
"EcalIntegrityGainErrors")},
116 eeIntegrityGainSwitchErrorsToken_{dummyProduces<EEDetIdCollection>(
"EcalIntegrityGainSwitchErrors")},
117 eeIntegrityChIdErrorsToken_{dummyProduces<EEDetIdCollection>(
"EcalIntegrityChIdErrors")},
120 integrityTTIdErrorsToken_{dummyProduces<EcalElectronicsIdCollection>(
"EcalIntegrityTTIdErrors")},
121 integrityZSXtalIdErrorsToken_{dummyProduces<EcalElectronicsIdCollection>(
"EcalIntegrityZSXtalIdErrors")},
122 integrityBlockSizeErrorsToken_{dummyProduces<EcalElectronicsIdCollection>(
"EcalIntegrityBlockSizeErrors")},
125 pnDiodeDigisToken_{dummyProduces<EcalPnDiodeDigiCollection>()},
128 ecalTriggerPrimitivesToken_{dummyProduces<EcalTrigPrimDigiCollection>(
"EcalTriggerPrimitives")},
129 ecalPseudoStripInputsToken_{dummyProduces<EcalPSInputDigiCollection>(
"EcalPseudoStripInputs")},
132 ecalIntegrityMemTtIdErrorsToken_{dummyProduces<EcalElectronicsIdCollection>(
"EcalIntegrityMemTtIdErrors")},
133 ecalIntegrityMemBlockSizeErrorsToken_{
134 dummyProduces<EcalElectronicsIdCollection>(
"EcalIntegrityMemBlockSizeErrors")},
135 ecalIntegrityMemChIdErrorsToken_{dummyProduces<EcalElectronicsIdCollection>(
"EcalIntegrityMemChIdErrors")},
136 ecalIntegrityMemGainErrorsToken_{dummyProduces<EcalElectronicsIdCollection>(
"EcalIntegrityMemGainErrors")} {}
140 auto digisEB = std::make_unique<EBDigiCollection>();
141 auto digisEE = std::make_unique<EEDigiCollection>();
145 auto& digisEBSoAView = digisEBSoAHostColl.view();
146 auto& digisEESoAView = digisEESoAHostColl.view();
148 auto const digisEBSize = digisEBSoAView.size();
149 auto const digisEESize = digisEESoAView.size();
159 digisIdsEB.resize(digisEBSize);
160 digisIdsEE.resize(digisEESize);
161 digisDataEB.resize(digisEBDataSize);
162 digisDataEE.resize(digisEEDataSize);
165 std::memcpy(digisIdsEB.data(), digisEBSoAView.id(), digisEBSize *
sizeof(uint32_t));
166 std::memcpy(digisIdsEE.data(), digisEESoAView.id(), digisEESize *
sizeof(uint32_t));
167 std::memcpy(digisDataEB.data(), digisEBSoAView.data()->data(), digisEBDataSize *
sizeof(uint16_t));
168 std::memcpy(digisDataEE.data(), digisEESoAView.data()->data(), digisEEDataSize *
sizeof(uint16_t));
170 digisEB->swap(digisIdsEB, digisDataEB);
171 digisEE->swap(digisIdsEE, digisDataEE);
edm::EDGetTokenT< InputProduct > digisInEBToken_
T getParameter(std::string const &) const
edm::EDPutTokenT< EcalElectronicsIdCollection > integrityBlockSizeErrorsToken_
EcalDigisFromPortableProducer(edm::ParameterSet const &ps)
PortableHostCollection< EcalDigiSoA > EcalDigiHostCollection
edm::EDPutTokenT< EcalTrigPrimDigiCollection > ecalTriggerPrimitivesToken_
edm::EDPutTokenT< EcalPSInputDigiCollection > ecalPseudoStripInputsToken_
edm::EDPutTokenT< EEDetIdCollection > eeIntegrityChIdErrorsToken_
edm::EDPutTokenT< EEDetIdCollection > eeIntegrityGainErrorsToken_
edm::EDPutTokenT< EBDetIdCollection > ebIntegrityChIdErrorsToken_
edm::EDPutTokenT< EBDetIdCollection > ebIntegrityGainErrorsToken_
edm::EDPutTokenT< EcalElectronicsIdCollection > ecalIntegrityMemTtIdErrorsToken_
static void fillDescriptions(edm::ConfigurationDescriptions &)
edm::EDGetTokenT< InputProduct > digisInEEToken_
edm::EDPutTokenT< EcalElectronicsIdCollection > ecalIntegrityMemGainErrorsToken_
std::vector< data_type > DataContainer
#define DEFINE_FWK_MODULE(type)
~EcalDigisFromPortableProducer() override=default
bool produceDummyIntegrityCollections_
edm::EDPutTokenT< EcalElectronicsIdCollection > ecalIntegrityMemBlockSizeErrorsToken_
edm::EDPutTokenT< EcalElectronicsIdCollection > integrityZSXtalIdErrorsToken_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
edm::EDPutTokenT< EBDigiCollection > digisOutEBToken_
static constexpr unsigned int sampleSize
edm::EDPutTokenT< EBDetIdCollection > ebIntegrityGainSwitchErrorsToken_
void produce(edm::Event &, edm::EventSetup const &) override
std::vector< id_type > IdContainer
edm::EDPutTokenT< EcalElectronicsIdCollection > ecalIntegrityMemChIdErrorsToken_
edm::EDPutTokenT< EESrFlagCollection > eeSrFlagToken_
edm::EDPutTokenT< EcalPnDiodeDigiCollection > pnDiodeDigisToken_
edm::EDPutTokenT< EEDetIdCollection > eeIntegrityGainSwitchErrorsToken_
edm::EDPutTokenT< ProductType > dummyProduces(ARGS &&... args)
edm::EDPutTokenT< EBSrFlagCollection > ebSrFlagToken_
edm::EDPutTokenT< EcalRawDataCollection > ecalRawDataToken_
edm::EDPutTokenT< EcalElectronicsIdCollection > integrityTTIdErrorsToken_
edm::EDPutTokenT< EEDigiCollection > digisOutEEToken_