DQMServices
Demo
plugins
DemoHarvester.cc
Go to the documentation of this file.
1
#include "
FWCore/Framework/interface/Frameworkfwd.h
"
2
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
3
4
#include "
DQMServices/Core/interface/DQMEDHarvester.h
"
5
6
class
DemoHarvester
:
public
DQMEDHarvester
{
7
private
:
8
std::string
target_
;
9
int
ctr_
= 0;
10
11
public
:
12
explicit
DemoHarvester
(
const
edm::ParameterSet
&);
13
~DemoHarvester
()
override
{}
14
15
void
beginRun
(
const
edm::Run
&
run
,
const
edm::EventSetup
&
c
)
override
;
16
void
dqmEndJob
(
DQMStore::IBooker
&
ib
,
DQMStore::IGetter
&ig)
override
;
17
void
dqmEndLuminosityBlock
(
DQMStore::IBooker
&
ib
,
18
DQMStore::IGetter
&ig,
19
edm::LuminosityBlock
const
&
lumi
,
20
edm::EventSetup
const
&)
override
;
21
};
22
23
DemoHarvester::DemoHarvester
(
const
edm::ParameterSet
&iConfig)
24
:
DQMEDHarvester
(iConfig), target_(iConfig.getParameter<
std
::
string
>(
"target"
)) {}
25
26
void
DemoHarvester::beginRun
(
const
edm::Run
&
run
,
const
edm::EventSetup
&iSetup) {}
27
28
void
DemoHarvester::dqmEndJob
(
DQMStore::IBooker
&
ib
,
DQMStore::IGetter
&ig) {
29
ig.
setCurrentFolder
(
target_
);
30
MonitorElement
*
me
= ig.
get
(
target_
+
"/EXAMPLE"
);
31
me
->getTH1()->Fill(3);
32
33
ib
.setCurrentFolder(
target_
+
"_runsummary"
);
34
MonitorElement
*
out
=
ib
.book1D(
"EXAMPLE"
,
"EXAMPLE"
, 100, 0., 100.);
35
out
->setBinContent(5,
me
->getBinContent(5));
36
}
37
38
void
DemoHarvester::dqmEndLuminosityBlock
(
DQMStore::IBooker
&
ib
,
39
DQMStore::IGetter
&ig,
40
edm::LuminosityBlock
const
&
lumi
,
41
edm::EventSetup
const
&) {
42
ig.
setCurrentFolder
(
target_
);
43
MonitorElement
*
me
= ig.
get
(
target_
+
"/EXAMPLE"
);
44
me
->getTH1()->Fill(4);
45
46
ctr_
++;
47
48
ib
.setCurrentFolder(
target_
+
"_lumisummary"
);
49
MonitorElement
*
out
=
ib
.book1D(
"EXAMPLE"
,
"EXAMPLE"
, 100, 0., 100.);
50
out
->setBinContent(
ctr_
,
lumi
.luminosityBlock());
51
}
52
53
#include "
FWCore/Framework/interface/MakerMacros.h
"
54
55
DEFINE_FWK_MODULE
(
DemoHarvester
);
DQMEDHarvester.h
edm::LuminosityBlock
Definition:
LuminosityBlock.h:50
edm::Run
Definition:
Run.h:45
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition:
DQMStore.cc:32
dqm::legacy::MonitorElement
Definition:
MonitorElement.h:462
DemoHarvester::beginRun
void beginRun(const edm::Run &run, const edm::EventSetup &c) override
Definition:
DemoHarvester.cc:26
MakerMacros.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:16
DemoHarvester::ctr_
int ctr_
Definition:
DemoHarvester.cc:9
edm::ParameterSet
Definition:
ParameterSet.h:47
DemoHarvester::target_
std::string target_
Definition:
DemoHarvester.cc:8
cuy.ib
ib
Definition:
cuy.py:661
DemoHarvester
Definition:
DemoHarvester.cc:6
edm::EventSetup
Definition:
EventSetup.h:58
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
DemoHarvester::dqmEndJob
void dqmEndJob(DQMStore::IBooker &ib, DQMStore::IGetter &ig) override
Definition:
DemoHarvester.cc:28
DQMEDHarvester
Definition:
DQMEDHarvester.py:1
std
Definition:
JetResolutionObject.h:76
writedatasetfile.run
run
Definition:
writedatasetfile.py:27
Frameworkfwd.h
dqm::implementation::IGetter
Definition:
DQMStore.h:484
DemoHarvester::~DemoHarvester
~DemoHarvester() override
Definition:
DemoHarvester.cc:13
DemoHarvester::DemoHarvester
DemoHarvester(const edm::ParameterSet &)
Definition:
DemoHarvester.cc:23
DemoHarvester::dqmEndLuminosityBlock
void dqmEndLuminosityBlock(DQMStore::IBooker &ib, DQMStore::IGetter &ig, edm::LuminosityBlock const &lumi, edm::EventSetup const &) override
Definition:
DemoHarvester.cc:38
dqm::implementation::IGetter::get
virtual MonitorElement * get(std::string const &fullpath) const
Definition:
DQMStore.cc:673
dqm::implementation::IBooker
Definition:
DQMStore.h:43
MillePedeFileConverter_cfg.out
out
Definition:
MillePedeFileConverter_cfg.py:31
ParameterSet.h
c
auto & c
Definition:
CAHitNtupletGeneratorKernelsImpl.h:56
hlt_dqm_clientPB-live_cfg.me
me
Definition:
hlt_dqm_clientPB-live_cfg.py:61
lumi
Definition:
LumiSectionData.h:20
Generated for CMSSW Reference Manual by
1.8.16