#include <DQM/HcalMonitorClient/interface/HcalSummaryClient.h>
Definition at line 47 of file HcalSummaryClient.h.
HcalSummaryClient::HcalSummaryClient | ( | ) |
HcalSummaryClient::~HcalSummaryClient | ( | ) | [virtual] |
Definition at line 272 of file HcalSummaryClient.cc.
References funct::abs(), analyze_subtask(), caloTowerMon_, GenMuonPlsPt100GeV_cfg::cout, dataFormatMon_, deadCellMon_, debug_, digiMon_, dqmStore_, lat::endl(), eta, etaBins_, etaMin_, MonitorElement::Fill(), HcalBaseClient::fillUnphysical_, DQMStore::get(), MonitorElement::getBinContent(), MonitorElement::getIntValue(), HBpresent_, HEpresent_, HFpresent_, HOpresent_, hotCellMon_, ievt_, int, SubTaskSummaryStatus::IsOn(), it, jevt_, ledMon_, max, me, pedestalMon_, phi, phiBins_, phiMin_, prefixME_, recHitMon_, resetSummaryPlot(), MonitorElement::setBinContent(), DQMStore::setCurrentFolder(), status_global_, status_HB_, status_HE_, status_HF_, status_HO_, status_ZDC_, subdetCells_, trigPrimMon_, and ZDCpresent_.
Referenced by HcalMonitorClient::analyze(), endJob(), and endRun().
00273 { 00274 if (debug_>0) 00275 cout <<"<HcalSummaryClient::analyze> Running analyze..."<<endl; 00276 if ( ievt_ % 10 == 0 ) 00277 { 00278 if ( debug_>1 ) 00279 cout << "<HcalSummaryClient::analyze> ievt/jevt = " << ievt_ << "/" << jevt_ << endl; 00280 } 00281 00282 // Reset summary map to 'unknown' status 00283 00284 MonitorElement* simpleMap = dqmStore_->get(prefixME_ + "/EventInfo/reportSummaryMap"); 00285 if (!simpleMap) 00286 { 00287 cout <<"<HcalSummaryClient::analyze> Could not get advancedReportSummaryMap!"<<endl; 00288 return; 00289 } 00290 for (int ix=1;ix<=5;++ix) 00291 simpleMap->setBinContent(ix,1,-1); 00292 00293 MonitorElement* reportMap = dqmStore_->get(prefixME_ + "/EventInfo/advancedReportSummaryMap"); 00294 // Set all bins to "unknown" to start 00295 for (int ieta=1;ieta<=etaBins_;++ieta) 00296 for (int iphi=1; iphi<=phiBins_;++iphi) 00297 reportMap->setBinContent(ieta,iphi,-1); 00298 00299 00300 // Set values to 'unknown' status; they'll be set by analyze_everything routines 00301 00302 00303 status_global_=-1; 00304 status_HB_=-1; 00305 status_HE_=-1; 00306 status_HO_=-1; 00307 status_HF_=-1; 00308 status_ZDC_=-1; 00309 00310 // check to find which subdetectors are present 00311 MonitorElement* temp_present; 00312 if (HBpresent_==0) 00313 { 00314 temp_present = dqmStore_->get(prefixME_+"/DQM Job Status/HBpresent"); 00315 if (temp_present) 00316 HBpresent_=temp_present->getIntValue(); 00317 } 00318 if (HEpresent_==0) 00319 { 00320 temp_present = dqmStore_->get(prefixME_+"/DQM Job Status/HEpresent"); 00321 if (temp_present) 00322 HEpresent_=temp_present->getIntValue(); 00323 } 00324 if (HOpresent_==0) 00325 { 00326 temp_present = dqmStore_->get(prefixME_+"/DQM Job Status/HOpresent"); 00327 if (temp_present) 00328 HOpresent_=temp_present->getIntValue(); 00329 } 00330 if (HFpresent_==0) 00331 { 00332 temp_present = dqmStore_->get(prefixME_+"/DQM Job Status/HFpresent"); 00333 if (temp_present) 00334 HFpresent_=temp_present->getIntValue(); 00335 } 00336 /* 00337 // not yet ready for ZDC checking 00338 if (ZDCpresent_==0) 00339 { 00340 temp_present = dqmStore_->get(prefixME_+"/DQM Job Status/ZDCpresent"); 00341 if (temp_present) 00342 ZDCpresent_=temp_present->getIntValue(); 00343 } 00344 */ 00345 00346 00347 if (debug_>1) 00348 cout <<"<HcalSummaryClient::analyze> HB present = "<<HBpresent_<<" "<<"HE present = "<<HEpresent_<<" "<<"HO present = "<<HOpresent_<<" "<<"HF present = "<<HFpresent_<<" ZDC present = "<<ZDCpresent_<<endl; 00349 00350 if (HBpresent_) status_HB_=0; 00351 if (HEpresent_) status_HE_=0; 00352 if (HOpresent_) status_HO_=0; 00353 if (HFpresent_) status_HF_=0; 00354 if (ZDCpresent_) status_ZDC_=0; 00355 if (HBpresent_ || HEpresent_ || HOpresent_ || HFpresent_ ) // don't include ZDC yet 00356 status_global_=0; 00357 00358 // Set starting histogram values to 0 00359 if (HBpresent_) resetSummaryPlot(1); 00360 if (HEpresent_) resetSummaryPlot(2); 00361 if (HOpresent_) resetSummaryPlot(3); 00362 if (HFpresent_) resetSummaryPlot(4); 00363 00364 // Calculate status values for individual tasks 00365 if (dataFormatMon_.IsOn()) analyze_subtask(dataFormatMon_); 00366 if (digiMon_.IsOn()) analyze_subtask(digiMon_); 00367 if (recHitMon_.IsOn()) analyze_subtask(recHitMon_); 00368 if (pedestalMon_.IsOn()) analyze_subtask(pedestalMon_); 00369 if (ledMon_.IsOn()) analyze_subtask(ledMon_); 00370 if (hotCellMon_.IsOn()) analyze_subtask(hotCellMon_); 00371 if (deadCellMon_.IsOn()) analyze_subtask(deadCellMon_); 00372 if (trigPrimMon_.IsOn()) analyze_subtask(trigPrimMon_); 00373 if (caloTowerMon_.IsOn()) analyze_subtask(caloTowerMon_); 00374 00375 // Okay, we've got the individual tasks; now form the combined value 00376 00377 int totalcells=0; 00378 std::map<std::string, int>::const_iterator it; 00379 if (HBpresent_) 00380 { 00381 status_global_+=status_HB_; 00382 it=subdetCells_.find("HB"); 00383 totalcells+=it->second; 00384 status_HB_/=it->second; 00385 status_HB_=max(0.,1-status_HB_); // converts fraction of bad channels to good fraction 00386 } 00387 if (HEpresent_) 00388 { 00389 status_global_+=status_HE_; 00390 it=subdetCells_.find("HE"); 00391 totalcells+=it->second; 00392 status_HE_/=it->second; 00393 status_HE_=max(0.,1-status_HE_); // converts fraction of bad channels to good fraction 00394 } 00395 if (HOpresent_) 00396 { 00397 status_global_+=status_HO_; 00398 it=subdetCells_.find("HO"); 00399 totalcells+=it->second; 00400 status_HO_/=it->second; 00401 status_HO_=max(0.,1-status_HO_); // converts fraction of bad channels to good fraction 00402 } 00403 if (HFpresent_) 00404 { 00405 status_global_+=status_HF_; 00406 it=subdetCells_.find("HF"); 00407 totalcells+=it->second; 00408 status_HF_/=it->second; 00409 status_HF_=max(0.,1-status_HF_); // converts fraction of bad channels to good fraction 00410 } 00411 /* 00412 if (ZDCpresent_) 00413 { 00414 status_global_+=status_ZDC_; 00415 it=subdetCells_.find("ZDC"); 00416 totalcells+=it->second; 00417 status_ZDC_/=it->second; 00418 status_ZDC_=max(0.,1-status_ZDC_); // converts fraction of bad channels to good fraction 00419 00420 } 00421 */ 00422 00423 if (totalcells==0) 00424 status_global_=-1; 00425 else 00426 { 00427 status_global_/=totalcells; 00428 status_global_=max(0.,1-status_global_); // convert to good fraction 00429 // Now loop over cells in reportsummarymap, changing from bad fraction to good 00430 00431 int eta,phi; 00432 for (int ieta=1;ieta<=etaBins_;++ieta) 00433 { 00434 eta=ieta+int(etaMin_)-1; 00435 for (int iphi=1; iphi<=phiBins_;++iphi) 00436 { 00437 if (reportMap->getBinContent(ieta,iphi)>-1) 00438 { 00439 phi=iphi+int(phiMin_)-1; 00440 if (abs(eta)>20 && phi%2!=1) 00441 continue; 00442 if (abs(eta)>39 &&phi%4!=3) 00443 continue; 00444 reportMap->setBinContent(ieta,iphi,max(0.,(double)(1-reportMap->getBinContent(ieta,iphi)))); 00445 00446 if (fillUnphysical_) 00447 { 00448 // fill even phi cells in region where cells span 10 degrees in phi 00449 // ("True" cell values are phi=1,3,5,7,...) 00450 if (abs(eta)>20 && abs(eta)<40 && phi%2==1 &&phi<73) 00451 { 00452 reportMap->setBinContent(ieta,iphi+1,reportMap->getBinContent(ieta,iphi)); 00453 } 00454 00455 // fill all cells in region where cells span 20 degrees in phi 00456 // (actual cell phi values are 3,7,11,...) 00457 if (abs(eta)>39 && phi%4==3 && phi<73) 00458 { 00459 reportMap->setBinContent(ieta,iphi+1,reportMap->getBinContent(ieta,iphi)); 00460 reportMap->setBinContent(ieta,iphi-1,reportMap->getBinContent(ieta,iphi)); 00461 reportMap->setBinContent(ieta,iphi-2,reportMap->getBinContent(ieta,iphi)); 00462 } 00463 } 00464 } //if (bincontent>-1) 00465 } // for (int iphi=1;...) 00466 } // for (int ieta=1;...) 00467 } // else (totalcells>0) 00468 00469 // Now set the status words 00470 MonitorElement* me; 00471 dqmStore_->setCurrentFolder( prefixME_ + "/EventInfo" ); 00472 00473 me = dqmStore_->get(prefixME_ + "/EventInfo/reportSummary"); 00474 if (me) 00475 { 00476 me->Fill(status_global_); 00477 //simpleMap->setBinContent(5,1,status_global_); 00478 } 00479 00480 dqmStore_->setCurrentFolder( prefixME_ + "/EventInfo/reportSummaryContents" ); 00481 if ( me = dqmStore_->get(prefixME_ + "/EventInfo/reportSummaryContents/Hcal_HB") ) 00482 { 00483 me->Fill(status_HB_); 00484 simpleMap->setBinContent(1,1,status_HB_); 00485 } 00486 if ( me = dqmStore_->get(prefixME_ + "/EventInfo/reportSummaryContents/Hcal_HE") ) 00487 { 00488 me->Fill(status_HE_); 00489 simpleMap->setBinContent(2,1,status_HE_); 00490 } 00491 if ( me = dqmStore_->get(prefixME_ + "/EventInfo/reportSummaryContents/Hcal_HO") ) 00492 { 00493 me->Fill(status_HO_); 00494 simpleMap->setBinContent(3,1,status_HO_); 00495 } 00496 if ( me = dqmStore_->get(prefixME_ + "/EventInfo/reportSummaryContents/Hcal_HF") ) 00497 { 00498 me->Fill(status_HF_); 00499 simpleMap->setBinContent(4,1,status_HF_); 00500 } 00501 // test for ZDC info 00502 if ( me = dqmStore_->get(prefixME_ + "/EventInfo/reportSummaryContents/Hcal_ZDC") ) 00503 { 00504 me->Fill(status_ZDC_); 00505 simpleMap->setBinContent(5,1,status_ZDC_); 00506 } 00507 00508 dqmStore_->setCurrentFolder( prefixME_); 00509 00510 return; 00511 } // void HcalSummaryClient::analyze(void)
void HcalSummaryClient::analyze_subtask | ( | SubTaskSummaryStatus & | s | ) |
Definition at line 514 of file HcalSummaryClient.cc.
References funct::abs(), SubTaskSummaryStatus::ALLstatus, GenMuonPlsPt100GeV_cfg::cout, debug_, dqmStore_, lat::endl(), eta, MonitorElement::Fill(), DQMStore::get(), MonitorElement::getTH2F(), HBpresent_, HEpresent_, HFpresent_, HOpresent_, int, it, me, name, phi, prefixME_, SubTaskSummaryStatus::problemDir, SubTaskSummaryStatus::problemName, SubTaskSummaryStatus::status, status_HB_, status_HE_, status_HF_, status_HO_, subdetCells_, and ZDCpresent_.
Referenced by analyze().
00515 { 00516 double HBstatus=0; 00517 double HEstatus=0; 00518 double HOstatus=0; 00519 double HFstatus=0; 00520 double ZDCstatus=-1; // not yet implemented 00521 double ALLstatus=0; 00522 00523 double etamin, etamax, phimin, phimax; 00524 int etabins, phibins; 00525 int eta, phi; 00526 double bincontent; 00527 00528 ostringstream name; 00529 MonitorElement* me; 00530 TH2F* hist; 00531 MonitorElement* reportMap = dqmStore_->get(prefixME_ + "/EventInfo/advancedReportSummaryMap"); 00532 00533 // Layer 1 HB& HF 00534 if (HBpresent_ || HFpresent_) 00535 { 00536 name.str(""); 00537 name <<prefixME_<<"/"<<s.problemDir<<"/"<<"HB HF Depth 1 "<<s.problemName; 00538 me=dqmStore_->get(name.str().c_str()); 00539 00540 if (me) 00541 { 00542 hist=me->getTH2F(); 00543 etabins=hist->GetNbinsX(); 00544 phibins=hist->GetNbinsY(); 00545 etamin=hist->GetXaxis()->GetXmin(); 00546 etamax=hist->GetXaxis()->GetXmax(); 00547 phimin=hist->GetYaxis()->GetXmin(); 00548 phimax=hist->GetYaxis()->GetXmax(); 00549 for (int ieta=1;ieta<=etabins;++ieta) 00550 { 00551 for (int iphi=1; iphi<=phibins;++iphi) 00552 { 00553 bincontent=hist->GetBinContent(ieta,iphi); 00554 if (bincontent>0) 00555 { 00556 eta=ieta+int(etamin)-1; 00557 phi=iphi+int(phimin)-1; 00558 reportMap->Fill(eta,phi,bincontent); 00559 if (abs(eta)<17 && HBpresent_) // HB 00560 { 00561 HBstatus+=bincontent; 00562 } 00563 else if (HFpresent_) 00564 { 00565 if (phi%2==0) continue; // skip non-physical phi bins 00566 if (abs(eta)>39 && phi%4!=3) continue; // skip non-physical phi bins 00567 HFstatus+=bincontent; 00568 } 00569 } // if (bincontent>0) 00570 } // for (int iphi=1;...) 00571 } // for (int ieta=1;...) 00572 } // if (me) 00573 } // if (HBpresent_ || HFpresent) 00574 00575 // Layer 2 HB& HF 00576 if (HBpresent_ || HFpresent_) 00577 { 00578 name.str(""); 00579 name <<prefixME_<<"/"<<s.problemDir<<"/"<<"HB HF Depth 2 "<<s.problemName; 00580 me=dqmStore_->get(name.str().c_str()); 00581 00582 if (me) 00583 { 00584 hist=me->getTH2F(); 00585 etabins=hist->GetNbinsX(); 00586 phibins=hist->GetNbinsY(); 00587 etamin=hist->GetXaxis()->GetXmin(); 00588 etamax=hist->GetXaxis()->GetXmax(); 00589 phimin=hist->GetYaxis()->GetXmin(); 00590 phimax=hist->GetYaxis()->GetXmax(); 00591 for (int ieta=1;ieta<=etabins;++ieta) 00592 { 00593 for (int iphi=1; iphi<=phibins;++iphi) 00594 { 00595 bincontent=hist->GetBinContent(ieta,iphi); 00596 if (bincontent>0) 00597 { 00598 eta=ieta+int(etamin)-1; 00599 phi=iphi+int(phimin)-1; 00600 reportMap->Fill(eta,phi,bincontent); 00601 if (abs(eta)<17 && HBpresent_) // HB 00602 { 00603 HBstatus+=bincontent; 00604 } 00605 else if (HFpresent_) 00606 { 00607 if (phi%2==0) continue; // skip non-physical phi bins 00608 if (abs(eta)>39 && phi%4!=3) continue; // skip non-physical phi bins 00609 HFstatus+=bincontent; 00610 } 00611 } // if (bincontent>0) 00612 } // for (int iphi=1;...) 00613 } // for (int ieta=1;...) 00614 } // if (me) 00615 } // if (HBpresent_ || HFpresent) 00616 00617 // Layer 4 HO & ZDC 00618 if (HOpresent_ || ZDCpresent_) 00619 { 00620 name.str(""); 00621 name <<prefixME_<<"/"<<s.problemDir<<"/"<<"HO ZDC "<<s.problemName; 00622 me=dqmStore_->get(name.str().c_str()); 00623 00624 if (me) 00625 { 00626 hist=me->getTH2F(); 00627 etabins=hist->GetNbinsX(); 00628 phibins=hist->GetNbinsY(); 00629 etamin=hist->GetXaxis()->GetXmin(); 00630 etamax=hist->GetXaxis()->GetXmax(); 00631 phimin=hist->GetYaxis()->GetXmin(); 00632 phimax=hist->GetYaxis()->GetXmax(); 00633 for (int ieta=1;ieta<=etabins;++ieta) 00634 { 00635 for (int iphi=1; iphi<=phibins;++iphi) 00636 { 00637 bincontent=hist->GetBinContent(ieta,iphi); 00638 if (bincontent>0) 00639 { 00640 eta=ieta+int(etamin)-1; 00641 phi=iphi+int(phimin)-1; 00642 reportMap->Fill(eta,phi,bincontent); 00643 if (abs(eta)<42 && HOpresent_) // HO 00644 { 00645 HOstatus+=bincontent; 00646 } 00647 else if (ZDCpresent_) 00648 { 00649 ZDCstatus+=bincontent; 00650 } 00651 } // if (bincontent>0) 00652 } // for (int iphi=1;...) 00653 } // for (int ieta=1;...) 00654 } // if (me) 00655 } // if (HOpresent_ || ZDCpresent) 00656 00657 // Layer 1 HE 00658 if (HEpresent_) 00659 { 00660 name.str(""); 00661 name <<prefixME_<<"/"<<s.problemDir<<"/"<<"HE Depth 1 "<<s.problemName; 00662 me=dqmStore_->get(name.str().c_str()); 00663 00664 if (me) 00665 { 00666 hist=me->getTH2F(); 00667 etabins=hist->GetNbinsX(); 00668 phibins=hist->GetNbinsY(); 00669 etamin=hist->GetXaxis()->GetXmin(); 00670 etamax=hist->GetXaxis()->GetXmax(); 00671 phimin=hist->GetYaxis()->GetXmin(); 00672 phimax=hist->GetYaxis()->GetXmax(); 00673 for (int ieta=1;ieta<=etabins;++ieta) 00674 { 00675 for (int iphi=1; iphi<=phibins;++iphi) 00676 { 00677 phi=iphi+int(phimin)-1; 00678 if (phi%2==0) continue; // skip non-physical phi bins 00679 00680 bincontent=hist->GetBinContent(ieta,iphi); 00681 if (bincontent>0) 00682 { 00683 eta=ieta+int(etamin)-1; 00684 reportMap->Fill(eta,phi,bincontent); 00685 HEstatus+=bincontent; 00686 } // if (bincontent>0) 00687 } // for (int iphi=1;...) 00688 } // for (int ieta=1;...) 00689 } // if (me) 00690 } // if (HEpresent_) 00691 00692 // Layer 2 HE 00693 if (HEpresent_) 00694 { 00695 name.str(""); 00696 name <<prefixME_<<"/"<<s.problemDir<<"/"<<"HE Depth 2 "<<s.problemName; 00697 me=dqmStore_->get(name.str().c_str()); 00698 00699 if (me) 00700 { 00701 hist=me->getTH2F(); 00702 etabins=hist->GetNbinsX(); 00703 phibins=hist->GetNbinsY(); 00704 etamin=hist->GetXaxis()->GetXmin(); 00705 etamax=hist->GetXaxis()->GetXmax(); 00706 phimin=hist->GetYaxis()->GetXmin(); 00707 phimax=hist->GetYaxis()->GetXmax(); 00708 for (int ieta=1;ieta<=etabins;++ieta) 00709 { 00710 for (int iphi=1; iphi<=phibins;++iphi) 00711 { 00712 phi=iphi+int(phimin)-1; 00713 if (phi%2==0) continue; // skip non-physical phi bins 00714 bincontent=hist->GetBinContent(ieta,iphi); 00715 if (bincontent>0) 00716 { 00717 eta=ieta+int(etamin)-1; 00718 reportMap->Fill(eta,phi,bincontent); 00719 HEstatus+=bincontent; 00720 } // if (bincontent>0) 00721 } // for (int iphi=1;...) 00722 } // for (int ieta=1;...) 00723 } // if (me) 00724 } // if (HEpresent_) 00725 00726 // HE Depth 3 00727 if (HEpresent_) 00728 { 00729 name.str(""); 00730 name <<prefixME_<<"/"<<s.problemDir<<"/"<<"HE Depth 3 "<<s.problemName; 00731 me=dqmStore_->get(name.str().c_str()); 00732 00733 if (me) 00734 { 00735 hist=me->getTH2F(); 00736 etabins=hist->GetNbinsX(); 00737 phibins=hist->GetNbinsY(); 00738 etamin=hist->GetXaxis()->GetXmin(); 00739 etamax=hist->GetXaxis()->GetXmax(); 00740 phimin=hist->GetYaxis()->GetXmin(); 00741 phimax=hist->GetYaxis()->GetXmax(); 00742 for (int ieta=1;ieta<=etabins;++ieta) 00743 { 00744 for (int iphi=1; iphi<=phibins;++iphi) 00745 { 00746 phi=iphi+int(phimin)-1; 00747 if (phi%2==0) continue; // skip non-physical phi bins 00748 bincontent=hist->GetBinContent(ieta,iphi); 00749 if (bincontent>0) 00750 { 00751 eta=ieta+int(etamin)-1; 00752 phi=iphi+int(phimin)-1; 00753 reportMap->Fill(eta,phi,bincontent); 00754 HEstatus+=bincontent; 00755 } // if (bincontent>0) 00756 } // for (int iphi=1;...) 00757 } // for (int ieta=1;...) 00758 } // if (me) 00759 } // if (HEpresent_) 00760 00761 ALLstatus=HBstatus+HEstatus+HOstatus+HFstatus; 00762 int totalcells=0; 00763 std::map<std::string, int>::const_iterator it; 00764 if (HBpresent_) 00765 { 00766 status_HB_+=HBstatus; 00767 it=subdetCells_.find("HB"); 00768 totalcells+=it->second; 00769 HBstatus/=it->second; 00770 HBstatus=1-HBstatus; // converts fraction of bad channels to good fraction 00771 if (HBstatus<0) HBstatus=0; 00772 s.status[0]=HBstatus; 00773 } 00774 if (HEpresent_) 00775 { 00776 status_HE_+=HEstatus; 00777 it=subdetCells_.find("HE"); 00778 totalcells+=it->second; 00779 HEstatus/=it->second; 00780 HEstatus=1-HEstatus; // converts fraction of bad channels to good fraction 00781 if (HEstatus<0) 00782 HEstatus=0; 00783 s.status[1]=HEstatus; 00784 } 00785 00786 if (HOpresent_) 00787 { 00788 status_HO_+=HOstatus; 00789 it=subdetCells_.find("HO"); 00790 totalcells+=it->second; 00791 HOstatus/=it->second; 00792 HOstatus=1-HOstatus; // converts fraction of bad channels to good fraction 00793 if (HOstatus<0) 00794 HOstatus=0; 00795 s.status[2]=HOstatus; 00796 } 00797 if (HFpresent_) 00798 { 00799 status_HF_+=HFstatus; 00800 it=subdetCells_.find("HF"); 00801 totalcells+=it->second; 00802 HFstatus/=it->second; 00803 HFstatus=1-HFstatus; // converts fraction of bad channels to good fraction 00804 if (HFstatus<0) 00805 HFstatus=0; 00806 s.status[3]=HFstatus; 00807 } 00808 /* 00809 if (ZDCpresent_) 00810 { 00811 status_ZDC_+=ZDCstatus; 00812 it=subdetCells_.find("ZDC"); 00813 totalcells+=it->second; 00814 ZDCstatus/=it->second; 00815 ZDCstatus=1-ZDCstatus; // converts fraction of bad channels to good fraction 00816 if (ZDCstatus<0) 00817 ZDCstatus=0; 00818 s.status[4]=ZDCStatus; 00819 } 00820 */ 00821 if (totalcells>0) 00822 { 00823 ALLstatus/=totalcells; 00824 ALLstatus=1-ALLstatus; 00825 if (ALLstatus<0) 00826 ALLstatus=0; 00827 s.ALLstatus=ALLstatus; 00828 } 00829 00830 if (debug_>0) 00831 { 00832 cout <<s.problemDir<<endl; 00833 cout <<"HB = "<<HBstatus<<endl; 00834 cout <<"HE = "<<HEstatus<<endl; 00835 cout <<"HO = "<<HOstatus<<endl; 00836 cout <<"HF = "<<HFstatus<<endl; 00837 cout <<"TOTAL = "<<s.ALLstatus<<endl; 00838 cout <<"sumHB = "<<status_HB_<<endl; 00839 cout <<"sumHE = "<<status_HE_<<endl; 00840 cout <<"sumHO = "<<status_HO_<<endl; 00841 cout <<"sumHF = "<<status_HF_<<endl; 00842 cout <<"________________"<<endl; 00843 00844 } 00845 00846 return; 00847 } //void HcalSummaryClient::analyze_subtask(SubTaskSummaryStatus &s)
Definition at line 147 of file HcalSummaryClient.cc.
References GenMuonPlsPt100GeV_cfg::cout, debug_, dqmStore_, lat::endl(), ievt_, jevt_, and lastupdate_.
Referenced by HcalMonitorClient::beginJob().
00148 { 00149 dqmStore_=dqmStore; 00150 if (debug_>0) 00151 cout <<"<HcalSummaryClient: beginJob>"<<endl; 00152 ievt_ = 0; // keepts track of all events in job 00153 jevt_ = 0; // keeps track of all events in run 00154 lastupdate_=0; // keeps analyze from being called by both endRun and endJob 00155 } // void HcalSummaryClient::beginJob(DQMStore* dqmStore)
Definition at line 157 of file HcalSummaryClient.cc.
References GenMuonPlsPt100GeV_cfg::cout, debug_, lat::endl(), jevt_, and setup().
Referenced by HcalMonitorClient::beginRun().
00158 { 00159 if ( debug_>0 ) cout << "<HcalSummaryClient: beginRun>" << endl; 00160 00161 jevt_ = 0; 00162 this->setup(); 00163 } //void HcalSummaryClient::beginRun(void)
Definition at line 250 of file HcalSummaryClient.cc.
References dqmStore_, enableCleanup_, DQMStore::get(), MonitorElement::getName(), me, prefixME_, and DQMStore::removeElement().
Referenced by endJob(), and endRun().
00251 { 00252 00253 if ( ! enableCleanup_ ) return; 00254 00255 MonitorElement* me; 00256 00257 if ( me = dqmStore_->get(prefixME_ + "/EventInfo/reportSummary") ) 00258 { 00259 dqmStore_->removeElement(me->getName()); 00260 } 00261 } // void HcalSummaryClient::cleanup(void)
Definition at line 165 of file HcalSummaryClient.cc.
References analyze(), cleanup(), GenMuonPlsPt100GeV_cfg::cout, debug_, lat::endl(), ievt_, and lastupdate_.
Referenced by HcalMonitorClient::endJob().
00166 { 00167 if ( debug_>0 ) cout << "<HcalSummaryClient: endJob> ievt = " << ievt_ << endl; 00168 // When the job ends, we want to make a summary before exiting 00169 if (ievt_>lastupdate_) 00170 analyze(); 00171 this->cleanup(); 00172 } // void HcalSummaryClient::endJob(void)
Definition at line 174 of file HcalSummaryClient.cc.
References analyze(), cleanup(), GenMuonPlsPt100GeV_cfg::cout, debug_, lat::endl(), ievt_, jevt_, and lastupdate_.
Referenced by HcalMonitorClient::endRun().
00175 { 00176 if ( debug_ ) cout << "<HcalSummaryClient: endRun> jevt = " << jevt_ << endl; 00177 // When the run ends, we want to make a summary before exiting 00178 analyze(); 00179 lastupdate_=ievt_; 00180 this->cleanup(); 00181 } // void HcalSummaryClient::endRun(void)
void HcalSummaryClient::htmlOutput | ( | int & | run, | |
time_t & | mytime, | |||
int & | minlumi, | |||
int & | maxlumi, | |||
std::string & | htmlDir, | |||
std::string & | htmlName | |||
) |
Referenced by HcalMonitorClient::htmlOutput().
Definition at line 264 of file HcalSummaryClient.cc.
Referenced by HcalMonitorClient::analyze().
00265 { 00266 ++ievt_; 00267 ++jevt_; 00268 return; 00269 } // void HcalSummaryClient::incrementCounters()
void HcalSummaryClient::init | ( | const edm::ParameterSet & | ps, | |
DQMStore * | dbe, | |||
string | clientName | |||
) | [virtual] |
Reimplemented from HcalBaseClient.
Definition at line 47 of file HcalSummaryClient.cc.
References caloTowerMon_, cloneME_, GenMuonPlsPt100GeV_cfg::cout, dataFormatMon_, deadCellMon_, debug_, digiMon_, enableCleanup_, lat::endl(), etaBins_, ETAMAX, etaMax_, ETAMIN, etaMin_, edm::ParameterSet::getUntrackedParameter(), HBpresent_, HEpresent_, HFpresent_, HOpresent_, hotCellMon_, HcalBaseClient::init(), int, ledMon_, SubTaskSummaryStatus::onoff, pedestalMon_, phiBins_, PHIMAX, phiMax_, PHIMIN, phiMin_, prefixME_, SubTaskSummaryStatus::problemDir, SubTaskSummaryStatus::problemName, recHitMon_, status_global_, status_HB_, status_HE_, status_HF_, status_HO_, status_ZDC_, subdetCells_, trigPrimMon_, and ZDCpresent_.
Referenced by HcalMonitorClient::initialize().
00048 { 00049 //Call the base class first 00050 HcalBaseClient::init(ps,dbe,clientName); 00051 00052 // cloneME switch 00053 cloneME_ = ps.getUntrackedParameter<bool>("cloneME", true); 00054 00055 // debug switch 00056 debug_ = ps.getUntrackedParameter<int>("debug", 0); 00057 00058 // prefixME path 00059 prefixME_ = ps.getUntrackedParameter<string>("prefixME", "Hcal"); 00060 00061 // enableCleanup_ switch 00062 enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup", false); 00063 00064 // Find out which subtasks are being run 00065 // At the moment, only hot/dead/pedestal comply with correct format of histograms; ignore all others 00066 //dataFormatMon_.onoff=(ps.getUntrackedParameter<bool>("DataFormatClient",false)); 00067 digiMon_.onoff=(ps.getUntrackedParameter<bool>("DigiClient",false)); 00068 recHitMon_.onoff=(ps.getUntrackedParameter<bool>("RecHitClient",false)); 00069 pedestalMon_.onoff=(ps.getUntrackedParameter<bool>("PedestalClient",false)); 00070 pedestalMon_.onoff=false; // don't include pedestal monitoring in overall data quality? 00071 //ledMon_.onoff=(ps.getUntrackedParameter<bool>("LEDClient",false)); 00072 hotCellMon_.onoff=(ps.getUntrackedParameter<bool>("HotCellClient",false)); 00073 deadCellMon_.onoff=(ps.getUntrackedParameter<bool>("DeadCellClient",false)); 00074 //trigPrimMon_.onoff=(ps.getUntrackedParameter<bool>("TrigPrimClient",false)); 00075 //caloTowerMon_.onoff=(ps.getUntrackedParameter<bool>("CaloTowerClient",false)); 00076 00077 // Set histogram problem names & directories for each subtask 00078 dataFormatMon_.problemName = ""; 00079 digiMon_.problemName = "Problem Digi Rate"; 00080 recHitMon_.problemName = "Problem RecHit Rate"; 00081 pedestalMon_.problemName = " Problem Pedestal Rate"; 00082 ledMon_.problemName = ""; 00083 hotCellMon_.problemName = " Problem Hot Cell Rate"; 00084 deadCellMon_.problemName = " Problem Dead Cell Rate"; 00085 trigPrimMon_.problemName = ""; 00086 caloTowerMon_.problemName = ""; 00087 00088 dataFormatMon_.problemDir = ""; 00089 digiMon_.problemDir = "DigiMonitor_Hcal/problem_digis"; 00090 recHitMon_.problemDir = ""; 00091 pedestalMon_.problemDir = "PedestalMonitor_Hcal/problem_pedestals"; 00092 ledMon_.problemDir = ""; 00093 hotCellMon_.problemDir = "HotCellMonitor_Hcal/problem_hotcells"; 00094 deadCellMon_.problemDir = "DeadCellMonitor_Hcal/problem_deadcells"; 00095 trigPrimMon_.problemDir = ""; 00096 caloTowerMon_.problemDir = ""; 00097 00098 // All initial status floats set to -1 (unknown) 00099 status_HB_=-1; 00100 status_HE_=-1; 00101 status_HO_=-1; 00102 status_HF_=-1; 00103 status_ZDC_=-1; 00104 status_global_=-1; 00105 00106 // set total number of cells in each subdetector 00107 subdetCells_.insert(make_pair("HB",2592)); 00108 subdetCells_.insert(make_pair("HE",2592)); 00109 subdetCells_.insert(make_pair("HO",2160)); 00110 subdetCells_.insert(make_pair("HF",1728)); 00111 00112 // Assume subdetectors absent at start 00113 HBpresent_=0; 00114 HEpresent_=0; 00115 HOpresent_=0; 00116 HFpresent_=0; 00117 ZDCpresent_=0; 00118 00119 // Set eta, phi boundaries for overall report summary map 00120 etaMax_ = ps.getUntrackedParameter<double>("MaxEta", ETAMAX); 00121 etaMin_ = ps.getUntrackedParameter<double>("MinEta", ETAMIN); 00122 if (etaMax_ > 44.5) 00123 { 00124 cout <<"<HcalBaseMonitor> WARNING: etaMax_ value of "<<etaMax_<<" exceeds maximum allowed value of 44.5"<<endl; 00125 cout <<" Value being set back to 44.5."<<endl; 00126 cout <<" Additional code changes are necessary to allow value of "<<etaMax_<<endl; 00127 etaMax_ = 44.5; 00128 } 00129 if (etaMin_ < ETAMIN) 00130 { 00131 cout <<"<HcalBaseMonitor> WARNING: etaMin_ value of "<<etaMin_<<" exceeds minimum allowed value of 44.5"<<endl; 00132 cout <<" Value being set back to -44.5."<<endl; 00133 cout <<" Additional code changes are necessary to allow value of "<<etaMin_<<endl; 00134 etaMin_ = -44.5; 00135 } 00136 etaBins_ = (int)(etaMax_ - etaMin_); 00137 phiMax_ = ps.getUntrackedParameter<double>("MaxPhi", PHIMAX); 00138 phiMin_ = ps.getUntrackedParameter<double>("MinPhi", PHIMIN); 00139 phiBins_ = (int)(phiMax_ - phiMin_); 00140 00141 } // HcalSummaryClient::HcalSummaryClient(const ParameterSet& ps)
Definition at line 851 of file HcalSummaryClient.cc.
References GenMuonPlsPt100GeV_cfg::cout, d, dqmStore_, lat::endl(), eta, DQMStore::get(), MonitorElement::getTH2F(), int, phi, prefixME_, and HcalBaseClient::validDetId().
Referenced by analyze().
00852 { 00853 MonitorElement* reportMap = dqmStore_->get(prefixME_ + "/EventInfo/advancedReportSummaryMap"); 00854 if (!reportMap) 00855 { 00856 cout <<"<HcalSummaryClient::resetSummaryPlot> Could not get advancedReportSummaryMap!"<<endl; 00857 return; 00858 } 00859 TH2F* hist=reportMap->getTH2F(); 00860 int etabins=hist->GetNbinsX(); 00861 int phibins=hist->GetNbinsY(); 00862 double etamin=hist->GetXaxis()->GetXmin(); 00863 double phimin=hist->GetYaxis()->GetXmin(); 00864 int eta,phi; 00865 00866 // Loop over all bins for problem report; set their contents to 0 if 00867 // they have valid cell ID 00868 for (int ieta=1;ieta<=etabins;++ieta) 00869 { 00870 for (int iphi=1; iphi<=phibins;++iphi) 00871 { 00872 for (int d=1;d<=4;++d) 00873 { 00874 eta=ieta+int(etamin)-1; 00875 phi=iphi+int(phimin)-1; 00876 if (validDetId((HcalSubdetector)Subdet,eta,phi,d)) 00877 hist->SetBinContent(ieta,iphi,0.); 00878 } 00879 00880 } // for (int iphi=1;iphi<=phibins;++iphi) 00881 } // for (int ieta=1; ieta<=etabins;++ieta) 00882 return; 00883 } // void HcalSummaryClient::resetSummaryPlot(int Subdet)
Definition at line 183 of file HcalSummaryClient.cc.
References DQMStore::book2D(), DQMStore::bookFloat(), dqmStore_, etaBins_, etaMax_, etaMin_, MonitorElement::Fill(), DQMStore::get(), MonitorElement::getName(), MonitorElement::getTH2F(), histo, i, me, phiBins_, phiMax_, phiMin_, prefixME_, DQMStore::removeElement(), MonitorElement::setBinContent(), and DQMStore::setCurrentFolder().
Referenced by beginRun().
00184 { 00185 MonitorElement* me; 00186 ostringstream histo; 00187 // set overall status 00188 dqmStore_->setCurrentFolder( prefixME_ + "/EventInfo"); 00189 histo<<"reportSummary"; 00190 me=dqmStore_->get(prefixME_+"/EventInfo/"+histo.str().c_str()); 00191 if (me) 00192 dqmStore_->removeElement(me->getName()); 00193 me = dqmStore_->bookFloat(histo.str().c_str()); 00194 me->Fill(-1); // set status to unknown at startup 00195 histo.str(""); 00196 00197 std::string subdets[4] = {"HB","HE","HO","HF"}; 00198 for (unsigned int i=0;i<4;++i) 00199 { 00200 // Create floats showing subtasks status 00201 dqmStore_->setCurrentFolder( prefixME_ + "/EventInfo/reportSummaryContents" ); histo<<"Hcal_"<<subdets[i].c_str(); 00202 me=dqmStore_->get(prefixME_+"/EventInfo/"+histo.str().c_str()); 00203 if (me) 00204 dqmStore_->removeElement(me->getName()); 00205 me = dqmStore_->bookFloat(histo.str().c_str()); 00206 me->Fill(-1); // set status to unknown at startup 00207 histo.str(""); 00208 } 00209 00210 // Make overall 2D histogram 00211 dqmStore_->setCurrentFolder(prefixME_+"/EventInfo/"); 00212 histo<<"advancedReportSummaryMap"; 00213 me=dqmStore_->get(prefixME_+"/EventInfo/"+histo.str().c_str()); 00214 if (me) 00215 dqmStore_->removeElement(me->getName()); 00216 me = dqmStore_->book2D(histo.str().c_str(), histo.str().c_str(), 00217 etaBins_,etaMin_,etaMax_, 00218 phiBins_,phiMin_,phiMax_); 00219 // Set histogram values to -1 00220 // Set all bins to "unknown" to start 00221 for (int ieta=1;ieta<=etaBins_;++ieta) 00222 for (int iphi=1; iphi<=phiBins_;++iphi) 00223 me->setBinContent(ieta,iphi,-1); 00224 00225 // Make new simplified status histogram 00226 histo.str(""); 00227 histo<<"reportSummaryMap"; 00228 me=dqmStore_->get(prefixME_+"/EventInfo/"+histo.str().c_str()); 00229 if (me) 00230 dqmStore_->removeElement(me->getName()); 00231 me = dqmStore_->book2D(histo.str().c_str(), histo.str().c_str(), 00232 5,0,5,1,0,1); 00233 TH2F* myhist=me->getTH2F(); 00234 myhist->GetXaxis()->SetBinLabel(1,"HB"); 00235 myhist->GetXaxis()->SetBinLabel(2,"HE"); 00236 myhist->GetXaxis()->SetBinLabel(3,"HO"); 00237 myhist->GetXaxis()->SetBinLabel(4,"HF"); 00238 myhist->GetYaxis()->SetBinLabel(1,"Status"); 00239 // Add ZDC at some point 00240 myhist->GetXaxis()->SetBinLabel(5,"ZDC"); 00241 myhist->SetBinContent(5,1,-1); // no ZDC info known 00242 myhist->SetOption("textcolz"); 00243 //myhist->SetOptStat(0); 00244 00245 return; 00246 00247 } // void HcalSummaryClient::setup(void)
Definition at line 114 of file HcalSummaryClient.h.
bool HcalSummaryClient::cloneME_ [private] |
Reimplemented from HcalBaseClient.
Definition at line 101 of file HcalSummaryClient.h.
Referenced by init().
int HcalSummaryClient::debug_ [private] |
Reimplemented from HcalBaseClient.
Definition at line 103 of file HcalSummaryClient.h.
Referenced by analyze(), analyze_subtask(), beginJob(), beginRun(), endJob(), endRun(), and init().
DQMStore* HcalSummaryClient::dqmStore_ [private] |
Definition at line 109 of file HcalSummaryClient.h.
Referenced by analyze(), analyze_subtask(), beginJob(), cleanup(), resetSummaryPlot(), and setup().
bool HcalSummaryClient::enableCleanup_ [private] |
int HcalSummaryClient::etaBins_ [private] |
double HcalSummaryClient::etaMax_ [private] |
double HcalSummaryClient::etaMin_ [private] |
int HcalSummaryClient::HBpresent_ [private] |
Definition at line 99 of file HcalSummaryClient.h.
Referenced by analyze(), analyze_subtask(), and init().
int HcalSummaryClient::HEpresent_ [private] |
Definition at line 99 of file HcalSummaryClient.h.
Referenced by analyze(), analyze_subtask(), and init().
int HcalSummaryClient::HFpresent_ [private] |
Definition at line 99 of file HcalSummaryClient.h.
Referenced by analyze(), analyze_subtask(), and init().
int HcalSummaryClient::HOpresent_ [private] |
Definition at line 99 of file HcalSummaryClient.h.
Referenced by analyze(), analyze_subtask(), and init().
ofstream HcalSummaryClient::htmlFile [private] |
Definition at line 127 of file HcalSummaryClient.h.
int HcalSummaryClient::ievt_ [private] |
Reimplemented from HcalBaseClient.
Definition at line 95 of file HcalSummaryClient.h.
Referenced by analyze(), beginJob(), endJob(), endRun(), getEvtPerJob(), and incrementCounters().
int HcalSummaryClient::jevt_ [private] |
Reimplemented from HcalBaseClient.
Definition at line 96 of file HcalSummaryClient.h.
Referenced by analyze(), beginJob(), beginRun(), endRun(), getEvtPerRun(), and incrementCounters().
int HcalSummaryClient::lastupdate_ [private] |
Definition at line 97 of file HcalSummaryClient.h.
Referenced by beginJob(), endJob(), and endRun().
int HcalSummaryClient::phiBins_ [private] |
double HcalSummaryClient::phiMax_ [private] |
double HcalSummaryClient::phiMin_ [private] |
std::string HcalSummaryClient::prefixME_ [private] |
Definition at line 105 of file HcalSummaryClient.h.
Referenced by analyze(), analyze_subtask(), cleanup(), init(), resetSummaryPlot(), and setup().
double HcalSummaryClient::status_global_ [private] |
double HcalSummaryClient::status_HB_ [private] |
Definition at line 120 of file HcalSummaryClient.h.
Referenced by analyze(), analyze_subtask(), and init().
double HcalSummaryClient::status_HE_ [private] |
Definition at line 121 of file HcalSummaryClient.h.
Referenced by analyze(), analyze_subtask(), and init().
double HcalSummaryClient::status_HF_ [private] |
Definition at line 123 of file HcalSummaryClient.h.
Referenced by analyze(), analyze_subtask(), and init().
double HcalSummaryClient::status_HO_ [private] |
Definition at line 122 of file HcalSummaryClient.h.
Referenced by analyze(), analyze_subtask(), and init().
double HcalSummaryClient::status_ZDC_ [private] |
std::map<std::string, int> HcalSummaryClient::subdetCells_ [private] |
Definition at line 116 of file HcalSummaryClient.h.
Referenced by analyze(), analyze_subtask(), and init().
int HcalSummaryClient::totalcells_ [private] |
Definition at line 117 of file HcalSummaryClient.h.
int HcalSummaryClient::ZDCpresent_ [private] |
Definition at line 99 of file HcalSummaryClient.h.
Referenced by analyze(), analyze_subtask(), and init().