RecoLocalCalo
EcalRecProducers
plugins
EcalMultifitParametersGPUESProducer.cc
Go to the documentation of this file.
1
#include <array>
2
#include <tuple>
3
#include <utility>
4
5
#include "
CondFormats/EcalObjects/interface/EcalMultifitParametersGPU.h
"
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
19
class
EcalMultifitParametersGPUESProducer
:
public
edm::ESProducer
,
public
edm::EventSetupRecordIntervalFinder
{
20
public
:
21
EcalMultifitParametersGPUESProducer
(
edm::ParameterSet
const
&);
22
~EcalMultifitParametersGPUESProducer
()
override
=
default
;
23
24
static
void
fillDescriptions
(
edm::ConfigurationDescriptions
&);
25
std::unique_ptr<EcalMultifitParametersGPU>
produce
(
JobConfigurationGPURecord
const
&);
26
27
protected
:
28
void
setIntervalFor
(
const
edm::eventsetup::EventSetupRecordKey
&,
29
const
edm::IOVSyncValue
&,
30
edm::ValidityInterval
&)
override
;
31
32
private
:
33
edm::ParameterSet
const
pset_
;
34
};
35
36
EcalMultifitParametersGPUESProducer::EcalMultifitParametersGPUESProducer
(
edm::ParameterSet
const
&
pset
) : pset_{
pset
} {
37
setWhatProduced(
this
);
38
findingRecord<JobConfigurationGPURecord>();
39
}
40
41
void
EcalMultifitParametersGPUESProducer::setIntervalFor
(
const
edm::eventsetup::EventSetupRecordKey
& iKey,
42
const
edm::IOVSyncValue
& iTime,
43
edm::ValidityInterval
& oInterval) {
44
oInterval =
edm::ValidityInterval
(
edm::IOVSyncValue::beginOfTime
(),
edm::IOVSyncValue::endOfTime
());
45
}
46
47
void
EcalMultifitParametersGPUESProducer::fillDescriptions
(
edm::ConfigurationDescriptions
&
desc
) {
48
edm::ParameterSetDescription
d
;
49
d
.add<std::vector<int>>(
"pulseOffsets"
, {-3, -2, -1, 0, 1, 2, 3, 4});
50
d
.add<std::vector<double>>(
"EBtimeFitParameters"
,
51
{-2.015452e+00,
52
3.130702e+00,
53
-1.234730e+01,
54
4.188921e+01,
55
-8.283944e+01,
56
9.101147e+01,
57
-5.035761e+01,
58
1.105621e+01});
59
d
.add<std::vector<double>>(
"EEtimeFitParameters"
,
60
{-2.390548e+00,
61
3.553628e+00,
62
-1.762341e+01,
63
6.767538e+01,
64
-1.332130e+02,
65
1.407432e+02,
66
-7.541106e+01,
67
1.620277e+01});
68
d
.add<std::vector<double>>(
"EBamplitudeFitParameters"
, {1.138, 1.652});
69
d
.add<std::vector<double>>(
"EEamplitudeFitParameters"
, {1.890, 1.400});
70
desc
.addWithDefaultLabel(
d
);
71
}
72
73
std::unique_ptr<EcalMultifitParametersGPU>
EcalMultifitParametersGPUESProducer::produce
(
74
JobConfigurationGPURecord
const
&) {
75
return
std::make_unique<EcalMultifitParametersGPU>(
76
pset_
.
getParameter
<std::vector<double>>(
"EBamplitudeFitParameters"
),
77
pset_
.
getParameter
<std::vector<double>>(
"EEamplitudeFitParameters"
),
78
pset_
.
getParameter
<std::vector<double>>(
"EBtimeFitParameters"
),
79
pset_
.
getParameter
<std::vector<double>>(
"EEtimeFitParameters"
));
80
}
81
82
DEFINE_FWK_EVENTSETUP_SOURCE
(
EcalMultifitParametersGPUESProducer
);
ESTransientHandle.h
EcalMultifitParametersGPUESProducer::setIntervalFor
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) override
Definition:
EcalMultifitParametersGPUESProducer.cc:41
eventsetuprecord_registration_macro.h
edm::ParameterSetDescription
Definition:
ParameterSetDescription.h:52
edm::ValidityInterval
Definition:
ValidityInterval.h:28
ESProducer.h
typelookup.h
edm::EventSetupRecordIntervalFinder
Definition:
EventSetupRecordIntervalFinder.h:33
edm::eventsetup::EventSetupRecordKey
Definition:
EventSetupRecordKey.h:30
MakerMacros.h
ReusableObjectHolder.h
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
EcalMultifitParametersGPUESProducer
Definition:
EcalMultifitParametersGPUESProducer.cc:19
EcalMultifitParametersGPUESProducer::pset_
const edm::ParameterSet pset_
Definition:
EcalMultifitParametersGPUESProducer.cc:33
EcalMultifitParametersGPUESProducer::produce
std::unique_ptr< EcalMultifitParametersGPU > produce(JobConfigurationGPURecord const &)
Definition:
EcalMultifitParametersGPUESProducer.cc:73
EcalMultifitParametersGPUESProducer::EcalMultifitParametersGPUESProducer
EcalMultifitParametersGPUESProducer(edm::ParameterSet const &)
Definition:
EcalMultifitParametersGPUESProducer.cc:36
EcalMultifitParametersGPU.h
ModuleFactory.h
cond::ValidityInterval
std::pair< Time_t, Time_t > ValidityInterval
Definition:
Time.h:17
submitPVResolutionJobs.desc
string desc
Definition:
submitPVResolutionJobs.py:251
EcalMultifitParametersGPUESProducer::~EcalMultifitParametersGPUESProducer
~EcalMultifitParametersGPUESProducer() override=default
edm::IOVSyncValue::beginOfTime
static const IOVSyncValue & beginOfTime()
Definition:
IOVSyncValue.cc:88
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition:
ParameterSet.h:303
edm::ESProducer
Definition:
ESProducer.h:104
ESProductHost.h
EcalMultifitParametersGPUESProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &)
Definition:
EcalMultifitParametersGPUESProducer.cc:47
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