CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes
EcalUncalibRecHitConvertGPU2CPUFormat Class Reference
Inheritance diagram for EcalUncalibRecHitConvertGPU2CPUFormat:
edm::stream::EDProducer<>

Public Member Functions

 EcalUncalibRecHitConvertGPU2CPUFormat (edm::ParameterSet const &ps)
 
 ~EcalUncalibRecHitConvertGPU2CPUFormat () override
 
- 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 = ecal::UncalibratedRecHit< calo::common::VecStoragePolicy< calo::common::CUDAHostAllocatorAlias >>
 

Private Member Functions

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

Private Attributes

const edm::EDGetTokenT
< InputProduct
recHitsGPUEB_
 
const edm::EDGetTokenT
< InputProduct
recHitsGPUEE_
 
const std::string recHitsLabelCPUEB_
 
const std::string recHitsLabelCPUEE_
 

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 11 of file EcalUncalibRecHitConvertGPU2CPUFormat.cc.

Member Typedef Documentation

Definition at line 18 of file EcalUncalibRecHitConvertGPU2CPUFormat.cc.

Constructor & Destructor Documentation

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

Definition at line 40 of file EcalUncalibRecHitConvertGPU2CPUFormat.cc.

References edm::ParameterSet::getParameter().

41  : recHitsGPUEB_{consumes<InputProduct>(ps.getParameter<edm::InputTag>("recHitsLabelGPUEB"))},
42  recHitsGPUEE_{consumes<InputProduct>(ps.getParameter<edm::InputTag>("recHitsLabelGPUEE"))},
43  recHitsLabelCPUEB_{ps.getParameter<std::string>("recHitsLabelCPUEB")},
44  recHitsLabelCPUEE_{ps.getParameter<std::string>("recHitsLabelCPUEE")} {
45  produces<EBUncalibratedRecHitCollection>(recHitsLabelCPUEB_);
46  produces<EEUncalibratedRecHitCollection>(recHitsLabelCPUEE_);
47 }
const edm::EDGetTokenT< InputProduct > recHitsGPUEB_
const edm::EDGetTokenT< InputProduct > recHitsGPUEE_
EcalUncalibRecHitConvertGPU2CPUFormat::~EcalUncalibRecHitConvertGPU2CPUFormat ( )
override

Definition at line 49 of file EcalUncalibRecHitConvertGPU2CPUFormat.cc.

49 {}

Member Function Documentation

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

Definition at line 28 of file EcalUncalibRecHitConvertGPU2CPUFormat.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), submitPVResolutionJobs::desc, HLT_FULL_cff::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

