CondTools
Ecal
plugins
TestEcalChannelStatusAnalyzer.cc
Go to the documentation of this file.
1
#include "
CondCore/PopCon/interface/PopConAnalyzer.h
"
2
#include "
CondTools/Ecal/interface/EcalChannelStatusHandler.h
"
3
#include "
FWCore/Framework/interface/MakerMacros.h
"
4
5
class
ExTestEcalChannelStatusAnalyzer
:
public
popcon::PopConAnalyzer
<popcon::EcalChannelStatusHandler> {
6
public
:
7
typedef
popcon::EcalChannelStatusHandler
SourceHandler
;
8
9
ExTestEcalChannelStatusAnalyzer
(
const
edm::ParameterSet
&
pset
)
10
:
popcon
::
PopConAnalyzer
<
popcon
::
EcalChannelStatusHandler
>(
pset
),
11
m_populator
(
pset
),
12
m_source
(
pset
.getParameter<
edm
::
ParameterSet
>(
"Source"
)) {}
13
14
private
:
15
void
analyze
(
const
edm::Event
&
ev
,
const
edm::EventSetup
& iSetup)
override
{
16
edm::ESHandle<EcalElectronicsMapping>
eleMap;
17
iSetup.
get
<
EcalMappingRcd
>().
get
(eleMap);
18
ecalElectronicsMap
= eleMap.
product
();
19
}
20
21
void
endJob
()
override
{
22
m_source
.
setElectronicsMap
(
ecalElectronicsMap
);
23
write
();
24
}
25
26
void
write
() {
m_populator
.
write
(
m_source
); }
27
28
private
:
29
popcon::PopCon
m_populator
;
30
SourceHandler
m_source
;
31
const
EcalElectronicsMapping
*
ecalElectronicsMap
;
32
};
33
34
//define this as a plug-in
35
DEFINE_FWK_MODULE
(
ExTestEcalChannelStatusAnalyzer
);
ExTestEcalChannelStatusAnalyzer::analyze
void analyze(const edm::Event &ev, const edm::EventSetup &iSetup) override
Definition:
TestEcalChannelStatusAnalyzer.cc:15
edm::ESHandle::product
T const * product() const
Definition:
ESHandle.h:86
EcalElectronicsMapping
Definition:
EcalElectronicsMapping.h:28
edm
HLT enums.
Definition:
AlignableModifier.h:19
popcon::EcalChannelStatusHandler
Definition:
EcalChannelStatusHandler.h:68
MakerMacros.h
edm::EventSetup::get
T get() const
Definition:
EventSetup.h:73
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:16
EcalCondHandler
Definition:
EcalCondHandler.h:10
edm::ESHandle< EcalElectronicsMapping >
edm::ParameterSet
Definition:
ParameterSet.h:36
popcon::PopCon::write
void write(Source const &source)
Definition:
PopCon.h:108
ParameterSet
Definition:
Functions.h:16
ExTestEcalChannelStatusAnalyzer
Definition:
TestEcalChannelStatusAnalyzer.cc:5
edm::EventSetup
Definition:
EventSetup.h:57
get
#define get
popcon::EcalChannelStatusHandler::setElectronicsMap
void setElectronicsMap(const EcalElectronicsMapping *)
Definition:
EcalChannelStatusHandler.cc:2164
ExTestEcalChannelStatusAnalyzer::SourceHandler
popcon::EcalChannelStatusHandler SourceHandler
Definition:
TestEcalChannelStatusAnalyzer.cc:7
EcalChannelStatusHandler.h
EcalMappingRcd
Definition:
EcalMappingRcd.h:15
popcon
Definition:
Exception.h:6
ExTestEcalChannelStatusAnalyzer::endJob
void endJob() override
Definition:
TestEcalChannelStatusAnalyzer.cc:21
ExTestEcalChannelStatusAnalyzer::m_populator
popcon::PopCon m_populator
Definition:
TestEcalChannelStatusAnalyzer.cc:29
ev
bool ev
Definition:
Hydjet2Hadronizer.cc:95
ExTestEcalChannelStatusAnalyzer::m_source
SourceHandler m_source
Definition:
TestEcalChannelStatusAnalyzer.cc:30
popcon::PopCon
Definition:
PopCon.h:30
ExTestEcalChannelStatusAnalyzer::write
void write()
Definition:
TestEcalChannelStatusAnalyzer.cc:26
edm::Event
Definition:
Event.h:73
ExTestEcalChannelStatusAnalyzer::ecalElectronicsMap
const EcalElectronicsMapping * ecalElectronicsMap
Definition:
TestEcalChannelStatusAnalyzer.cc:31
ExTestEcalChannelStatusAnalyzer::ExTestEcalChannelStatusAnalyzer
ExTestEcalChannelStatusAnalyzer(const edm::ParameterSet &pset)
Definition:
TestEcalChannelStatusAnalyzer.cc:9
PopConAnalyzer.h
muonDTDigis_cfi.pset
pset
Definition:
muonDTDigis_cfi.py:27
popcon::PopConAnalyzer< popcon::EcalChannelStatusHandler >::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