CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
GEMDQMHarvester Class Reference
Inheritance diagram for GEMDQMHarvester:

Public Member Functions

 GEMDQMHarvester (const edm::ParameterSet &)
 
 ~GEMDQMHarvester () override
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Protected Member Functions

void createSummaryHist (edm::Service< DQMStore > &store, MonitorElement *h2Src, MonitorElement *&h2Sum)
 
void dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &) override
 
void dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &) override
 
void drawSummaryHistogram (edm::Service< DQMStore > &store)
 
void refineSummaryHistogram (MonitorElement *h2Sum, MonitorElement *h2SrcDigiOcc, MonitorElement *h2SrcDigiMal, MonitorElement *h2SrcCStatus)
 

Protected Attributes

Float_t fReportSummary_
 
std::string strDirSummary_
 
std::string strOutFile_
 

Detailed Description

Definition at line 24 of file GEMDQMHarvester.cc.

Constructor & Destructor Documentation

◆ GEMDQMHarvester()

GEMDQMHarvester::GEMDQMHarvester ( const edm::ParameterSet cfg)

Definition at line 50 of file GEMDQMHarvester.cc.

50  {
51  fReportSummary_ = -1.0;
52  strOutFile_ = cfg.getParameter<std::string>("fromFile");
53  strDirSummary_ = "GEM/EventInfo";
54 }

References looper::cfg, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ ~GEMDQMHarvester()

GEMDQMHarvester::~GEMDQMHarvester ( )
inlineoverride

Definition at line 27 of file GEMDQMHarvester.cc.

27 {};

Member Function Documentation

◆ createSummaryHist()

void GEMDQMHarvester::createSummaryHist ( edm::Service< DQMStore > &  store,
MonitorElement h2Src,
MonitorElement *&  h2Sum 
)
protected

Definition at line 70 of file GEMDQMHarvester.cc.

70  {
72 
73  Int_t nBinX = h2Src->getNbinsX(), nBinY = h2Src->getNbinsY();
74  h2Sum = store->book2D("reportSummaryMap", "", nBinX, 0.5, nBinX + 0.5, nBinY, 0.5, nBinY + 0.5);
75 
76  for (Int_t i = 1; i <= nBinX; i++)
77  h2Sum->setBinLabel(i, h2Src->getTH2F()->GetXaxis()->GetBinLabel(i), 1);
78  for (Int_t i = 1; i <= nBinY; i++)
79  h2Sum->setBinLabel(i, h2Src->getTH2F()->GetYaxis()->GetBinLabel(i), 2);
80 }

References dqm::implementation::IBooker::book2D(), dqm::impl::MonitorElement::getNbinsX(), dqm::impl::MonitorElement::getNbinsY(), dqm::legacy::MonitorElement::getTH2F(), mps_fire::i, anotherprimaryvertexanalyzer_cfi::nBinX, anotherprimaryvertexanalyzer_cfi::nBinY, dqm::impl::MonitorElement::setBinLabel(), and dqm::implementation::DQMStore::setCurrentFolder().

◆ dqmEndJob()

void GEMDQMHarvester::dqmEndJob ( DQMStore::IBooker ,
DQMStore::IGetter  
)
inlineoverrideprotected

Definition at line 35 of file GEMDQMHarvester.cc.

35 {}; // Cannot use; it is called after dqmSaver

◆ dqmEndLuminosityBlock()

void GEMDQMHarvester::dqmEndLuminosityBlock ( DQMStore::IBooker ,
DQMStore::IGetter ,
edm::LuminosityBlock const &  ,
edm::EventSetup const &   
)
overrideprotected

Definition at line 62 of file GEMDQMHarvester.cc.

65  {
67  drawSummaryHistogram(store);
68 }

◆ drawSummaryHistogram()

void GEMDQMHarvester::drawSummaryHistogram ( edm::Service< DQMStore > &  store)
protected

Definition at line 82 of file GEMDQMHarvester.cc.

82  {
83  std::string strSrcDigiOcc = "GEM/digi/summaryOccDigi";
84  std::string strSrcDigiMal = "GEM/digi/summaryMalfuncDigi";
85  std::string strSrcCStatus = "GEM/DAQStatus/summaryStatus";
86 
88 
89  MonitorElement *h2SrcDigiOcc = store->get(strSrcDigiOcc);
90  MonitorElement *h2SrcDigiMal = store->get(strSrcDigiMal);
91  MonitorElement *h2SrcCStatus = store->get(strSrcCStatus);
92 
93  if (h2SrcDigiOcc != nullptr && h2SrcDigiMal != nullptr && h2SrcCStatus != nullptr) {
94  MonitorElement *h2Sum = nullptr;
95  createSummaryHist(store, h2SrcCStatus, h2Sum);
96  refineSummaryHistogram(h2Sum, h2SrcDigiOcc, h2SrcDigiMal, h2SrcCStatus);
97  }
98 
99  store->bookFloat("reportSummary")->Fill(fReportSummary_);
100 }

References dqm::implementation::IBooker::bookFloat(), dqm::impl::MonitorElement::Fill(), dqm::implementation::IGetter::get(), dqm::implementation::DQMStore::setCurrentFolder(), and AlCaHLTBitMon_QueryRunRegistry::string.

