36 edm::InputTag(
"ecalMultiFitUncalibRecHitPortable",
"EcalUncalibRecHitsEB"));
40 "uncalibRecHitsPortableEE",
41 edm::InputTag(
"ecalMultiFitUncalibRecHitPortable",
"EcalUncalibRecHitsEE"),
45 confDesc.
add(
"ecalUncalibRecHitSoAToLegacy",
desc);
50 uncalibRecHitsPortableEB_{consumes<InputProduct>(ps.getParameter<
edm::InputTag>(
"uncalibRecHitsPortableEB"))},
51 uncalibRecHitsPortableEE_{
53 : consumes<InputProduct>(ps.getParameter<
edm::InputTag>(
"uncalibRecHitsPortableEE"))},
54 uncalibRecHitsCPUEBToken_{
55 produces<EBUncalibratedRecHitCollection>(ps.getParameter<
std::string>(
"recHitsLabelCPUEB"))},
56 uncalibRecHitsCPUEEToken_{
58 : produces<EEUncalibratedRecHitCollection>(ps.getParameter<
std::string>(
"recHitsLabelCPUEE"))} {}
62 auto const &uncalRecHitsEBCollView = uncalRecHitsEBColl.const_view();
63 auto recHitsCPUEB = std::make_unique<EBUncalibratedRecHitCollection>();
64 recHitsCPUEB->reserve(uncalRecHitsEBCollView.size());
66 for (uint32_t
i = 0;
i < uncalRecHitsEBCollView.size(); ++
i) {
67 recHitsCPUEB->emplace_back(
DetId{uncalRecHitsEBCollView.id()[
i]},
68 uncalRecHitsEBCollView.amplitude()[
i],
69 uncalRecHitsEBCollView.pedestal()[
i],
70 uncalRecHitsEBCollView.jitter()[
i],
71 uncalRecHitsEBCollView.chi2()[
i],
72 uncalRecHitsEBCollView.flags()[
i]);
74 (*recHitsCPUEB)[
i].setAmplitudeError(uncalRecHitsEBCollView.amplitudeError()[
i]);
76 (*recHitsCPUEB)[
i].setJitterError(uncalRecHitsEBCollView.jitterError()[
i]);
78 (*recHitsCPUEB)[
i].setOutOfTimeAmplitude(
sample, uncalRecHitsEBCollView.outOfTimeAmplitudes()[
i][
sample]);
85 auto const &uncalRecHitsEECollView = uncalRecHitsEEColl.const_view();
86 auto recHitsCPUEE = std::make_unique<EEUncalibratedRecHitCollection>();
87 recHitsCPUEE->reserve(uncalRecHitsEECollView.size());
89 for (uint32_t
i = 0;
i < uncalRecHitsEECollView.size(); ++
i) {
90 recHitsCPUEE->emplace_back(
DetId{uncalRecHitsEECollView.id()[
i]},
91 uncalRecHitsEECollView.amplitude()[
i],
92 uncalRecHitsEECollView.pedestal()[
i],
93 uncalRecHitsEECollView.jitter()[
i],
94 uncalRecHitsEECollView.chi2()[
i],
95 uncalRecHitsEECollView.flags()[
i]);
96 (*recHitsCPUEE)[
i].setJitterError(uncalRecHitsEECollView.jitterError()[
i]);
98 (*recHitsCPUEE)[
i].setOutOfTimeAmplitude(
sample, uncalRecHitsEECollView.outOfTimeAmplitudes()[
i][
sample]);
T getParameter(std::string const &) const
const edm::EDPutTokenT< EBUncalibratedRecHitCollection > uncalibRecHitsCPUEBToken_
~EcalUncalibRecHitSoAToLegacy() override=default
const edm::EDGetTokenT< InputProduct > uncalibRecHitsPortableEB_
const edm::EDPutTokenT< EEUncalibratedRecHitCollection > uncalibRecHitsCPUEEToken_
void produce(edm::Event &, edm::EventSetup const &) override
static void fillDescriptions(edm::ConfigurationDescriptions &)
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
#define DEFINE_FWK_MODULE(type)
EcalUncalibRecHitSoAToLegacy(edm::ParameterSet const &ps)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
const edm::EDGetTokenT< InputProduct > uncalibRecHitsPortableEE_
static constexpr int MAXSAMPLES
PortableHostCollection< EcalUncalibratedRecHitSoA > EcalUncalibratedRecHitHostCollection