CMS 3D CMS Logo

SiStripQualityChecker.cc
Go to the documentation of this file.
6 
8 
10 
14 
17 
20 
21 
22 #include <iomanip>
23 //
24 // -- Constructor
25 //
27  edm::LogInfo("SiStripQualityChecker") <<
28  " Creating SiStripQualityChecker " << "\n" ;
29 
30  bookedStripStatus_ = false;
31 
32  SubDetFolderMap.insert(std::pair<std::string, std::string>("TIB", "TIB"));
33  SubDetFolderMap.insert(std::pair<std::string, std::string>("TOB", "TOB"));
34  SubDetFolderMap.insert(std::pair<std::string, std::string>("TECF", "TEC/PLUS"));
35  SubDetFolderMap.insert(std::pair<std::string, std::string>("TECB", "TEC/MINUS"));
36  SubDetFolderMap.insert(std::pair<std::string, std::string>("TIDF", "TID/PLUS"));
37  SubDetFolderMap.insert(std::pair<std::string, std::string>("TIDB", "TID/MINUS"));
38  badModuleList.clear();
39 }
40 //
41 // -- Destructor
42 //
44  edm::LogInfo("SiStripQualityChecker") <<
45  " Deleting SiStripQualityChecker " << "\n" ;
46 }
47 //
48 // -- create reportSummary MEs
49 //
51 
52  if (!bookedStripStatus_) {
53  dqm_store->cd();
54  std::string strip_dir = "";
55  SiStripUtility::getTopFolderPath(dqm_store, "SiStrip", strip_dir);
56  if (strip_dir.empty()) strip_dir = "SiStrip";
57 
58  // Non Standard Plots and should be put outside EventInfo folder
59 
60  dqm_store->setCurrentFolder(strip_dir+"/MechanicalView");
61 
62  std::string hname, htitle;
63  hname = "detFractionReportMap";
64  htitle = "SiStrip Report for Good Detector Fraction";
65  DetFractionReportMap = dqm_store->book2D(hname, htitle, 6,0.5,6.5,9,0.5,9.5);
66  DetFractionReportMap->setAxisTitle("Sub Detector Type", 1);
67  DetFractionReportMap->setAxisTitle("Layer/Disc Number", 2);
68 
69  hname = "detFractionReportMap_hasBadChan";
70  htitle = "SiStrip Report for Good Detector Fraction due to bad channels";
71  DetFractionReportMap_hasBadChan = dqm_store->book2D(hname, htitle, 6,0.5,6.5,9,0.5,9.5);
72  DetFractionReportMap_hasBadChan->setAxisTitle("Sub Detector Type", 1);
73  DetFractionReportMap_hasBadChan->setAxisTitle("Layer/Disc Number", 2);
74  hname = "detFractionReportMap_hasTooManyDigis";
75  htitle = "SiStrip Report for Good Detector Fraction due to too many digis";
76  DetFractionReportMap_hasTooManyDigis = dqm_store->book2D(hname, htitle, 6,0.5,6.5,9,0.5,9.5);
77  DetFractionReportMap_hasTooManyDigis->setAxisTitle("Sub Detector Type", 1);
78  DetFractionReportMap_hasTooManyDigis->setAxisTitle("Layer/Disc Number", 2);
79  hname = "detFractionReportMap_hasTooManyClu";
80  htitle = "SiStrip Report for Good Detector Fraction due to too many clusters";
81  DetFractionReportMap_hasTooManyClu = dqm_store->book2D(hname, htitle, 6,0.5,6.5,9,0.5,9.5);
82  DetFractionReportMap_hasTooManyClu->setAxisTitle("Sub Detector Type", 1);
83  DetFractionReportMap_hasTooManyClu->setAxisTitle("Layer/Disc Number", 2);
84  hname = "detFractionReportMap_hasExclFed";
85  htitle = "SiStrip Report for Good Detector Fraction due to excluded FEDs";
86  DetFractionReportMap_hasExclFed = dqm_store->book2D(hname, htitle, 6,0.5,6.5,9,0.5,9.5);
87  DetFractionReportMap_hasExclFed->setAxisTitle("Sub Detector Type", 1);
88  DetFractionReportMap_hasExclFed->setAxisTitle("Layer/Disc Number", 2);
89  hname = "detFractionReportMap_hasDcsErr";
90  htitle = "SiStrip Report for Good Detector Fraction due to DCS errors";
91  DetFractionReportMap_hasDcsErr = dqm_store->book2D(hname, htitle, 6,0.5,6.5,9,0.5,9.5);
92  DetFractionReportMap_hasDcsErr->setAxisTitle("Sub Detector Type", 1);
93  DetFractionReportMap_hasDcsErr->setAxisTitle("Layer/Disc Number", 2);
94 
95  hname = "sToNReportMap";
96  htitle = "SiStrip Report for Signal-to-Noise";
97  SToNReportMap = dqm_store->book2D(hname, htitle, 6,0.5,6.5,9,0.5,9.5);
98  SToNReportMap->setAxisTitle("Sub Detector Type", 1);
99  SToNReportMap->setAxisTitle("Layer/Disc Number", 2);
100 
101  // this is the main reportSummary 2D plot and should be in EventInfo
102  dqm_store->setCurrentFolder(strip_dir+"/EventInfo");
103 
104  hname = "reportSummaryMap";
105  htitle = "SiStrip Report Summary Map";
106  SummaryReportMap = dqm_store->book2D(hname, htitle, 6,0.5,6.5,9,0.5,9.5);
107  SummaryReportMap->setAxisTitle("Sub Detector Type", 1);
108  SummaryReportMap->setAxisTitle("Layer/Disc Number", 2);
109 
110  SummaryReportGlobal = dqm_store->bookFloat("reportSummary");
111  int ibin = 0;
112 
113  dqm_store->setCurrentFolder(strip_dir+"/EventInfo/reportSummaryContents");
114  for (std::map<std::string, std::string>::const_iterator it = SubDetFolderMap.begin();
115  it != SubDetFolderMap.end(); it++) {
116  ibin++;
117  std::string det = it->first;
118  DetFractionReportMap->setBinLabel(ibin,it->second);
119  DetFractionReportMap_hasBadChan ->setBinLabel(ibin,it->second);
122  DetFractionReportMap_hasExclFed ->setBinLabel(ibin,it->second);
123  DetFractionReportMap_hasDcsErr ->setBinLabel(ibin,it->second);
124  SToNReportMap->setBinLabel(ibin,it->second);
125  SummaryReportMap->setBinLabel(ibin,it->second);
126 
127  SubDetMEs local_mes;
128 
129  if (det == "TECF") local_mes.detectorTag = "TEC+";
130  else if (det == "TECB") local_mes.detectorTag = "TEC-";
131  else if (det == "TIDF") local_mes.detectorTag = "TID+";
132  else if (det == "TIDB") local_mes.detectorTag = "TID-";
133  else local_mes.detectorTag = det;
134 
135  std::string me_name;
136  me_name = "SiStrip_" + det;
137  local_mes.SummaryFlag = dqm_store->bookFloat(me_name);
138 
139  me_name = "SiStrip_DetFraction_" + det;
140  local_mes.DetFraction = dqm_store->bookFloat(me_name);
141 
142  me_name = "SiStrip_SToNFlag_" + det;
143  local_mes.SToNFlag = dqm_store->bookFloat(me_name);
144  SubDetMEsMap.insert(std::pair<std::string, SubDetMEs>(det, local_mes));
145  }
146  bookedStripStatus_ = true;
147  }
148 }
149 //
150 // -- Fill Dummy Status
151 //
153 
154  resetStatus();
155  if (bookedStripStatus_) {
156  for (std::map<std::string, SubDetMEs>::const_iterator it = SubDetMEsMap.begin();
157  it != SubDetMEsMap.end(); it++) {
158  SubDetMEs local_mes = it->second;
159  local_mes.SummaryFlag -> Fill(-1.0);
160  local_mes.DetFraction -> Fill(-1.0);
161  local_mes.SToNFlag -> Fill(-1.0);
162  }
163 
164  for (int xbin = 1; xbin < SummaryReportMap->getNbinsX()+1; xbin++) {
165  for (int ybin = 1; ybin < SummaryReportMap->getNbinsY()+1; ybin++) {
166  SummaryReportMap -> Fill(xbin, ybin, -1.0);
167  DetFractionReportMap -> Fill(xbin, ybin, -1.0);
168  DetFractionReportMap_hasBadChan -> Fill(xbin, ybin, -1.0);
169  DetFractionReportMap_hasTooManyDigis -> Fill(xbin, ybin, -1.0);
170  DetFractionReportMap_hasTooManyClu -> Fill(xbin, ybin, -1.0);
171  DetFractionReportMap_hasExclFed -> Fill(xbin, ybin, -1.0);
172  DetFractionReportMap_hasDcsErr -> Fill(xbin, ybin, -1.0);
173  SToNReportMap -> Fill(xbin, ybin, -1.0);
174  }
175  }
176  SummaryReportGlobal->Fill(-1.0);
177  }
178 }
179 //
180 // -- Reset Status
181 //
183  if (bookedStripStatus_) {
184  for (std::map<std::string, SubDetMEs>::const_iterator it = SubDetMEsMap.begin();
185  it != SubDetMEsMap.end(); it++) {
186  SubDetMEs local_mes = it->second;
187  local_mes.DetFraction -> Reset();
188  local_mes.SummaryFlag -> Reset();
189  local_mes.SToNFlag -> Reset();
190  }
198  SToNReportMap->Reset();
199 
201  }
202 }
203 //
204 // -- Fill Status
205 //
207  if (!bookedStripStatus_) bookStatus(dqm_store);
208 
209  edm::ESHandle<TkDetMap> tkMapHandle;
210  eSetup.get<TrackerTopologyRcd>().get(tkMapHandle);
211  tkDetMap_ = tkMapHandle.product();
212 
213  fillDummyStatus();
214  fillDetectorStatus(dqm_store, cabling);
215 
216  int faulty_moduleflag = pSet_.getUntrackedParameter<bool>("PrintFaultyModuleList", false);
217  if (faulty_moduleflag) fillFaultyModuleStatus(dqm_store, eSetup);
218 }
219 //
220 // Fill Detector Status
221 //
223  unsigned int xbin = 0;
224  float global_flag = 0;
225  dqm_store->cd();
226  std::string mdir = "MechanicalView";
227  if (!SiStripUtility::goToDir(dqm_store, mdir)) return;
228  std::string mechanicalview_dir = dqm_store->pwd();
229 
231  for (std::map<std::string, SubDetMEs>::const_iterator it = SubDetMEsMap.begin();
232  it != SubDetMEsMap.end(); it++) {
233  std::string det = it->first;
234  std::map<std::string, std::string>::const_iterator cPos = SubDetFolderMap.find(det);
235  if (cPos == SubDetFolderMap.end()) continue;
236  std::string dname = mechanicalview_dir + "/" + cPos->second;
237  if (!dqm_store->dirExists(dname)) continue;
238  dqm_store->cd(dname);
239  SubDetMEs local_mes = it->second;
240  xbin++;
241  float flag;
242  fillSubDetStatus(dqm_store, cabling, local_mes, xbin,flag);
243  global_flag += flag;
244  }
245  global_flag = global_flag/xbin*1.0;
246  if (SummaryReportGlobal) SummaryReportGlobal->Fill(global_flag);
247  dqm_store->cd();
248 }
249 //
250 // -- Fill Sub detector Reports
251 //
253  const edm::ESHandle< SiStripDetCabling >& cabling,
254  SubDetMEs& mes, unsigned int xbin, float& gflag) {
255 
256  int status_flag = pSet_.getUntrackedParameter<int>("GlobalStatusFilling", 1);
257  if (status_flag < 1) return;
258 
259  std::vector<std::string> subDirVec = dqm_store->getSubdirs();
260 
261  unsigned int ybin = 0;
262  int tot_ndet = 0;
263  int tot_errdet = 0;
264  float tot_ston_stat = 0;
265 
266  for (std::vector<std::string>::const_iterator ic = subDirVec.begin();
267  ic != subDirVec.end(); ic++) {
268  std::string dname = (*ic);
269  if (dname.find("BadModuleList") != std::string::npos) continue;
270  if (dname.find("ring") !=std::string::npos) continue;
271  std::vector<MonitorElement*> meVec;
272 
273  ybin++;
274  dqm_store->cd((*ic));
275  meVec = dqm_store->getContents((*ic));
276  uint16_t ndet = 100;
277  int errdet = 0;
278  int errdet_hasBadChan = 0;
279  int errdet_hasTooManyDigis = 0;
280  int errdet_hasTooManyClu = 0;
281  int errdet_hasExclFed = 0;
282  int errdet_hasDcsErr = 0;
283 
284  int ston_stat = 1;
285  int lnum = atoi(dname.substr(dname.find_last_of("_")+1).c_str());
286  ndet = cabling->connectedNumber(mes.detectorTag, lnum);
287 
288  getModuleStatus(dqm_store, meVec, errdet, errdet_hasBadChan, errdet_hasTooManyDigis, errdet_hasTooManyClu, errdet_hasExclFed, errdet_hasDcsErr);
289 
290  for (std::vector<MonitorElement*>::const_iterator it = meVec.begin();
291  it != meVec.end(); it++) {
292  MonitorElement * me = (*it);
293  if (!me) continue;
294  std::vector<QReport *> reports = me->getQReports();
295 
296  if (reports.empty()) continue;
297  std::string name = me->getName();
298 
299  if( name.find("Summary_ClusterStoNCorr__OnTrack") != std::string::npos){
300  int istat = SiStripUtility::getMEStatus((*it));
301  if (reports[0]->getQTresult() == -1) {
302  ston_stat =-1;
303  } else {
304  if (istat == dqm::qstatus::ERROR) ston_stat = 0;
305  else if (istat == dqm::qstatus::STATUS_OK) ston_stat = 1;
306  }
307  }
308  }
309  if (ndet > 0) {
310  float eff_fac = 1 - (errdet*1.0/ndet);
311  float eff_fac_hasBadChan = 1 - (errdet_hasBadChan *1.0/ndet);
312  float eff_fac_hasTooManyDigis = 1 - (errdet_hasTooManyDigis*1.0/ndet);
313  float eff_fac_hasTooManyClu = 1 - (errdet_hasTooManyClu *1.0/ndet);
314  float eff_fac_hasExclFed = 1 - (errdet_hasExclFed *1.0/ndet);
315  float eff_fac_hasDcsErr = 1 - (errdet_hasDcsErr *1.0/ndet);
316  fillStatusHistogram(SToNReportMap, xbin, ybin, ston_stat);
317  fillStatusHistogram(DetFractionReportMap, xbin, ybin, eff_fac);
318  fillStatusHistogram(DetFractionReportMap_hasBadChan , xbin, ybin, eff_fac_hasBadChan );
319  fillStatusHistogram(DetFractionReportMap_hasTooManyDigis, xbin, ybin, eff_fac_hasTooManyDigis);
320  fillStatusHistogram(DetFractionReportMap_hasTooManyClu , xbin, ybin, eff_fac_hasTooManyClu );
321  fillStatusHistogram(DetFractionReportMap_hasExclFed , xbin, ybin, eff_fac_hasExclFed );
322  fillStatusHistogram(DetFractionReportMap_hasDcsErr , xbin, ybin, eff_fac_hasDcsErr );
323  if (ston_stat < 0) fillStatusHistogram(SummaryReportMap, xbin, ybin, eff_fac);
324  else fillStatusHistogram(SummaryReportMap, xbin, ybin, ston_stat*eff_fac);
325 
326  tot_ndet += ndet;
327  tot_errdet += errdet;
328  tot_ston_stat += ston_stat;
329  }
330  dqm_store->cd((*ic));
331  }
332  if (tot_ndet > 0) {
333  float tot_eff_fac = 1 - (tot_errdet*1.0/tot_ndet);
334  if (mes.DetFraction) mes.DetFraction->Fill(tot_eff_fac);
335  float tot_ston_fac = tot_ston_stat/ybin;
336  if (mes.SToNFlag) mes.SToNFlag->Fill(tot_ston_fac);
337  if (tot_ston_fac < 0){
338  gflag = tot_eff_fac;
339  }else{
340  gflag = std::min(tot_eff_fac,tot_ston_fac);
341  }
342  if (mes.SummaryFlag) mes.SummaryFlag->Fill(gflag);
343  }
344 }
345 //
346 // -- Print Status Report
347 //
349  std::ostringstream det_summary_str;
350  for (std::map<std::string, SubDetMEs>::const_iterator it = SubDetMEsMap.begin();
351  it != SubDetMEsMap.end(); it++) {
352  std::string det = it->first;
353  det_summary_str << std::setprecision(4);
354  det_summary_str << std::setiosflags(std::ios::fixed);
355 
356  det_summary_str << " Printing Status for " << det << " : " << std::endl;
357  SubDetMEs local_mes = it->second;
358 
359  std::string sval;
360  float fval1, fval2, fval3;
361  fval1 = fval2 = fval3 = -1.0;
362 
363 
364  SiStripUtility::getMEValue(local_mes.DetFraction, sval);
365  if (!sval.empty()) fval1 = atof(sval.c_str());
366  SiStripUtility::getMEValue(local_mes.SToNFlag, sval);
367  if (!sval.empty()) fval2 = atof(sval.c_str());
368  SiStripUtility::getMEValue(local_mes.SummaryFlag, sval);
369  if (!sval.empty()) fval3 = atof(sval.c_str());
370 
371  det_summary_str << std::setw(7) << " % of good detectors " << fval1
372  << " SToN Flag " << fval2
373  << " Summary Flag " << fval3 << std::endl;
374  }
375 }
376 //
377 // -- Get Module Status from Layer Level Histograms
378 //
379 void SiStripQualityChecker::getModuleStatus(DQMStore* dqm_store, std::vector<MonitorElement*>& layer_mes,int& errdet, int& errdet_hasBadChan, int& errdet_hasTooManyDigis, int& errdet_hasTooManyClu, int& errdet_hasExclFed, int& errdet_hasDcsErr) {
380 
381  std::string lname;
382  std::map<uint32_t,uint16_t> bad_modules;
383  for (std::vector<MonitorElement*>::const_iterator it = layer_mes.begin();
384  it != layer_mes.end(); it++) {
385  MonitorElement * me = (*it);
386  if (!me) continue;
387  std::vector<QReport *> qreports = me->getQReports();
388  if (qreports.empty()) continue;
389  std::string name = me->getName();
390  std::vector<DQMChannel> bad_channels_me;
392  bad_channels_me = qreports[0]->getBadChannels();
393  lname = "";
394  } else if (me->kind() == MonitorElement::DQM_KIND_TPROFILE2D && name.find("TkHMap") != std::string::npos) {
395  bad_channels_me = qreports[0]->getBadChannels();
396  lname = name.substr(name.find("TkHMap_")+7);
397  lname = lname.substr(lname.find("_T")+1);
398 
399  }
400  for (std::vector<DQMChannel>::iterator it = bad_channels_me.begin(); it != bad_channels_me.end(); it++){
401  int xval = (*it).getBinX();
402  int yval = (*it).getBinY();
403  uint32_t detId = tkDetMap_->getDetFromBin(lname, xval, yval);
404  std::map<uint32_t,uint16_t>::iterator iPos = bad_modules.find(detId);
405  uint16_t flag;
406  if (iPos != bad_modules.end()){
407  flag = iPos->second;
409  iPos->second = flag;
410  } else {
411  //
412  //if not in the local bad module list, check the BadModuleList dir
413  //
414  std::ostringstream detid_str;
415  detid_str << detId;
416  //now in the layer/wheel dir
417  const std::string& currentdir = dqm_store->pwd();
418  std::string thisMEpath = currentdir.substr( 0 , currentdir.rfind( "/" ) ) + "/BadModuleList/" + detid_str.str() ;
419 
420  MonitorElement *meBadModule = dqm_store->get ( thisMEpath );
421  if ( meBadModule )
422  {
423  std::string val_str;
424  SiStripUtility::getMEValue ( meBadModule , val_str );
425  flag = atoi ( val_str.c_str() );
426  }
427  else
428  flag = 0;
429 
431  bad_modules.insert(std::pair<uint32_t,uint16_t>(detId,flag));
432  }
433  }
434  }
435  for(std::map<uint32_t,uint16_t>::const_iterator it = bad_modules.begin();
436  it != bad_modules.end(); it++) {
437  uint32_t detId = it->first;
438  uint16_t flag = it->second;
439  if (((flag >> 0) & 0x1) > 0) errdet_hasBadChan++;
440  if (((flag >> 1) & 0x1) > 0) errdet_hasTooManyDigis++;
441  if (((flag >> 2) & 0x1) > 0) errdet_hasTooManyClu++;
442  if (((flag >> 3) & 0x1) > 0) errdet_hasExclFed++;
443  if (((flag >> 4) & 0x1) > 0) errdet_hasDcsErr++;
444  std::map<uint32_t,uint16_t>::iterator iPos = badModuleList.find(detId);
445  if (iPos != badModuleList.end()){
446  iPos->second = flag;
447  } else {
448  badModuleList.insert(std::pair<uint32_t,uint16_t>(detId,flag));
449  }
450  }
451  errdet = bad_modules.size();
452 }
453 //
454 // -- Fill Report Summary Map
455 //
456  void SiStripQualityChecker::fillStatusHistogram(MonitorElement* me, int xbin, int ybin, float val){
457  if (me && me->kind() == MonitorElement::DQM_KIND_TH2F) {
458  TH2F* th2d = me->getTH2F();
459  th2d->SetBinContent(xbin, ybin, val);
460  }
461  }
462 //
463 // -- Create Monitor Elements for Modules
464 //
466  if (badModuleList.empty()) return;
467 
468  //Retrieve tracker topology from geometry
469  edm::ESHandle<TrackerTopology> tTopoHandle;
470  eSetup.get<TrackerTopologyRcd>().get(tTopoHandle);
471  const TrackerTopology* const tTopo = tTopoHandle.product();
472 
473  dqm_store->cd();
474  std::string mdir = "MechanicalView";
475  if (!SiStripUtility::goToDir(dqm_store, mdir)) return;
476  std::string mechanical_dir = dqm_store->pwd();
477 
478  SiStripFolderOrganizer folder_organizer;
479  for (std::map<uint32_t,uint16_t>::const_iterator it = badModuleList.begin() ; it != badModuleList.end(); it++) {
480  uint32_t detId = it->first;
481  std::string subdet_folder ;
482  folder_organizer.getSubDetFolder(detId,tTopo,subdet_folder);
483  if (!dqm_store->dirExists(subdet_folder)) {
484  subdet_folder = mechanical_dir + subdet_folder.substr(subdet_folder.find("MechanicalView")+14);
485  if (!dqm_store->dirExists(subdet_folder)) continue;
486  }
487  std::string bad_module_folder = subdet_folder + "/" + "BadModuleList";
488  dqm_store->setCurrentFolder(bad_module_folder);
489 
490  std::ostringstream detid_str;
491  detid_str << detId;
492  std::string full_path = bad_module_folder + "/" + detid_str.str();
493  MonitorElement* me = dqm_store->get(full_path);
494  if (me) me->Reset();
495  else me = dqm_store->bookInt(detid_str.str());
496  me->Fill(it->second);
497  }
498  dqm_store->cd();
499 }
500 //
501 // -- Initialise Bad Module List
502 //
504  for (std::map<uint32_t,uint16_t>::iterator it=badModuleList.begin(); it!=badModuleList.end(); it++) {
505  it->second = 0;
506  }
507 }
508 //
509 // -- Fill Status information and the lumi block
510 //
512  if (!bookedStripStatus_) bookStatus(dqm_store);
513  fillDummyStatus();
514  fillDetectorStatusAtLumi(dqm_store);
515 }
516 //
517 // Fill Detector Status MEs at the Lumi block
518 //
520 
521 
522 
523  dqm_store->cd();
524  std::string rdir = "ReadoutView";
525  if (!SiStripUtility::goToDir(dqm_store, rdir)) return;
526  std::string fullpath = dqm_store->pwd()
527  // + "/FedSummary/PerLumiSection/"
528  + "/PerLumiSection/"
529  + "lumiErrorFraction";
530  MonitorElement* me = dqm_store->get(fullpath);
531  if (me && me->kind() == MonitorElement::DQM_KIND_TH1F) {
532  TH1F* th1 = me->getTH1F();
533  float global_fraction = 0.0;
534  float dets = 0.0;
535  for (int ibin = 1; ibin <= th1->GetNbinsX(); ibin++) {
536  std::string label = th1->GetXaxis()->GetBinLabel(ibin);
537  std::map<std::string, SubDetMEs>::iterator iPos = SubDetMEsMap.find(label);
538  if (iPos != SubDetMEsMap.end()) {
539  float fraction = 1.0 - th1->GetBinContent(ibin);
540  global_fraction += fraction;
541  dets++;
542  iPos->second.DetFraction -> Fill(fraction);
543  iPos->second.SToNFlag -> Fill(-1.0);
544  iPos->second.SummaryFlag -> Fill(fraction);
545  }
546  }
547  global_fraction = global_fraction/dets;
548  if (SummaryReportGlobal) SummaryReportGlobal->Fill(global_fraction);
549  }
550  dqm_store->cd();
551 }
void fillStatus(DQMStore *dqm_store, const edm::ESHandle< SiStripDetCabling > &cabling, const edm::EventSetup &eSetup)
static void setBadModuleFlag(std::string &hname, uint16_t &flg)
T getUntrackedParameter(std::string const &, T const &) const
const std::string & pwd() const
Definition: DQMStore.cc:718
void getSubDetFolder(const uint32_t &detid, const TrackerTopology *tTopo, std::string &folder_name)
void bookStatus(DQMStore *dqm_store)
void fillDetectorStatusAtLumi(DQMStore *dqm_store)
void fillDetectorStatus(DQMStore *dqm_store, const edm::ESHandle< SiStripDetCabling > &cabling)
static void getMEValue(MonitorElement *me, std::string &val)
std::map< std::string, std::string > SubDetFolderMap
TH1F * getTH1F() const
MonitorElement * DetFractionReportMap_hasTooManyDigis
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)
const std::string & getName() const
get name of ME
uint32_t connectedNumber(const std::string &subDet, const uint16_t layer) const
MonitorElement * bookFloat(const char *name)
Book float.
Definition: DQMStore.cc:977
SiStripQualityChecker(edm::ParameterSet const &ps)
void Fill(long long x)
std::map< std::string, SubDetMEs > SubDetMEsMap
currentdir
parse figure configuration if found
Definition: lumiPlot.py:48
void fillFaultyModuleStatus(DQMStore *dqm_store, const edm::EventSetup &eSetup)
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
T min(T a, T b)
Definition: MathUtil.h:58
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
Definition: DQMStore.cc:1812
void Reset()
reset ME (ie. contents, errors, etc)
std::vector< MonitorElement * > getContents(const std::string &path) const
Definition: DQMStore.cc:1840
std::vector< std::string > getSubdirs() const
Definition: DQMStore.cc:1763
MonitorElement * DetFractionReportMap
MonitorElement * DetFractionReportMap_hasTooManyClu
void getModuleStatus(DQMStore *dqm_store, std::vector< MonitorElement * > &layer_mes, int &errdet, int &errdet_hasBadChan, int &errdet_hasTooManyDigis, int &errdet_hasTooManyClu, int &errdet_hasExclFed, int &errdet_hasDcsErr)
TH2F * getTH2F() const
bool dirExists(const std::string &path) const
true if directory exists
Definition: DQMStore.cc:811
void cd()
go to top directory (ie. root)
Definition: DQMStore.cc:723
static int getMEStatus(MonitorElement *me)
MonitorElement * DetFractionReportMap_hasBadChan
const T & get() const
Definition: EventSetup.h:58
std::vector< QReport * > getQReports() const
get map of QReports
void fillStatusAtLumi(DQMStore *dqm_store)
MonitorElement * SummaryReportMap
int getNbinsY() const
get # of bins in Y-axis
MonitorElement * SummaryReportGlobal
MonitorElement * SToNReportMap
MonitorElement * DetFractionReportMap_hasExclFed
DetId getDetFromBin(int layer, int ix, int iy) const
Definition: TkDetMap.h:139
static const int STATUS_OK
std::map< uint32_t, uint16_t > badModuleList
void Reset(std::vector< TH2F > &depth)
int getNbinsX() const
get # of bins in X-axis
MonitorElement * bookInt(const char *name)
Book int.
Definition: DQMStore.cc:947
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:1168
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void fillSubDetStatus(DQMStore *dqm_store, const edm::ESHandle< SiStripDetCabling > &cabling, SubDetMEs &mes, unsigned int xbin, float &gflag)
static bool goToDir(DQMStore *dqm_store, std::string name)
T const * product() const
Definition: ESHandle.h:86
MonitorElement * DetFractionReportMap_hasDcsErr
Kind kind() const
Get the type of the monitor element.
static void getTopFolderPath(DQMStore *dqm_store, std::string top_dir, std::string &path)
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:746
static const int ERROR
void fillStatusHistogram(MonitorElement *, int xbin, int ybin, float val)