Geometry
HcalCommonData
plugins
HcalDDDSimConstantsESModule.cc
Go to the documentation of this file.
1
// -*- C++ -*-
2
//
3
// Package: HcalDDDSimConstantsESModule
4
// Class: HcalDDDSimConstantsESModule
5
//
13
//
14
// Original Author: Sunanda Banerjee
15
// Created: Tue Dec 24 16:40:29 PDT 2013
16
//
17
//
18
19
#include <memory>
20
21
#include <
FWCore/Framework/interface/ModuleFactory.h
>
22
#include <
FWCore/Framework/interface/ESProducer.h
>
23
#include <
FWCore/MessageLogger/interface/MessageLogger.h
>
24
25
#include <
Geometry/HcalCommonData/interface/HcalDDDSimConstants.h
>
26
#include <
Geometry/Records/interface/HcalSimNumberingRecord.h
>
27
28
//#define EDM_ML_DEBUG
29
30
class
HcalDDDSimConstantsESModule
:
public
edm::ESProducer
{
31
public
:
32
HcalDDDSimConstantsESModule
(
const
edm::ParameterSet
&);
33
34
using
ReturnType
= std::unique_ptr<HcalDDDSimConstants>;
35
36
static
void
fillDescriptions
(
edm::ConfigurationDescriptions
&);
37
38
ReturnType
produce
(
const
HcalSimNumberingRecord
&);
39
40
private
:
41
edm::ESGetToken<HcalParameters, HcalParametersRcd>
parToken_
;
42
};
43
44
HcalDDDSimConstantsESModule::HcalDDDSimConstantsESModule
(
const
edm::ParameterSet
&) {
45
#ifdef EDM_ML_DEBUG
46
edm::LogVerbatim
(
"HcalGeom"
) <<
"constructing HcalDDDSimConstantsESModule"
;
47
#endif
48
auto
cc
=
setWhatProduced
(
this
);
49
parToken_
=
cc
.consumesFrom<
HcalParameters
,
HcalParametersRcd
>(
edm::ESInputTag
{});
50
}
51
52
void
HcalDDDSimConstantsESModule::fillDescriptions
(
edm::ConfigurationDescriptions
& descriptions) {
53
edm::ParameterSetDescription
desc
;
54
descriptions.
add
(
"hcalDDDSimConstants"
,
desc
);
55
}
56
57
// ------------ method called to produce the data ------------
58
HcalDDDSimConstantsESModule::ReturnType
HcalDDDSimConstantsESModule::produce
(
const
HcalSimNumberingRecord
& iRecord) {
59
const
auto
& par = iRecord.
get
(
parToken_
);
60
return
std::make_unique<HcalDDDSimConstants>(&par);
61
}
62
63
//define this as a plug-in
64
DEFINE_FWK_EVENTSETUP_MODULE
(
HcalDDDSimConstantsESModule
);
edm::ESInputTag
Definition:
ESInputTag.h:87
MessageLogger.h
HcalSimNumberingRecord.h
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition:
ESProducer.h:163
edm::ParameterSetDescription
Definition:
ParameterSetDescription.h:52
ESProducer.h
HcalParametersRcd
Definition:
HcalParametersRcd.h:8
HcalDDDSimConstantsESModule::produce
ReturnType produce(const HcalSimNumberingRecord &)
Definition:
HcalDDDSimConstantsESModule.cc:58
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition:
ConfigurationDescriptions.cc:57
edm::eventsetup::DependentRecordImplementation::get
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition:
DependentRecordImplementation.h:103
edm::ConfigurationDescriptions
Definition:
ConfigurationDescriptions.h:28
edm::ParameterSet
Definition:
ParameterSet.h:47
HcalDDDSimConstantsESModule
Definition:
HcalDDDSimConstantsESModule.cc:30
cc
edm::ESGetToken< HcalParameters, HcalParametersRcd >
ModuleFactory.h
submitPVResolutionJobs.desc
string desc
Definition:
submitPVResolutionJobs.py:251
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition:
ModuleFactory.h:60
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition:
MessageLogger.h:128
HcalParameters
Definition:
HcalParameters.h:6
edm::ESProducer
Definition:
ESProducer.h:104
HcalSimNumberingRecord
Definition:
HcalSimNumberingRecord.h:25
HcalDDDSimConstantsESModule::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &)
Definition:
HcalDDDSimConstantsESModule.cc:52
HcalDDDSimConstantsESModule::HcalDDDSimConstantsESModule
HcalDDDSimConstantsESModule(const edm::ParameterSet &)
Definition:
HcalDDDSimConstantsESModule.cc:44
HcalDDDSimConstantsESModule::parToken_
edm::ESGetToken< HcalParameters, HcalParametersRcd > parToken_
Definition:
HcalDDDSimConstantsESModule.cc:41
HcalDDDSimConstants.h
HcalDDDSimConstantsESModule::ReturnType
std::unique_ptr< HcalDDDSimConstants > ReturnType
Definition:
HcalDDDSimConstantsESModule.cc:34
Generated for CMSSW Reference Manual by
1.8.16