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
);
edm::ValidityInterval
Definition:
ValidityInterval.h:28
HcalMahiPulseOffsetsGPU.h
ReusableObjectHolder.h
JobConfigurationGPURecord
Definition:
JobConfigurationGPURecord.h:6
MakerMacros.h
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:42
muonDTDigis_cfi.pset
pset
Definition:
muonDTDigis_cfi.py:27
cond::ValidityInterval
std::pair< Time_t, Time_t > ValidityInterval
Definition:
Time.h:17
HcalMahiPulseOffsetsGPUESProducer::HcalMahiPulseOffsetsGPUESProducer
HcalMahiPulseOffsetsGPUESProducer(edm::ParameterSet const &)
Definition:
HcalMahiPulseOffsetsGPUESProducer.cc:37
HcalMahiPulseOffsetsGPUESProducer
Definition:
HcalMahiPulseOffsetsGPUESProducer.cc:20
typelookup.h
HcalMahiPulseOffsetsGPUESProducer::produce
std::unique_ptr< HcalMahiPulseOffsetsGPU > produce(JobConfigurationGPURecord const &)
Definition:
HcalMahiPulseOffsetsGPUESProducer.cc:54
edm::ParameterSetDescription
Definition:
ParameterSetDescription.h:52
edm::ESProducer
Definition:
ESProducer.h:104
ParameterSet.h
edm::IOVSyncValue::beginOfTime
static const IOVSyncValue & beginOfTime()
Definition:
IOVSyncValue.cc:88
HcalMahiPulseOffsetsGPUESProducer::~HcalMahiPulseOffsetsGPUESProducer
~HcalMahiPulseOffsetsGPUESProducer() override=default
submitPVResolutionJobs.desc
string desc
Definition:
submitPVResolutionJobs.py:251
ztail.d
d
Definition:
ztail.py:151
DEFINE_FWK_EVENTSETUP_SOURCE
#define DEFINE_FWK_EVENTSETUP_SOURCE(type)
Definition:
SourceFactory.h:91
HcalMahiPulseOffsetsGPUESProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &)
Definition:
HcalMahiPulseOffsetsGPUESProducer.cc:48
JobConfigurationGPURecord.h
edm::eventsetup::EventSetupRecordKey
Definition:
EventSetupRecordKey.h:30
ESProducer.h
EventSetupRecordIntervalFinder.h
ESProductHost.h
edm::EventSetupRecordIntervalFinder
Definition:
EventSetupRecordIntervalFinder.h:33
ESTransientHandle.h
SourceFactory.h
eventsetuprecord_registration_macro.h
edm::ParameterSet
Definition:
ParameterSet.h:47
ModuleFactory.h
edm::ConfigurationDescriptions
Definition:
ConfigurationDescriptions.h:28
edm::IOVSyncValue
Definition:
IOVSyncValue.h:31
HcalMahiPulseOffsetsGPUESProducer::pset_
edm::ParameterSet const & pset_
Definition:
HcalMahiPulseOffsetsGPUESProducer.cc:34
Generated for CMSSW Reference Manual by
1.8.14