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

- 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 ( const edm::ParameterSet ps)

Constructor.

Definition at line 10 of file ESSummaryClient.cc.

References meReportSummaryContents_.

10  :
11  ESClient(ps),
12  meReportSummary_(nullptr),
13  meReportSummaryMap_(nullptr)
14 {
15  for(unsigned iZ(0); iZ != 2; ++iZ)
16  for(unsigned iD(0); iD != 2; ++iD)
17  meReportSummaryContents_[iZ][iD] = nullptr;
18 }
ESClient(edm::ParameterSet const &)
Definition: ESClient.cc:5
MonitorElement * meReportSummary_
MonitorElement * meReportSummaryContents_[2][2]
MonitorElement * meReportSummaryMap_
ESSummaryClient::~ESSummaryClient ( )
override

Destructor.

Definition at line 20 of file ESSummaryClient.cc.

20  {
21 }

Member Function Documentation

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

Reimplemented from ESClient.

Definition at line 23 of file ESSummaryClient.cc.

References DQMStore::IBooker::book2D(), DQMStore::IBooker::bookFloat(), gather_cfg::cout, ESClient::debug_, trackerHits::histo, mps_fire::i, meReportSummary_, meReportSummaryContents_, meReportSummaryMap_, ESClient::prefixME_, MonitorElement::setAxisTitle(), and DQMStore::IBooker::setCurrentFolder().

23  {
24 
25  if ( debug_ ) cout << "ESSummaryClient: setup" << endl;
26 
27  _ibooker.setCurrentFolder( prefixME_ + "/EventInfo" );
28 
29  meReportSummary_ = _ibooker.bookFloat("reportSummary");
30 
31  _ibooker.setCurrentFolder( prefixME_ + "/EventInfo/reportSummaryContents" );
32 
33  char histo[200];
34 
35  for (int i=0 ; i<2; ++i){
36  for (int j=0 ; j<2; ++j){
37  int iz = (i==0)? 1:-1;
38  sprintf(histo, "EcalPreshower Z %d P %d", iz, j+1);
39  meReportSummaryContents_[i][j] = _ibooker.bookFloat(histo);
40  }
41  }
42 
43  _ibooker.setCurrentFolder( prefixME_ + "/EventInfo" );
44 
45  meReportSummaryMap_ = _ibooker.book2D("reportSummaryMap", "reportSummaryMap", 80, 0.5, 80.5, 80, 0.5, 80.5);
48 
49 }
MonitorElement * meReportSummary_
MonitorElement * meReportSummaryContents_[2][2]
std::string prefixME_
Definition: ESClient.h:31
bool debug_
Definition: ESClient.h:34
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:277
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
MonitorElement * meReportSummaryMap_
MonitorElement * bookFloat(Args &&...args)
Definition: DQMStore.h:109
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void ESSummaryClient::endJobAnalyze ( DQMStore::IGetter _igetter)
overridevirtual

Reimplemented from ESClient.

Definition at line 179 of file ESSummaryClient.cc.

References fillReportSummary().

180 {
181  fillReportSummary(_igetter);
182 }
void fillReportSummary(DQMStore::IGetter &)
void ESSummaryClient::endLumiAnalyze ( DQMStore::IGetter _igetter)
overridevirtual

Analyze.

Reimplemented from ESClient.

Definition at line 156 of file ESSummaryClient.cc.

References MonitorElement::Fill(), HcalObjRepresent::Fill(), fillReportSummary(), DQMStore::IGetter::get(), mps_fire::i, meReportSummary_, meReportSummaryContents_, ESClient::prefixME_, and source.

156  {
157 
158  fillReportSummary(_igetter);
159 
160  // The following overwrites the report summary if LS-based Good Channel Fraction histogram is available
161  // The source is turned off by default in ESIntegrityTask
162 
163  MonitorElement* source(_igetter.get(prefixME_+"/ESIntegrityTask/ES Good Channel Fraction"));
164  if (!source) return;
165 
166  meReportSummary_->Fill(-1.0);
167  for(unsigned iZ(0); iZ != 2; ++iZ)
168  for(unsigned iD(0); iD != 2; ++iD)
169  meReportSummaryContents_[iZ][iD]->Fill(-1.);
170 
171  for (int i=0; i<2; ++i)
172  for (int j=0; j<2; ++j)
173  meReportSummaryContents_[i][j]->Fill(source->getBinContent(i+1, j+1));
174 
175  meReportSummary_->Fill(source->getBinContent(3,3));
176 }
MonitorElement * get(const std::string &path)
Definition: DQMStore.cc:305
MonitorElement * meReportSummary_
void Fill(long long x)
MonitorElement * meReportSummaryContents_[2][2]
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
std::string prefixME_
Definition: ESClient.h:31
void fillReportSummary(DQMStore::IGetter &)
static std::string const source
Definition: EdmProvDump.cc:43
void ESSummaryClient::fillReportSummary ( DQMStore::IGetter _igetter)
private

Definition at line 52 of file ESSummaryClient.cc.

References MonitorElement::Fill(), DQMStore::IGetter::get(), MonitorElement::getBinContent(), trackerHits::histo, mps_fire::i, meReportSummary_, meReportSummaryContents_, meReportSummaryMap_, AlCaHLTBitMon_ParallelJobs::p, ESClient::prefixME_, MonitorElement::setBinContent(), x, y, and z.

Referenced by endJobAnalyze(), and endLumiAnalyze().

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

Member Data Documentation

MonitorElement* ESSummaryClient::meReportSummary_
private

Definition at line 25 of file ESSummaryClient.h.

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

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

Definition at line 26 of file ESSummaryClient.h.

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

MonitorElement* ESSummaryClient::meReportSummaryMap_
private

Definition at line 27 of file ESSummaryClient.h.

Referenced by book(), and fillReportSummary().