CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes
EcalUncalibRecHitSoAToLegacy Class Reference
Inheritance diagram for EcalUncalibRecHitSoAToLegacy:
edm::stream::EDProducer<>

Public Member Functions

 EcalUncalibRecHitSoAToLegacy (edm::ParameterSet const &ps)
 
 ~EcalUncalibRecHitSoAToLegacy () override=default
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &)
 

Private Types

using InputProduct = EcalUncalibratedRecHitHostCollection
 

Private Member Functions

void produce (edm::Event &, edm::EventSetup const &) override
 

Private Attributes

const bool isPhase2_
 
const edm::EDPutTokenT< EBUncalibratedRecHitCollectionuncalibRecHitsCPUEBToken_
 
const edm::EDPutTokenT< EEUncalibratedRecHitCollectionuncalibRecHitsCPUEEToken_
 
const edm::EDGetTokenT< InputProductuncalibRecHitsPortableEB_
 
const edm::EDGetTokenT< InputProductuncalibRecHitsPortableEE_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 

Detailed Description

Definition at line 14 of file EcalUncalibRecHitSoAToLegacy.cc.

Member Typedef Documentation

◆ InputProduct

Definition at line 21 of file EcalUncalibRecHitSoAToLegacy.cc.

Constructor & Destructor Documentation

◆ EcalUncalibRecHitSoAToLegacy()

EcalUncalibRecHitSoAToLegacy::EcalUncalibRecHitSoAToLegacy ( edm::ParameterSet const &  ps)
explicit

Definition at line 48 of file EcalUncalibRecHitSoAToLegacy.cc.

References edm::ParameterSet::getParameter().

49  : isPhase2_{ps.getParameter<bool>("isPhase2")},
50  uncalibRecHitsPortableEB_{consumes<InputProduct>(ps.getParameter<edm::InputTag>("uncalibRecHitsPortableEB"))},
53  : consumes<InputProduct>(ps.getParameter<edm::InputTag>("uncalibRecHitsPortableEE"))},
55  produces<EBUncalibratedRecHitCollection>(ps.getParameter<std::string>("recHitsLabelCPUEB"))},
58  : produces<EEUncalibratedRecHitCollection>(ps.getParameter<std::string>("recHitsLabelCPUEE"))} {}
const edm::EDPutTokenT< EBUncalibratedRecHitCollection > uncalibRecHitsCPUEBToken_
const edm::EDGetTokenT< InputProduct > uncalibRecHitsPortableEB_
const edm::EDPutTokenT< EEUncalibratedRecHitCollection > uncalibRecHitsCPUEEToken_
const edm::EDGetTokenT< InputProduct > uncalibRecHitsPortableEE_

◆ ~EcalUncalibRecHitSoAToLegacy()

EcalUncalibRecHitSoAToLegacy::~EcalUncalibRecHitSoAToLegacy ( )
overridedefault

Member Function Documentation

◆ fillDescriptions()

void EcalUncalibRecHitSoAToLegacy::fillDescriptions ( edm::ConfigurationDescriptions confDesc)
static

Definition at line 32 of file EcalUncalibRecHitSoAToLegacy.cc.

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, ProducerED_cfi::InputTag, or, and AlCaHLTBitMon_QueryRunRegistry::string.

32  {
34 
35  desc.add<edm::InputTag>("uncalibRecHitsPortableEB",
36  edm::InputTag("ecalMultiFitUncalibRecHitPortable", "EcalUncalibRecHitsEB"));
37  desc.add<std::string>("recHitsLabelCPUEB", "EcalUncalibRecHitsEB");
38  desc.ifValue(edm::ParameterDescription<bool>("isPhase2", false, true),
40  "uncalibRecHitsPortableEE",
41  edm::InputTag("ecalMultiFitUncalibRecHitPortable", "EcalUncalibRecHitsEE"),
42  true) and
43  edm::ParameterDescription<std::string>("recHitsLabelCPUEE", "EcalUncalibRecHitsEE", true)) or
44  true >> edm::EmptyGroupDescription());
45  confDesc.add("ecalUncalibRecHitSoAToLegacy", desc);
46 }
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
Definition: Activities.doc:12
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ produce()

void EcalUncalibRecHitSoAToLegacy::produce ( edm::Event event,
edm::EventSetup const &  setup 
)
overrideprivate

