Main Page
Namespaces
Classes
Package Documentation
Geometry
HcalCommonData
plugins
HcalDDDRecConstantsESMoudle.cc
Go to the documentation of this file.
1
// -*- C++ -*-
2
//
3
// Package: HcalDDDRecConstantsESModule
4
// Class: HcalDDDRecConstantsESModule
5
//
13
//
14
// Original Author: Sunanda Banerjee
15
// Created: Tue Dec 24 16:40:29 PDT 2013
16
// $Id: HcalDDDRecConstantsESModule.cc,v 1.0 2013/12/24 12:47:41 sunanda Exp $
17
//
18
//
19
20
21
// system include files
22
#include <memory>
23
24
// user include files
25
#include <
FWCore/Framework/interface/ModuleFactory.h
>
26
#include <
FWCore/Framework/interface/ESProducer.h
>
27
#include <
FWCore/Framework/interface/ESHandle.h
>
28
#include <
FWCore/MessageLogger/interface/MessageLogger.h
>
29
30
#include <
CondFormats/GeometryObjects/interface/HcalParameters.h
>
31
#include <
Geometry/HcalCommonData/interface/HcalDDDSimConstants.h
>
32
#include <
Geometry/HcalCommonData/interface/HcalDDDRecConstants.h
>
33
#include <
Geometry/Records/interface/HcalRecNumberingRecord.h
>
34
35
//#define EDM_ML_DEBUG
36
37
class
HcalDDDRecConstantsESModule
:
public
edm::ESProducer
{
38
39
public
:
40
HcalDDDRecConstantsESModule
(
const
edm::ParameterSet
&);
41
~HcalDDDRecConstantsESModule
()
override
;
42
43
using
ReturnType
= std::unique_ptr<HcalDDDRecConstants>;
44
45
static
void
fillDescriptions
(
edm::ConfigurationDescriptions
& );
46
47
ReturnType
produce
(
const
HcalRecNumberingRecord
&);
48
49
};
50
51
HcalDDDRecConstantsESModule::HcalDDDRecConstantsESModule
(
const
edm::ParameterSet
& iConfig) {
52
#ifdef EDM_ML_DEBUG
53
edm::LogVerbatim
(
"HcalGeom"
) <<
"constructing HcalDDDRecConstantsESModule"
;
54
#endif
55
setWhatProduced
(
this
);
56
}
57
58
HcalDDDRecConstantsESModule::~HcalDDDRecConstantsESModule
() {}
59
60
void
HcalDDDRecConstantsESModule::fillDescriptions
(
edm::ConfigurationDescriptions
& descriptions ) {
61
edm::ParameterSetDescription
desc;
62
descriptions.
add
(
"hcalDDDRecConstants"
, desc );
63
}
64
65
// ------------ method called to produce the data ------------
66
HcalDDDRecConstantsESModule::ReturnType
67
HcalDDDRecConstantsESModule::produce
(
const
HcalRecNumberingRecord
& iRecord) {
68
#ifdef EDM_ML_DEBUG
69
edm::LogVerbatim
(
"HcalGeom"
) <<
"in HcalDDDRecConstantsESModule::produce"
;
70
#endif
71
edm::ESHandle<HcalParameters>
parHandle;
72
iRecord.
getRecord
<
HcalParametersRcd
>().
get
(parHandle);
73
edm::ESHandle<HcalDDDSimConstants>
hdc;
74
iRecord.
getRecord
<
HcalSimNumberingRecord
>().
get
(hdc);
75
76
return
std::make_unique<HcalDDDRecConstants>(&(*parHandle), *hdc);
77
}
78
79
//define this as a plug-in
80
DEFINE_FWK_EVENTSETUP_MODULE
(
HcalDDDRecConstantsESModule
);
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition:
ESProducer.h:116
HcalParameters.h
MessageLogger.h
HcalDDDSimConstants.h
HcalParametersRcd
Definition:
HcalParametersRcd.h:8
HcalDDDRecConstantsESModule::ReturnType
std::unique_ptr< HcalDDDRecConstants > ReturnType
Definition:
HcalDDDRecConstantsESMoudle.cc:43
HcalDDDRecConstantsESModule
Definition:
HcalDDDRecConstantsESMoudle.cc:37
edm::ParameterSetDescription
Definition:
ParameterSetDescription.h:50
edm::ESProducer
Definition:
ESProducer.h:98
HcalDDDRecConstantsESModule::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &)
Definition:
HcalDDDRecConstantsESMoudle.cc:60
edm::eventsetup::DependentRecordImplementation::getRecord
const DepRecordT getRecord() const
Definition:
DependentRecordImplementation.h:48
edm::ESHandle
Definition:
DTSurvey.h:22
ESHandle.h
HcalSimNumberingRecord
Definition:
HcalSimNumberingRecord.h:25
edm::LogVerbatim
Definition:
MessageLogger.h:271
HcalDDDRecConstantsESModule::produce
ReturnType produce(const HcalRecNumberingRecord &)
Definition:
HcalDDDRecConstantsESMoudle.cc:67
HcalRecNumberingRecord.h
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition:
ModuleFactory.h:60
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition:
ConfigurationDescriptions.cc:67
ESProducer.h
HcalRecNumberingRecord
Definition:
HcalRecNumberingRecord.h:23
HcalDDDRecConstantsESModule::HcalDDDRecConstantsESModule
HcalDDDRecConstantsESModule(const edm::ParameterSet &)
Definition:
HcalDDDRecConstantsESMoudle.cc:51
edm::ParameterSet
Definition:
ParameterSet.h:36
ModuleFactory.h
HcalDDDRecConstantsESModule::~HcalDDDRecConstantsESModule
~HcalDDDRecConstantsESModule() override
Definition:
HcalDDDRecConstantsESMoudle.cc:58
HcalDDDRecConstants.h
edm::ConfigurationDescriptions
Definition:
ConfigurationDescriptions.h:28
Generated for CMSSW Reference Manual by
1.8.11