CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
ESSummaryClient Class Reference

#include <ESSummaryClient.h>

Inheritance diagram for ESSummaryClient:
ESClient

Public Member Functions

void endJobAnalyze (DQMStore::IGetter &) override
 
void endLumiAnalyze (DQMStore::IGetter &) override
 Analyze. More...
 
 ESSummaryClient (const edm::ParameterSet &ps)
 Constructor. More...
 
 ~ESSummaryClient () override
 Destructor. More...
 
- Public Member Functions inherited from ESClient
 ESClient (edm::ParameterSet const &)
 
template<typename T >
TgetHisto (MonitorElement *, bool=false, T *=0) const
 
void setup (DQMStore::IBooker &)
 
virtual ~ESClient ()
 

Private Member Functions

void book (DQMStore::IBooker &) override
 
void fillReportSummary (DQMStore::IGetter &)
 

Private Attributes

MonitorElementmeReportSummary_
 
MonitorElementmeReportSummaryContents_ [2][2]
 
MonitorElementmeReportSummaryMap_
 

Additional Inherited Members

- Public Types inherited from ESClient
typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 
- Protected Attributes inherited from ESClient
bool cloneME_
 
bool debug_
 
bool initialized_
 
std::string prefixME_
 
bool verbose_
 

Detailed Description

Definition at line 6 of file ESSummaryClient.h.

Constructor & Destructor Documentation

◆ ESSummaryClient()

ESSummaryClient::ESSummaryClient ( const edm::ParameterSet ps)

Constructor.

Definition at line 10 of file ESSummaryClient.cc.

11  : ESClient(ps), meReportSummary_(nullptr), meReportSummaryMap_(nullptr) {
12  for (unsigned iZ(0); iZ != 2; ++iZ)
13  for (unsigned iD(0); iD != 2; ++iD)
14  meReportSummaryContents_[iZ][iD] = nullptr;
15 }

References meReportSummaryContents_.

◆ ~ESSummaryClient()

ESSummaryClient::~ESSummaryClient ( )
override

Destructor.

Definition at line 17 of file ESSummaryClient.cc.

17 {}

Member Function Documentation

◆ book()

void ESSummaryClient::book ( DQMStore::IBooker _ibooker)
overrideprivatevirtual

Reimplemented from ESClient.

Definition at line 19 of file ESSummaryClient.cc.

19  {
20  if (debug_)
21  cout << "ESSummaryClient: setup" << endl;
22 
23  _ibooker.setCurrentFolder(prefixME_ + "/EventInfo");
24 
25  meReportSummary_ = _ibooker.bookFloat("reportSummary");
26 
27  _ibooker.setCurrentFolder(prefixME_ + "/EventInfo/reportSummaryContents");
28 
29  char histo[200];
30 
31  for (int i = 0; i < 2; ++i) {
32  for (int j = 0; j < 2; ++j) {
33  int iz = (i == 0) ? 1 : -1;
34  sprintf(histo, "EcalPreshower Z %d P %d", iz, j + 1);
36  }
37  }
38 
39  _ibooker.setCurrentFolder(prefixME_ + "/EventInfo");
40 
41  meReportSummaryMap_ = _ibooker.book2D("reportSummaryMap", "reportSummaryMap", 80, 0.5, 80.5, 80, 0.5, 80.5);
44 }

References dqm::implementation::IBooker::book2D(), dqm::implementation::IBooker::bookFloat(), gather_cfg::cout, ESClient::debug_, timingPdfMaker::histo, mps_fire::i, dqmiolumiharvest::j, meReportSummary_, meReportSummaryContents_, meReportSummaryMap_, ESClient::prefixME_, dqm::impl::MonitorElement::setAxisTitle(), and dqm::implementation::NavigatorBase::setCurrentFolder().

◆ endJobAnalyze()

void ESSummaryClient::endJobAnalyze ( DQMStore::IGetter _igetter)
overridevirtual

Reimplemented from ESClient.

Definition at line 168 of file ESSummaryClient.cc.

168 { fillReportSummary(_igetter); }

References fillReportSummary().

◆ endLumiAnalyze()

void ESSummaryClient::endLumiAnalyze ( DQMStore::IGetter _igetter)
overridevirtual

Analyze.

Reimplemented from ESClient.

Definition at line 145 of file ESSummaryClient.cc.

