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
edm::ParameterSet
const
&
pset_
;
35
};
36
37
HcalMahiPulseOffsetsGPUESProducer::HcalMahiPulseOffsetsGPUESProducer
(
edm::ParameterSet
const
&
pset
) : pset_{
pset
} {
38
setWhatProduced(
this
);
39
findingRecord<JobConfigurationGPURecord>();
40
}
41
42
void
HcalMahiPulseOffsetsGPUESProducer::setIntervalFor
(
const
edm::eventsetup::EventSetupRecordKey
& iKey,
43
const
edm::IOVSyncValue
& iTime,
44
edm::ValidityInterval
& oInterval) {
45
oInterval =
edm::ValidityInterval
(
edm::IOVSyncValue::beginOfTime
(),
edm::IOVSyncValue::endOfTime
());
46
}
47
48
void
HcalMahiPulseOffsetsGPUESProducer::fillDescriptions
(
edm::ConfigurationDescriptions
&
desc
) {
49
edm::ParameterSetDescription
d
;
50
d
.add<std::vector<int>>(
"pulseOffsets"
, {-3, -2, -1, 0, 1, 2, 3, 4});
51
desc
.addWithDefaultLabel(
d
);
52
}
53
54
std::unique_ptr<HcalMahiPulseOffsetsGPU>
HcalMahiPulseOffsetsGPUESProducer::produce
(
JobConfigurationGPURecord
const
&) {
55
return
std::make_unique<HcalMahiPulseOffsetsGPU>(
pset_
);
56
}
57
58
DEFINE_FWK_EVENTSETUP_SOURCE
(
HcalMahiPulseOffsetsGPUESProducer
);
HcalMahiPulseOffsetsGPU.h
ESTransientHandle.h
HcalMahiPulseOffsetsGPUESProducer::HcalMahiPulseOffsetsGPUESProducer
HcalMahiPulseOffsetsGPUESProducer(edm::ParameterSet const &)
Definition:
HcalMahiPulseOffsetsGPUESProducer.cc:37
eventsetuprecord_registration_macro.h
edm::ParameterSetDescription
Definition:
ParameterSetDescription.h:52
edm::ValidityInterval
Definition:
ValidityInterval.h:28
HcalMahiPulseOffsetsGPUESProducer
Definition:
HcalMahiPulseOffsetsGPUESProducer.cc:20
ESProducer.h
typelookup.h
HcalMahiPulseOffsetsGPUESProducer::produce
std::unique_ptr< HcalMahiPulseOffsetsGPU > produce(JobConfigurationGPURecord const &)
Definition:
HcalMahiPulseOffsetsGPUESProducer.cc:54
HcalMahiPulseOffsetsGPUESProducer::pset_
edm::ParameterSet const & pset_
Definition:
HcalMahiPulseOffsetsGPUESProducer.cc:34
edm::EventSetupRecordIntervalFinder
Definition:
EventSetupRecordIntervalFinder.h:33
HcalMahiPulseOffsetsGPUESProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &)
Definition:
HcalMahiPulseOffsetsGPUESProducer.cc:48
edm::eventsetup::EventSetupRecordKey
Definition:
EventSetupRecordKey.h:30
MakerMacros.h
ReusableObjectHolder.h
HcalMahiPulseOffsetsGPUESProducer::~HcalMahiPulseOffsetsGPUESProducer
~HcalMahiPulseOffsetsGPUESProducer() override=default
HcalMahiPulseOffsetsGPUESProducer::setIntervalFor
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) override
Definition:
HcalMahiPulseOffsetsGPUESProducer.cc:42
JobConfigurationGPURecord
Definition:
JobConfigurationGPURecord.h:6
edm::IOVSyncValue
Definition:
IOVSyncValue.h:31
DEFINE_FWK_EVENTSETUP_SOURCE
#define DEFINE_FWK_EVENTSETUP_SOURCE(type)
Definition:
SourceFactory.h:91
EventSetupRecordIntervalFinder.h
edm::ConfigurationDescriptions
Definition:
ConfigurationDescriptions.h:28
JobConfigurationGPURecord.h
SourceFactory.h
edm::ParameterSet
Definition:
ParameterSet.h:47
edm::IOVSyncValue::endOfTime
static const IOVSyncValue & endOfTime()
Definition:
IOVSyncValue.cc:82
ModuleFactory.h
cond::ValidityInterval
std::pair< Time_t, Time_t > ValidityInterval
Definition:
Time.h:17
submitPVResolutionJobs.desc
string desc
Definition:
submitPVResolutionJobs.py:251
edm::IOVSyncValue::beginOfTime
static const IOVSyncValue & beginOfTime()
Definition:
IOVSyncValue.cc:88
edm::ESProducer
Definition:
ESProducer.h:104
ESProductHost.h
ztail.d
d
Definition:
ztail.py:151
ParameterSet.h
muonDTDigis_cfi.pset
pset
Definition:
muonDTDigis_cfi.py:27
Generated for CMSSW Reference Manual by
1.8.16