CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DemoHarvester.cc
Go to the documentation of this file.
3 
5 
6 class DemoHarvester : public DQMEDHarvester {
7 private:
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;
20  edm::EventSetup const &) override;
21 };
22 
24  : DQMEDHarvester(iConfig), target_(iConfig.getParameter<std::string>("target")) {}
25 
26 void DemoHarvester::beginRun(const edm::Run &run, const edm::EventSetup &iSetup) {}
27 
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 
41  edm::EventSetup const &) {
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 
54 
~DemoHarvester() override
const edm::EventSetup & c
void dqmEndLuminosityBlock(DQMStore::IBooker &ib, DQMStore::IGetter &ig, edm::LuminosityBlock const &lumi, edm::EventSetup const &) override
int ib
Definition: cuy.py:661
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
void dqmEndJob(DQMStore::IBooker &ib, DQMStore::IGetter &ig) override
void beginRun(const edm::Run &run, const edm::EventSetup &c) override
LuminosityBlockNumber_t luminosityBlock() const
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:673
list lumi
Definition: dqmdumpme.py:53
virtual double getBinContent(int binx) const
get content of bin (1-D)
std::string target_
Definition: DemoHarvester.cc:8
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
DemoHarvester(const edm::ParameterSet &)
virtual TH1 * getTH1() const
Definition: Run.h:45