src
RecoLocalCalo
HcalRecProducers
src
HcalMahiPulseOffsetsGPUESProducer.cc
Go to the documentation of this file.
1
#include <array>
2
#include <iostream>
3
#include <tuple>
4
#include <utility>
5
6
#include "
FWCore/Framework/interface/ESProducer.h
"
7
#include "
FWCore/Framework/interface/ESProductHost.h
"
8
#include "
FWCore/Framework/interface/ESTransientHandle.h
"
9
#include "
FWCore/Framework/interface/EventSetupRecordIntervalFinder.h
"
10
#include "
FWCore/Framework/interface/MakerMacros.h
"
11
#include "
FWCore/Framework/interface/ModuleFactory.h
"
12
#include "
FWCore/Framework/interface/SourceFactory.h
"
13
#include "
FWCore/Framework/interface/eventsetuprecord_registration_macro.h
"
14
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
15
#include "
FWCore/Utilities/interface/ReusableObjectHolder.h
"
16
#include "
FWCore/Utilities/interface/typelookup.h
"
17
#include "
HeterogeneousCore/CUDACore/interface/JobConfigurationGPURecord.h
"
18
#include "
RecoLocalCalo/HcalRecAlgos/interface/HcalMahiPulseOffsetsGPU.h
"
19
20
class
HcalMahiPulseOffsetsGPUESProducer
:
public
edm::ESProducer
,
public
edm::EventSetupRecordIntervalFinder
{
21
public
:
22
HcalMahiPulseOffsetsGPUESProducer
(
edm::ParameterSet
const
&);
23
~HcalMahiPulseOffsetsGPUESProducer
()
override
=
default
;
24
25
static
void
fillDescriptions
(
edm::ConfigurationDescriptions
&);
26
std::unique_ptr<HcalMahiPulseOffsetsGPU>
produce
(
JobConfigurationGPURecord
const
&);
27
28
protected
:
29
void
setIntervalFor
(
const
edm::eventsetup::EventSetupRecordKey
&,
30
const
edm::IOVSyncValue
&,
31
edm::ValidityInterval
&)
override
;
32
33
private
:
34
std::vector<int>
pulseOffsets_
;
35
};
36
37
HcalMahiPulseOffsetsGPUESProducer::HcalMahiPulseOffsetsGPUESProducer
(
edm::ParameterSet
const
&
pset
)
38
: pulseOffsets_(
pset
.getParameter<
std
::
vector
<
int
>>(
"pulseOffsets"
)) {
39
setWhatProduced
(
this
);
40
findingRecord<JobConfigurationGPURecord>();
41
}
42
43
void
HcalMahiPulseOffsetsGPUESProducer::setIntervalFor
(
const
edm::eventsetup::EventSetupRecordKey
& iKey,
44
const
edm::IOVSyncValue
& iTime,
45
edm::ValidityInterval
& oInterval) {
46
oInterval =
edm::ValidityInterval
(
edm::IOVSyncValue::beginOfTime
(),
edm::IOVSyncValue::endOfTime
());
47
}
48
49
void
HcalMahiPulseOffsetsGPUESProducer::fillDescriptions
(
edm::ConfigurationDescriptions
&
desc
) {
50
edm::ParameterSetDescription
d
;
51
d
.add<std::vector<int>>(
"pulseOffsets"
, {-3, -2, -1, 0, 1, 2, 3, 4});
52
desc
.addWithDefaultLabel(
d
);
53
}
54
55
std::unique_ptr<HcalMahiPulseOffsetsGPU>
HcalMahiPulseOffsetsGPUESProducer::produce
(
JobConfigurationGPURecord
const
&) {
56
return
std::make_unique<HcalMahiPulseOffsetsGPU>(
pulseOffsets_
);
57
}
58
59
DEFINE_FWK_EVENTSETUP_SOURCE
(
HcalMahiPulseOffsetsGPUESProducer
);
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition:
ESProducer.h:166
ModuleFactory.h
edm::ValidityInterval
Definition:
ValidityInterval.h:28
HcalMahiPulseOffsetsGPU.h
ReusableObjectHolder.h
JobConfigurationGPURecord
Definition:
JobConfigurationGPURecord.h:6
edm::IOVSyncValue::endOfTime
static const IOVSyncValue & endOfTime()
Definition:
IOVSyncValue.cc:82
HcalMahiPulseOffsetsGPUESProducer::setIntervalFor
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) override
Definition:
HcalMahiPulseOffsetsGPUESProducer.cc:43
muonDTDigis_cfi.pset
pset
Definition:
muonDTDigis_cfi.py:27
cond::ValidityInterval
std::pair< Time_t, Time_t > ValidityInterval
Definition:
Time.h:17
std
Definition:
JetResolutionObject.h:76
HcalMahiPulseOffsetsGPUESProducer::HcalMahiPulseOffsetsGPUESProducer
HcalMahiPulseOffsetsGPUESProducer(edm::ParameterSet const &)
Definition:
HcalMahiPulseOffsetsGPUESProducer.cc:37
typelookup.h
HcalMahiPulseOffsetsGPUESProducer
Definition:
HcalMahiPulseOffsetsGPUESProducer.cc:20
HcalMahiPulseOffsetsGPUESProducer::produce
std::unique_ptr< HcalMahiPulseOffsetsGPU > produce(JobConfigurationGPURecord const &)
Definition:
HcalMahiPulseOffsetsGPUESProducer.cc:55
edm::ParameterSetDescription
Definition:
ParameterSetDescription.h:52
ESProducer.h
edm::ESProducer
Definition:
ESProducer.h:104
ParameterSet.h
createfilelist.int
int
Definition:
createfilelist.py:10
edm::IOVSyncValue::beginOfTime
static const IOVSyncValue & beginOfTime()
Definition:
IOVSyncValue.cc:88
HcalMahiPulseOffsetsGPUESProducer::~HcalMahiPulseOffsetsGPUESProducer
~HcalMahiPulseOffsetsGPUESProducer() override=default
submitPVResolutionJobs.desc
string desc
Definition:
submitPVResolutionJobs.py:254
ztail.d
d
Definition:
ztail.py:151
DEFINE_FWK_EVENTSETUP_SOURCE
#define DEFINE_FWK_EVENTSETUP_SOURCE(type)
Definition:
SourceFactory.h:92
HcalMahiPulseOffsetsGPUESProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &)
Definition:
HcalMahiPulseOffsetsGPUESProducer.cc:49
JobConfigurationGPURecord.h
edm::eventsetup::EventSetupRecordKey
Definition:
EventSetupRecordKey.h:30
HcalMahiPulseOffsetsGPUESProducer::pulseOffsets_
std::vector< int > pulseOffsets_
Definition:
HcalMahiPulseOffsetsGPUESProducer.cc:34
EventSetupRecordIntervalFinder.h
ESProductHost.h
edm::EventSetupRecordIntervalFinder
Definition:
EventSetupRecordIntervalFinder.h:33
ESTransientHandle.h
trackerHitRTTI::vector
Definition:
trackerHitRTTI.h:21
SourceFactory.h
eventsetuprecord_registration_macro.h
edm::ParameterSet
Definition:
ParameterSet.h:48
MakerMacros.h
edm::ConfigurationDescriptions
Definition:
ConfigurationDescriptions.h:28
edm::IOVSyncValue
Definition:
IOVSyncValue.h:31
Generated for CMSSW Reference Manual by
1.8.14