◆ fillDescriptions()

void GEMDQMHarvester::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 56 of file GEMDQMHarvester.cc.

56  {
58  desc.add<std::string>("fromFile", "");
59  descriptions.add("GEMDQMHarvester", desc);
60 }

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ refineSummaryHistogram()

void GEMDQMHarvester::refineSummaryHistogram ( MonitorElement h2Sum,
MonitorElement h2SrcDigiOcc,
MonitorElement h2SrcDigiMal,
MonitorElement h2SrcCStatus 
)
protected

Definition at line 103 of file GEMDQMHarvester.cc.

106  {
107  Int_t nBinY = h2Sum->getNbinsY();
108  for (Int_t j = 1; j <= nBinY; j++) {
109  Int_t nBinX = (Int_t)(h2SrcDigiOcc->getBinContent(0, j) + 0.5);
110  h2Sum->setBinContent(0, j, nBinX);
111  for (Int_t i = 1; i <= nBinX; i++) {
112  Float_t fDigiOcc = h2SrcDigiOcc->getBinContent(i, j);
113  Float_t fDigiMal = h2SrcDigiMal->getBinContent(i, j);
114  Float_t fCStatus = h2SrcCStatus->getBinContent(i, j);
115 
116  Float_t fRes = 0;
117  if (fCStatus > 0 || fDigiMal > 0)
118  fRes = 2;
119  else if (fDigiOcc > 0)
120  fRes = 1;
121 
122  h2Sum->setBinContent(i, j, fRes);
123  }
124  }
125 }

References dqm::impl::MonitorElement::getBinContent(), dqm::impl::MonitorElement::getNbinsY(), mps_fire::i, dqmiolumiharvest::j, anotherprimaryvertexanalyzer_cfi::nBinX, anotherprimaryvertexanalyzer_cfi::nBinY, and dqm::impl::MonitorElement::setBinContent().

Member Data Documentation

◆ fReportSummary_

Float_t GEMDQMHarvester::fReportSummary_
protected

Definition at line 44 of file GEMDQMHarvester.cc.

◆ strDirSummary_

std::string GEMDQMHarvester::strDirSummary_
protected

Definition at line 47 of file GEMDQMHarvester.cc.

◆ strOutFile_

std::string GEMDQMHarvester::strOutFile_
protected

Definition at line 45 of file GEMDQMHarvester.cc.

GEMDQMHarvester::drawSummaryHistogram
void drawSummaryHistogram(edm::Service< DQMStore > &store)
Definition: GEMDQMHarvester.cc:82
mps_fire.i
i
Definition: mps_fire.py:428
GEMDQMHarvester::fReportSummary_
Float_t fReportSummary_
Definition: GEMDQMHarvester.cc:44
dqm::implementation::IBooker::bookFloat
MonitorElement * bookFloat(TString const &name, FUNC onbooking=NOOP())
Definition: DQMStore.h:80
GEMDQMHarvester::strOutFile_
std::string strOutFile_
Definition: GEMDQMHarvester.cc:45
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
dqm::legacy::MonitorElement
Definition: MonitorElement.h:462
GEMDQMHarvester::strDirSummary_
std::string strDirSummary_
Definition: GEMDQMHarvester.cc:47
GEMDQMHarvester::createSummaryHist
void createSummaryHist(edm::Service< DQMStore > &store, MonitorElement *h2Src, MonitorElement *&h2Sum)
Definition: GEMDQMHarvester.cc:70
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
dqm::implementation::DQMStore::setCurrentFolder
void setCurrentFolder(std::string const &fullpath) override
Definition: DQMStore.h:569
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
anotherprimaryvertexanalyzer_cfi.nBinY
nBinY
Definition: anotherprimaryvertexanalyzer_cfi.py:13
dqm::impl::MonitorElement::getNbinsY
virtual int getNbinsY() const
get # of bins in Y-axis
Definition: MonitorElement.cc:580
edm::Service
Definition: Service.h:30
dqm::impl::MonitorElement::setBinLabel
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:771
GEMDQMHarvester::refineSummaryHistogram
void refineSummaryHistogram(MonitorElement *h2Sum, MonitorElement *h2SrcDigiOcc, MonitorElement *h2SrcDigiMal, MonitorElement *h2SrcCStatus)
Definition: GEMDQMHarvester.cc:103
looper.cfg
cfg
Definition: looper.py:297
dqm::impl::MonitorElement::setBinContent
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
Definition: MonitorElement.cc:691
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
dqm::implementation::IBooker::book2D
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:177
dqm::impl::MonitorElement::getNbinsX
virtual int getNbinsX() const
get # of bins in X-axis
Definition: MonitorElement.cc:574
anotherprimaryvertexanalyzer_cfi.nBinX
nBinX
Definition: anotherprimaryvertexanalyzer_cfi.py:12
dqm::implementation::IGetter::get
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:651
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
dqm::impl::MonitorElement::getBinContent
virtual double getBinContent(int binx) const
get content of bin (1-D)
Definition: MonitorElement.cc:592
dqm::legacy::MonitorElement::getTH2F
virtual TH2F * getTH2F() const
Definition: MonitorElement.h:491