145  {
146  fillReportSummary(_igetter);
147 
148  // The following overwrites the report summary if LS-based Good Channel
149  // Fraction histogram is available The source is turned off by default in
150  // ESIntegrityTask
151 
152  MonitorElement *source(_igetter.get(prefixME_ + "/ESIntegrityTask/ES Good Channel Fraction"));
153  if (!source)
154  return;
155 
156  meReportSummary_->Fill(-1.0);
157  for (unsigned iZ(0); iZ != 2; ++iZ)
158  for (unsigned iD(0); iD != 2; ++iD)
159  meReportSummaryContents_[iZ][iD]->Fill(-1.);
160 
161  for (int i = 0; i < 2; ++i)
162  for (int j = 0; j < 2; ++j)
163  meReportSummaryContents_[i][j]->Fill(source->getBinContent(i + 1, j + 1));
164 
165  meReportSummary_->Fill(source->getBinContent(3, 3));
166 }

References dqm::impl::MonitorElement::Fill(), HcalObjRepresent::Fill(), fillReportSummary(), dqm::implementation::IGetter::get(), mps_fire::i, dqmiolumiharvest::j, meReportSummary_, meReportSummaryContents_, ESClient::prefixME_, and source.

◆ fillReportSummary()

void ESSummaryClient::fillReportSummary ( DQMStore::IGetter _igetter)
private

Definition at line 46 of file ESSummaryClient.cc.

46  {
47  for (int i = 0; i < 80; i++) {
48  for (int j = 0; j < 80; j++) {
49  meReportSummaryMap_->setBinContent(i + 1, j + 1, -1.);
50  }
51  }
52 
53  char histo[200];
54 
55  float nDI_FedErr[80][80];
56  float DCC[80][80];
57  float eCount;
58 
60 
61  for (int i = 0; i < 80; ++i)
62  for (int j = 0; j < 80; ++j) {
63  nDI_FedErr[i][j] = -1;
64  DCC[i][j] = 0;
65  }
66 
67  for (int i = 0; i < 2; ++i) {
68  for (int j = 0; j < 2; ++j) {
69  int iz = (i == 0) ? 1 : -1;
70 
71  sprintf(histo, "ES Integrity Errors Z %d P %d", iz, j + 1);
72  me = _igetter.get(prefixME_ + "/ESIntegrityTask/" + histo);
73  if (me)
74  for (int x = 0; x < 40; ++x)
75  for (int y = 0; y < 40; ++y)
76  nDI_FedErr[i * 40 + x][(1 - j) * 40 + y] = me->getBinContent(x + 1, y + 1);
77 
78  sprintf(histo, "ES Integrity Summary 1 Z %d P %d", iz, j + 1);
79  me = _igetter.get(prefixME_ + "/ESIntegrityClient/" + histo);
80  if (me)
81  for (int x = 0; x < 40; ++x)
82  for (int y = 0; y < 40; ++y)
83  DCC[i * 40 + x][(1 - j) * 40 + y] = me->getBinContent(x + 1, y + 1);
84 
85  sprintf(histo, "ES RecHit 2D Occupancy Z %d P %d", iz, j + 1);
86  me = _igetter.get(prefixME_ + "/ESOccupancyTask/" + histo);
87  if (me)
88  eCount = me->getBinContent(40, 40);
89  else
90  eCount = 1.;
91  }
92  }
93 
94  // The global-summary
95  // ReportSummary Map
96  // ES+F ES-F
97  // ES+R ES-R
98  float nValidChannels = 0;
99  float nGlobalErrors = 0;
100  float nValidChannelsES[2][2] = {};
101  float nGlobalErrorsES[2][2] = {};
102 
103  for (int x = 0; x < 80; ++x) {
104  if (eCount < 1)
105  break; // Fill reportSummaryMap after have 1 event
106  for (int y = 0; y < 80; ++y) {
107  int z = (x < 40) ? 0 : 1;
108  int p = (y >= 40) ? 0 : 1;
109 
110  if (DCC[x][y] == 0.) {
111  meReportSummaryMap_->setBinContent(x + 1, y + 1, -1.);
112  } else {
113  if (nDI_FedErr[x][y] >= 0) {
114  meReportSummaryMap_->setBinContent(x + 1, y + 1, 1 - (nDI_FedErr[x][y] / eCount));
115 
116  nValidChannels++;
117  nGlobalErrors += nDI_FedErr[x][y] / eCount;
118 
119  nValidChannelsES[z][p]++;
120  nGlobalErrorsES[z][p] += nDI_FedErr[x][y] / eCount;
121  } else {
122  meReportSummaryMap_->setBinContent(x + 1, y + 1, -1.);
123  }
124  }
125  }
126  }
127 
128  for (unsigned iZ(0); iZ != 2; ++iZ) {
129  for (unsigned iD(0); iD != 2; ++iD) {
130  float reportSummaryES(-1.);
131  if (nValidChannelsES[iZ][iD] != 0)
132  reportSummaryES = 1. - nGlobalErrorsES[iZ][iD] / nValidChannelsES[iZ][iD];
133 
134  meReportSummaryContents_[iZ][iD]->Fill(reportSummaryES);
135  }
136  }
137 
138  float reportSummary(-1.);
139  if (nValidChannels != 0)
140  reportSummary = 1. - nGlobalErrors / nValidChannels;
141 
142  meReportSummary_->Fill(reportSummary);
143 }

