CondTools
Hcal
plugins
CastorGainsPopConAnalyzer.cc
Go to the documentation of this file.
1
#include "
CondCore/PopCon/interface/PopConAnalyzer.h
"
2
#include "
CondTools/Hcal/interface/CastorGainsHandler.h
"
3
#include "
FWCore/Framework/interface/MakerMacros.h
"
4
5
//typedef popcon::PopConAnalyzer<CastorGainsHandler> CastorGainsPopConAnalyzer;
6
7
class
CastorGainsPopConAnalyzer
:
public
popcon::PopConAnalyzer
<CastorGainsHandler> {
8
public
:
9
typedef
CastorGainsHandler
SourceHandler
;
10
11
CastorGainsPopConAnalyzer
(
const
edm::ParameterSet
&
pset
)
12
:
popcon
::
PopConAnalyzer
<
CastorGainsHandler
>(
pset
),
13
m_populator
(
pset
),
14
m_source
(
pset
.getParameter<
edm
::
ParameterSet
>(
"Source"
)),
15
m_tok
(
esConsumes
<
CastorGains
,
CastorGainsRcd
>()) {}
16
17
private
:
18
void
endJob
()
override
{
19
m_source
.
initObject
(
myDBObject
);
20
write
();
21
}
22
23
void
analyze
(
const
edm::Event
&
ev
,
const
edm::EventSetup
& esetup)
override
{
24
//Using ES to get the data:
25
26
myDBObject
=
new
CastorGains
(esetup.
getData
(
m_tok
));
27
}
28
29
void
write
() {
m_populator
.
write
(
m_source
); }
30
31
private
:
32
popcon::PopCon
m_populator
;
33
SourceHandler
m_source
;
34
edm::ESGetToken<CastorGains, CastorGainsRcd>
m_tok
;
35
CastorGains
*
myDBObject
;
36
};
37
38
DEFINE_FWK_MODULE
(
CastorGainsPopConAnalyzer
);
CastorGainsPopConAnalyzer::SourceHandler
CastorGainsHandler SourceHandler
Definition:
CastorGainsPopConAnalyzer.cc:9
CastorGainsPopConAnalyzer::CastorGainsPopConAnalyzer
CastorGainsPopConAnalyzer(const edm::ParameterSet &pset)
Definition:
CastorGainsPopConAnalyzer.cc:11
edm
HLT enums.
Definition:
AlignableModifier.h:19
CastorGainsHandler.h
MakerMacros.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:16
CastorGainsPopConAnalyzer::myDBObject
CastorGains * myDBObject
Definition:
CastorGainsPopConAnalyzer.cc:35
CastorGainsPopConAnalyzer::m_source
SourceHandler m_source
Definition:
CastorGainsPopConAnalyzer.cc:33
CastorGainsPopConAnalyzer::analyze
void analyze(const edm::Event &ev, const edm::EventSetup &esetup) override
Definition:
CastorGainsPopConAnalyzer.cc:23
edm::ParameterSet
Definition:
ParameterSet.h:47
popcon::PopCon::write
void write(Source const &source)
Definition:
PopCon.h:107
ParameterSet
Definition:
Functions.h:16
CastorGainsHandler
Definition:
CastorGainsHandler.h:23
CastorGainsHandler::initObject
void initObject(CastorGains *)
Definition:
CastorGainsHandler.cc:36
CastorGains
Definition:
CastorGains.h:18
CastorGainsPopConAnalyzer::m_tok
edm::ESGetToken< CastorGains, CastorGainsRcd > m_tok
Definition:
CastorGainsPopConAnalyzer.cc:34
edm::EventSetup
Definition:
EventSetup.h:58
CastorGainsPopConAnalyzer::m_populator
popcon::PopCon m_populator
Definition:
CastorGainsPopConAnalyzer.cc:32
edm::ESGetToken< CastorGains, CastorGainsRcd >
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition:
EventSetup.h:127
popcon
Definition:
Exception.h:6
CastorGainsPopConAnalyzer::write
void write()
Definition:
CastorGainsPopConAnalyzer.cc:29
ev
bool ev
Definition:
Hydjet2Hadronizer.cc:97
CastorGainsPopConAnalyzer
Definition:
CastorGainsPopConAnalyzer.cc:7
CastorGainsPopConAnalyzer::endJob
void endJob() override
Definition:
CastorGainsPopConAnalyzer.cc:18
edm::EDConsumerBase::esConsumes
auto esConsumes()
Definition:
EDConsumerBase.h:206
popcon::PopCon
Definition:
PopCon.h:29
CastorGainsRcd
Definition:
CastorGainsRcd.h:24
edm::Event
Definition:
Event.h:73
PopConAnalyzer.h
muonDTDigis_cfi.pset
pset
Definition:
muonDTDigis_cfi.py:27
popcon::PopConAnalyzer< CastorGainsHandler >::PopConAnalyzer
PopConAnalyzer(const edm::ParameterSet &pset)
Definition:
PopConAnalyzer.h:21
popcon::PopConAnalyzer
Definition:
PopConAnalyzer.h:17
Generated for CMSSW Reference Manual by
1.8.16