28  {
30 
31  desc.add<edm::InputTag>("recHitsLabelGPUEB", edm::InputTag("ecalUncalibRecHitProducerGPU", "EcalUncalibRecHitsEB"));
32  desc.add<edm::InputTag>("recHitsLabelGPUEE", edm::InputTag("ecalUncalibRecHitProducerGPU", "EcalUncalibRecHitsEE"));
33 
34  desc.add<std::string>("recHitsLabelCPUEB", "EcalUncalibRecHitsEB");
35  desc.add<std::string>("recHitsLabelCPUEE", "EcalUncalibRecHitsEE");
36 
37  confDesc.add("ecalUncalibRecHitConvertGPU2CPUFormat", desc);
38 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void EcalUncalibRecHitConvertGPU2CPUFormat::produce ( edm::Event event,
edm::EventSetup const &  setup 
)
overrideprivate

Definition at line 51 of file EcalUncalibRecHitConvertGPU2CPUFormat.cc.

References mps_fire::i, EcalDataFrame::MAXSAMPLES, eostools::move(), hltrates_dqm_sourceclient-live_cfg::offset, recHitsGPUEB_, recHitsGPUEE_, recHitsLabelCPUEB_, recHitsLabelCPUEE_, and makeMEIFBenchmarkPlots::sample.

51  {
52  edm::Handle<InputProduct> hRecHitsGPUEB, hRecHitsGPUEE;
53  event.getByToken(recHitsGPUEB_, hRecHitsGPUEB);
54  event.getByToken(recHitsGPUEE_, hRecHitsGPUEE);
55 
56  auto recHitsCPUEB = std::make_unique<EBUncalibratedRecHitCollection>();
57  auto recHitsCPUEE = std::make_unique<EEUncalibratedRecHitCollection>();
58  recHitsCPUEB->reserve(hRecHitsGPUEB->amplitude.size());
59  recHitsCPUEE->reserve(hRecHitsGPUEE->amplitude.size());
60 
61  for (uint32_t i = 0; i < hRecHitsGPUEB->amplitude.size(); ++i) {
62  recHitsCPUEB->emplace_back(DetId{hRecHitsGPUEB->did[i]},
63  hRecHitsGPUEB->amplitude[i],
64  hRecHitsGPUEB->pedestal[i],
65  hRecHitsGPUEB->jitter[i],
66  hRecHitsGPUEB->chi2[i],
67  hRecHitsGPUEB->flags[i]);
68  (*recHitsCPUEB)[i].setJitterError(hRecHitsGPUEB->jitterError[i]);
69  auto const offset = i * EcalDataFrame::MAXSAMPLES;
70  for (uint32_t sample = 0; sample < EcalDataFrame::MAXSAMPLES; ++sample)
71  (*recHitsCPUEB)[i].setOutOfTimeAmplitude(sample, hRecHitsGPUEB->amplitudesAll[offset + sample]);
72  }
73 
74  for (uint32_t i = 0; i < hRecHitsGPUEE->amplitude.size(); ++i) {
75  recHitsCPUEE->emplace_back(DetId{hRecHitsGPUEE->did[i]},
76  hRecHitsGPUEE->amplitude[i],
77  hRecHitsGPUEE->pedestal[i],
78  hRecHitsGPUEE->jitter[i],
79  hRecHitsGPUEE->chi2[i],
80  hRecHitsGPUEE->flags[i]);
81  (*recHitsCPUEE)[i].setJitterError(hRecHitsGPUEE->jitterError[i]);
82  auto const offset = i * EcalDataFrame::MAXSAMPLES;
83  for (uint32_t sample = 0; sample < EcalDataFrame::MAXSAMPLES; ++sample)
84  (*recHitsCPUEE)[i].setOutOfTimeAmplitude(sample, hRecHitsGPUEE->amplitudesAll[offset + sample]);
85  }
86 
87  event.put(std::move(recHitsCPUEB), recHitsLabelCPUEB_);
88  event.put(std::move(recHitsCPUEE), recHitsLabelCPUEE_);
89 }
const edm::EDGetTokenT< InputProduct > recHitsGPUEB_
def move
Definition: eostools.py:511
Definition: DetId.h:17
const edm::EDGetTokenT< InputProduct > recHitsGPUEE_
static constexpr int MAXSAMPLES
Definition: EcalDataFrame.h:48

Member Data Documentation

const edm::EDGetTokenT<InputProduct> EcalUncalibRecHitConvertGPU2CPUFormat::recHitsGPUEB_
private

Definition at line 22 of file EcalUncalibRecHitConvertGPU2CPUFormat.cc.

Referenced by produce().

const edm::EDGetTokenT<InputProduct> EcalUncalibRecHitConvertGPU2CPUFormat::recHitsGPUEE_
private

Definition at line 23 of file EcalUncalibRecHitConvertGPU2CPUFormat.cc.

Referenced by produce().

const std::string EcalUncalibRecHitConvertGPU2CPUFormat::recHitsLabelCPUEB_
private

Definition at line 25 of file EcalUncalibRecHitConvertGPU2CPUFormat.cc.

Referenced by produce().

const std::string EcalUncalibRecHitConvertGPU2CPUFormat::recHitsLabelCPUEE_
private

Definition at line 25 of file EcalUncalibRecHitConvertGPU2CPUFormat.cc.

Referenced by produce().