References OccupancyTask_cfi::DCC, dqm::impl::MonitorElement::Fill(), dqm::implementation::IGetter::get(), timingPdfMaker::histo, mps_fire::i, dqmiolumiharvest::j, hlt_dqm_clientPB-live_cfg::me, meReportSummary_, meReportSummaryContents_, meReportSummaryMap_, AlCaHLTBitMon_ParallelJobs::p, ESClient::prefixME_, dqm::impl::MonitorElement::setBinContent(), x, y, and z.

Referenced by endJobAnalyze(), and endLumiAnalyze().

Member Data Documentation

◆ meReportSummary_

MonitorElement* ESSummaryClient::meReportSummary_
private

Definition at line 23 of file ESSummaryClient.h.

Referenced by book(), endLumiAnalyze(), and fillReportSummary().

◆ meReportSummaryContents_

MonitorElement* ESSummaryClient::meReportSummaryContents_[2][2]
private

Definition at line 24 of file ESSummaryClient.h.

Referenced by book(), endLumiAnalyze(), ESSummaryClient(), and fillReportSummary().

◆ meReportSummaryMap_

MonitorElement* ESSummaryClient::meReportSummaryMap_
private

Definition at line 25 of file ESSummaryClient.h.

Referenced by book(), and fillReportSummary().

ESSummaryClient::meReportSummaryMap_
MonitorElement * meReportSummaryMap_
Definition: ESSummaryClient.h:25
DDAxes::y
mps_fire.i
i
Definition: mps_fire.py:428
dqm::implementation::IBooker::bookFloat
MonitorElement * bookFloat(TString const &name, FUNC onbooking=NOOP())
Definition: DQMStore.h:80
ESClient::ESClient
ESClient(edm::ParameterSet const &)
Definition: ESClient.cc:5
gather_cfg.cout
cout
Definition: gather_cfg.py:144
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
timingPdfMaker.histo
histo
Definition: timingPdfMaker.py:278
dqm::legacy::MonitorElement
Definition: MonitorElement.h:462
ESSummaryClient::fillReportSummary
void fillReportSummary(DQMStore::IGetter &)
Definition: ESSummaryClient.cc:46
DDAxes::x
ESClient::prefixME_
std::string prefixME_
Definition: ESClient.h:32
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
DDAxes::z
source
static const std::string source
Definition: EdmProvDump.cc:47
ESSummaryClient::meReportSummaryContents_
MonitorElement * meReportSummaryContents_[2][2]
Definition: ESSummaryClient.h:24
ESSummaryClient::meReportSummary_
MonitorElement * meReportSummary_
Definition: ESSummaryClient.h:23
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
HcalObjRepresent::Fill
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
Definition: HcalObjRepresent.h:1053
ESClient::debug_
bool debug_
Definition: ESClient.h:35
dqm::impl::MonitorElement::setBinContent
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
Definition: MonitorElement.cc:682
OccupancyTask_cfi.DCC
DCC
Definition: OccupancyTask_cfi.py:29
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::implementation::IGetter::get
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:673
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
hlt_dqm_clientPB-live_cfg.me
me
Definition: hlt_dqm_clientPB-live_cfg.py:61
dqm::impl::MonitorElement::setAxisTitle
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:791