src
RecoLocalCalo
HcalRecProducers
plugins
alpaka
HcalMahiPulseOffsetsESProducer.cc
Go to the documentation of this file.
1
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
2
3
#include "
CondFormats/HcalObjects/interface/alpaka/HcalMahiPulseOffsetsDevice.h
"
4
#include "
CondFormats/HcalObjects/interface/HcalMahiPulseOffsetsSoA.h
"
5
#include "
HeterogeneousCore/CUDACore/interface/JobConfigurationGPURecord.h
"
6
7
#include "
HeterogeneousCore/AlpakaCore/interface/alpaka/ESProducer.h
"
8
#include "
HeterogeneousCore/AlpakaCore/interface/alpaka/ModuleFactory.h
"
9
#include "
HeterogeneousCore/AlpakaInterface/interface/config.h
"
10
#include "
HeterogeneousCore/AlpakaInterface/interface/host.h
"
11
#include "
HeterogeneousCore/AlpakaInterface/interface/memory.h
"
12
13
namespace
ALPAKA_ACCELERATOR_NAMESPACE
{
14
class
HcalMahiPulseOffsetsESProducer
:
public
ESProducer
{
15
public
:
16
HcalMahiPulseOffsetsESProducer
(
edm::ParameterSet
const
& iConfig) :
ESProducer
(iConfig) {
17
std::vector<int>
offsets
= iConfig.
getParameter
<std::vector<int>>(
"pulseOffsets"
);
18
19
product
= std::make_unique<hcal::HcalMahiPulseOffsetsPortableHost>(
offsets
.size(),
cms::alpakatools::host
());
20
21
auto
view
=
product
->view();
22
23
for
(uint32_t
i
= 0;
i
<
offsets
.size();
i
++) {
24
view
[
i
] =
offsets
[
i
];
25
}
26
setWhatProduced
(
this
);
27
}
28
29
static
void
fillDescriptions
(
edm::ConfigurationDescriptions
& descriptions) {
30
edm::ParameterSetDescription
desc
;
31
desc
.add<std::vector<int>>(
"pulseOffsets"
, {-3, -2, -1, 0, 1, 2, 3, 4});
32
descriptions.
addWithDefaultLabel
(
desc
);
33
}
34
35
std::shared_ptr<hcal::HcalMahiPulseOffsetsPortableHost>
produce
(
JobConfigurationGPURecord
const
& iRecord) {
36
return
product
;
37
}
38
39
private
:
40
std::shared_ptr<hcal::HcalMahiPulseOffsetsPortableHost>
product
;
41
};
42
}
// namespace ALPAKA_ACCELERATOR_NAMESPACE
43
44
DEFINE_FWK_EVENTSETUP_ALPAKA_MODULE
(HcalMahiPulseOffsetsESProducer);
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition:
ESProducer.h:166
edm::ConfigurationDescriptions::addWithDefaultLabel
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
Definition:
ConfigurationDescriptions.cc:87
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition:
ParameterSet.h:307
memory.h
mps_fire.i
i
Definition:
mps_fire.py:429
JobConfigurationGPURecord
Definition:
JobConfigurationGPURecord.h:6
HcalMahiPulseOffsetsSoA.h
pv::view
view
Definition:
PreparePVTrends.h:58
ALPAKA_ACCELERATOR_NAMESPACE::HcalMahiPulseOffsetsESProducer
Definition:
HcalMahiPulseOffsetsESProducer.cc:14
edm::ParameterSetDescription
Definition:
ParameterSetDescription.h:52
ALPAKA_ACCELERATOR_NAMESPACE::HcalMahiPulseOffsetsESProducer::HcalMahiPulseOffsetsESProducer
HcalMahiPulseOffsetsESProducer(edm::ParameterSet const &iConfig)
Definition:
HcalMahiPulseOffsetsESProducer.cc:16
edm::ESProducer
Definition:
ESProducer.h:104
ParameterSet.h
ALPAKA_ACCELERATOR_NAMESPACE
Definition:
SiPixelCablingSoAESProducer.cc:21
host.h
ALPAKA_ACCELERATOR_NAMESPACE::HcalMahiPulseOffsetsESProducer::product
std::shared_ptr< hcal::HcalMahiPulseOffsetsPortableHost > product
Definition:
HcalMahiPulseOffsetsESProducer.cc:40
submitPVResolutionJobs.desc
string desc
Definition:
submitPVResolutionJobs.py:254
HcalMahiPulseOffsetsDevice.h
ESProducer.h
cms::alpakatools::host
alpaka::DevCpu const & host()
Definition:
host.h:14
JobConfigurationGPURecord.h
upgradeWorkflowComponents.offsets
list offsets
Definition:
upgradeWorkflowComponents.py:3015
ALPAKA_ACCELERATOR_NAMESPACE::HcalMahiPulseOffsetsESProducer::produce
std::shared_ptr< hcal::HcalMahiPulseOffsetsPortableHost > produce(JobConfigurationGPURecord const &iRecord)
Definition:
HcalMahiPulseOffsetsESProducer.cc:35
DEFINE_FWK_EVENTSETUP_ALPAKA_MODULE
#define DEFINE_FWK_EVENTSETUP_ALPAKA_MODULE(type)
Definition:
ModuleFactory.h:17
edm::ParameterSet
Definition:
ParameterSet.h:48
ModuleFactory.h
config.h
edm::ConfigurationDescriptions
Definition:
ConfigurationDescriptions.h:28
ALPAKA_ACCELERATOR_NAMESPACE::HcalMahiPulseOffsetsESProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition:
HcalMahiPulseOffsetsESProducer.cc:29
Generated for CMSSW Reference Manual by
1.8.14