Definition at line 60 of file EcalUncalibRecHitSoAToLegacy.cc.

References mps_fire::i, isPhase2_, EcalDataFrame::MAXSAMPLES, eostools::move(), ecalGpuTask_cfi::sample, uncalibRecHitsCPUEBToken_, uncalibRecHitsCPUEEToken_, uncalibRecHitsPortableEB_, and uncalibRecHitsPortableEE_.

60  {
61  auto const &uncalRecHitsEBColl = event.get(uncalibRecHitsPortableEB_);
62  auto const &uncalRecHitsEBCollView = uncalRecHitsEBColl.const_view();
63  auto recHitsCPUEB = std::make_unique<EBUncalibratedRecHitCollection>();
64  recHitsCPUEB->reserve(uncalRecHitsEBCollView.size());
65 
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]);
73  if (isPhase2_) {
74  (*recHitsCPUEB)[i].setAmplitudeError(uncalRecHitsEBCollView.amplitudeError()[i]);
75  }
76  (*recHitsCPUEB)[i].setJitterError(uncalRecHitsEBCollView.jitterError()[i]);
77  for (uint32_t sample = 0; sample < EcalDataFrame::MAXSAMPLES; ++sample) {
78  (*recHitsCPUEB)[i].setOutOfTimeAmplitude(sample, uncalRecHitsEBCollView.outOfTimeAmplitudes()[i][sample]);
79  }
80  }
81  event.put(uncalibRecHitsCPUEBToken_, std::move(recHitsCPUEB));
82 
83  if (!isPhase2_) {
84  auto const &uncalRecHitsEEColl = event.get(uncalibRecHitsPortableEE_);
85  auto const &uncalRecHitsEECollView = uncalRecHitsEEColl.const_view();
86  auto recHitsCPUEE = std::make_unique<EEUncalibratedRecHitCollection>();
87  recHitsCPUEE->reserve(uncalRecHitsEECollView.size());
88 
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]);
97  for (uint32_t sample = 0; sample < EcalDataFrame::MAXSAMPLES; ++sample) {
98  (*recHitsCPUEE)[i].setOutOfTimeAmplitude(sample, uncalRecHitsEECollView.outOfTimeAmplitudes()[i][sample]);
99  }
100  }
101  event.put(uncalibRecHitsCPUEEToken_, std::move(recHitsCPUEE));
102  }
103 }
const edm::EDPutTokenT< EBUncalibratedRecHitCollection > uncalibRecHitsCPUEBToken_
const edm::EDGetTokenT< InputProduct > uncalibRecHitsPortableEB_
const edm::EDPutTokenT< EEUncalibratedRecHitCollection > uncalibRecHitsCPUEEToken_
Definition: DetId.h:17
const edm::EDGetTokenT< InputProduct > uncalibRecHitsPortableEE_
static constexpr int MAXSAMPLES
Definition: EcalDataFrame.h:48
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

◆ isPhase2_

const bool EcalUncalibRecHitSoAToLegacy::isPhase2_
private

Definition at line 25 of file EcalUncalibRecHitSoAToLegacy.cc.

Referenced by produce().

◆ uncalibRecHitsCPUEBToken_

const edm::EDPutTokenT<EBUncalibratedRecHitCollection> EcalUncalibRecHitSoAToLegacy::uncalibRecHitsCPUEBToken_
private

Definition at line 28 of file EcalUncalibRecHitSoAToLegacy.cc.

Referenced by produce().

◆ uncalibRecHitsCPUEEToken_

const edm::EDPutTokenT<EEUncalibratedRecHitCollection> EcalUncalibRecHitSoAToLegacy::uncalibRecHitsCPUEEToken_
private

Definition at line 29 of file EcalUncalibRecHitSoAToLegacy.cc.

Referenced by produce().

◆ uncalibRecHitsPortableEB_

const edm::EDGetTokenT<InputProduct> EcalUncalibRecHitSoAToLegacy::uncalibRecHitsPortableEB_
private

Definition at line 26 of file EcalUncalibRecHitSoAToLegacy.cc.

Referenced by produce().

◆ uncalibRecHitsPortableEE_

const edm::EDGetTokenT<InputProduct> EcalUncalibRecHitSoAToLegacy::uncalibRecHitsPortableEE_
private

Definition at line 27 of file EcalUncalibRecHitSoAToLegacy.cc.

Referenced by produce().