#include <HLTEventInfoClient.h>
Public Member Functions | |
HLTEventInfoClient (const edm::ParameterSet &ps) | |
Constructor. | |
virtual | ~HLTEventInfoClient () |
Destructor. | |
Protected Member Functions | |
void | analyze (const edm::Event &e, const edm::EventSetup &c) |
Fake Analyze. | |
void | beginJob () |
BeginJob. | |
void | beginLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &context) |
void | beginRun (const edm::Run &r, const edm::EventSetup &c) |
BeginRun. | |
void | endJob () |
Endjob. | |
void | endLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c) |
DQM Client Diagnostic. | |
void | endRun (const edm::Run &r, const edm::EventSetup &c) |
EndRun. | |
Private Member Functions | |
TH1F * | get1DHisto (std::string meName, DQMStore *dbi) |
TProfile * | get1DProfile (std::string meName, DQMStore *dbi) |
TH2F * | get2DHisto (std::string meName, DQMStore *dbi) |
TProfile2D * | get2DProfile (std::string meName, DQMStore *dbi) |
void | initialize () |
Private Attributes | |
int | counterEvt_ |
counter | |
int | counterLS_ |
DQMStore * | dbe_ |
std::string | monitorDir_ |
int | nChannels |
prescale on number of events | |
edm::ParameterSet | parameters_ |
int | prescaleEvt_ |
units of lumi sections | |
int | prescaleLS_ |
counter | |
Float_t | reportSummary |
MonitorElement * | reportSummary_ |
MonitorElement * | reportSummaryContent_ [20] |
MonitorElement * | reportSummaryMap_ |
Float_t | summaryContent [20] |
Float_t | summarySum |
bool | verbose_ |
Definition at line 23 of file HLTEventInfoClient.h.
HLTEventInfoClient::HLTEventInfoClient | ( | const edm::ParameterSet & | ps | ) |
HLTEventInfoClient::~HLTEventInfoClient | ( | ) | [virtual] |
void HLTEventInfoClient::analyze | ( | const edm::Event & | e, |
const edm::EventSetup & | c | ||
) | [protected, virtual] |
Fake Analyze.
Implements edm::EDAnalyzer.
Definition at line 226 of file HLTEventInfoClient.cc.
References gather_cfg::cout.
{ counterEvt_++; if (prescaleEvt_<1) return; if (prescaleEvt_>0 && counterEvt_%prescaleEvt_ != 0) return; if(verbose_) std::cout << "HLTEventInfoClient::analyze" << std::endl; }
void HLTEventInfoClient::beginJob | ( | void | ) | [protected, virtual] |
BeginJob.
Reimplemented from edm::EDAnalyzer.
Definition at line 66 of file HLTEventInfoClient.cc.
References DQMStore::book2D(), DQMStore::bookFloat(), gather_cfg::cout, dbe_, MonitorElement::Fill(), DQMStore::get(), timingPdfMaker::histo, gen::k, n, cmsCodeRules::cppFunctionSkipper::operator, DQMStore::removeElement(), MonitorElement::setAxisTitle(), and DQMStore::setCurrentFolder().
{ if(verbose_) std::cout <<"[TriggerDQM]: Begin Job" << std::endl; // get backendinterface dbe_ = Service<DQMStore>().operator->(); dbe_->setCurrentFolder("HLT/EventInfo"); // sprintf(histo, "reportSummary"); reportSummary_ = dbe_->get("HLT/EventInfo/reportSumamry"); if ( reportSummary_ ) { dbe_->removeElement(reportSummary_->getName()); } reportSummary_ = dbe_->bookFloat("reportSummary"); int nSubsystems = 20; //initialize reportSummary to 1 if (reportSummary_) reportSummary_->Fill(1); dbe_->setCurrentFolder("HLT/EventInfo/reportSummaryContents"); char histo[100]; for (int n = 0; n < nSubsystems; n++) { switch(n){ case 0 : sprintf(histo,"hlt_dqm_EGamma"); break; case 1 : sprintf(histo,"hlt_dqm_Muon"); break; case 2 : sprintf(histo,"hlt_dqm_JetMet"); break; case 3 : sprintf(histo,"hlt_dqm_BJets"); break; case 4 : sprintf(histo,"hlt_dqm_Tau"); break; case 5 : sprintf(histo,"hlt_dqm_Test1"); break; case 6 : sprintf(histo,"hlt_dqm_Test2"); break; case 7 : sprintf(histo,"hlt_dqm_Test3"); break; case 8 : sprintf(histo,"hlt_dqm_Test4"); break; case 9 : sprintf(histo,"hlt_dqm_Test5"); break; case 10 : sprintf(histo,"hlt_dqm_Test6"); break; case 11 : sprintf(histo,"hlt_dqm_Test7"); break; case 12 : sprintf(histo,"hlt_dqm_Test8"); break; case 13 : sprintf(histo,"hlt_dqm_Test9"); break; case 14 : sprintf(histo,"hlt_dqm_Test10"); break; case 15 : sprintf(histo,"hlt_dqm_Test11"); break; case 16 : sprintf(histo,"hlt_dqm_Test12"); break; case 17 : sprintf(histo,"hlt_dqm_Test13"); break; case 18 : sprintf(histo,"hlt_dqm_Test14"); break; case 19 : sprintf(histo,"hlt_dqm_Test15"); break; } // if( reportSummaryContent_[i] = dbe_->get("HLT/EventInfo/reportSummaryContents/" + histo) ) // { // dbe_->removeElement(reportSummaryContent_[i]->getName()); // } reportSummaryContent_[n] = dbe_->bookFloat(histo); } //initialize reportSummaryContents to 1 for (int k = 0; k < nSubsystems; k++) { summaryContent[k] = 1; reportSummaryContent_[k]->Fill(1.); } dbe_->setCurrentFolder("HLT/EventInfo"); reportSummaryMap_ = dbe_->get("HLT/EventInfo/reportSummaryMap"); if ( reportSummaryMap_ ) { dbe_->removeElement(reportSummaryMap_->getName()); } reportSummaryMap_ = dbe_->book2D("reportSummaryMap", "reportSummaryMap", 1, 1, 2, 5, 1, 6); reportSummaryMap_->setAxisTitle("", 1); reportSummaryMap_->setAxisTitle("", 2); reportSummaryMap_->setBinLabel(1,"EGAMMA",2); reportSummaryMap_->setBinLabel(2,"MUON",2); reportSummaryMap_->setBinLabel(3,"JETMET",2); reportSummaryMap_->setBinLabel(4,"BJETS",2); reportSummaryMap_->setBinLabel(5,"TAU",2); reportSummaryMap_->setBinLabel(1," ",1); }
void HLTEventInfoClient::beginLuminosityBlock | ( | const edm::LuminosityBlock & | lumiSeg, |
const edm::EventSetup & | context | ||
) | [protected, virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 179 of file HLTEventInfoClient.cc.
{
// optionally reset histograms here
}
void HLTEventInfoClient::beginRun | ( | const edm::Run & | r, |
const edm::EventSetup & | c | ||
) | [protected, virtual] |
BeginRun.
Reimplemented from edm::EDAnalyzer.
Definition at line 175 of file HLTEventInfoClient.cc.
{ }
void HLTEventInfoClient::endJob | ( | void | ) | [protected, virtual] |
Endjob.
Reimplemented from edm::EDAnalyzer.
Definition at line 242 of file HLTEventInfoClient.cc.
{ }
void HLTEventInfoClient::endLuminosityBlock | ( | const edm::LuminosityBlock & | lumiSeg, |
const edm::EventSetup & | c | ||
) | [protected, virtual] |
DQM Client Diagnostic.
Reimplemented from edm::EDAnalyzer.
Definition at line 183 of file HLTEventInfoClient.cc.
References dbe_, DQMStore::get(), MonitorElement::getQReport(), QReport::getQTresult(), gen::k, and m.
{ MonitorElement *Muon_QHist = dbe_->get("HLT/HLTMonMuon/Summary/Ratio_HLT_L1MuOpen"); float muonResult = 0; if(Muon_QHist){ const QReport *Muon_QReport = Muon_QHist->getQReport("CompareHist_Shape"); if(Muon_QReport) muonResult = Muon_QReport->getQTresult(); } int nSubsystems = 20; for (int k = 0; k < nSubsystems; k++) { // mask all HLT applications //if(k == 1 && muonResult != -1){ // summaryContent[k] = muonResult; // reportSummaryContent_[k]->Fill(muonResult); //}else{ summaryContent[k] = 1; reportSummaryContent_[k]->Fill(1.); //} } summarySum = 0; for (int m = 0; m < nSubsystems; m++) { summarySum += summaryContent[m]; } reportSummary = summarySum / nSubsystems;; if (reportSummary_) reportSummary_->Fill(reportSummary); reportSummaryMap_->setBinContent(1,1,summaryContent[0]);//Egamma reportSummaryMap_->setBinContent(1,2,summaryContent[1]);//Muon reportSummaryMap_->setBinContent(1,3,summaryContent[2]);//JetMet reportSummaryMap_->setBinContent(1,4,summaryContent[3]);//BJets reportSummaryMap_->setBinContent(1,5,summaryContent[4]);//Taus }
void HLTEventInfoClient::endRun | ( | const edm::Run & | r, |
const edm::EventSetup & | c | ||
) | [protected, virtual] |
EndRun.
Reimplemented from edm::EDAnalyzer.
Definition at line 238 of file HLTEventInfoClient.cc.
{ }
TH1F * HLTEventInfoClient::get1DHisto | ( | std::string | meName, |
DQMStore * | dbi | ||
) | [private] |
Definition at line 247 of file HLTEventInfoClient.cc.
References gather_cfg::cout, DQMStore::get(), MonitorElement::getTH1F(), and NULL.
TProfile * HLTEventInfoClient::get1DProfile | ( | std::string | meName, |
DQMStore * | dbi | ||
) | [private] |
Definition at line 291 of file HLTEventInfoClient.cc.
References gather_cfg::cout, DQMStore::get(), MonitorElement::getTProfile(), and NULL.
{ MonitorElement * me_ = dbi->get(meName); if (!me_) { if(verbose_) std::cout << "ME NOT FOUND." << std::endl; return NULL; } return me_->getTProfile(); }
TH2F * HLTEventInfoClient::get2DHisto | ( | std::string | meName, |
DQMStore * | dbi | ||
) | [private] |
Definition at line 260 of file HLTEventInfoClient.cc.
References gather_cfg::cout, DQMStore::get(), MonitorElement::getTH2F(), and NULL.
TProfile2D * HLTEventInfoClient::get2DProfile | ( | std::string | meName, |
DQMStore * | dbi | ||
) | [private] |
Definition at line 276 of file HLTEventInfoClient.cc.
References gather_cfg::cout, DQMStore::get(), MonitorElement::getTProfile2D(), and NULL.
{ MonitorElement * me_ = dbi->get(meName); if (!me_) { if(verbose_) std::cout << "ME NOT FOUND." << std::endl; return NULL; } return me_->getTProfile2D(); }
void HLTEventInfoClient::initialize | ( | ) | [private] |
Definition at line 41 of file HLTEventInfoClient.cc.
References gather_cfg::cout, dbe_, and cmsCodeRules::cppFunctionSkipper::operator.
{ counterLS_=0; counterEvt_=0; // get back-end interface dbe_ = Service<DQMStore>().operator->(); // base folder for the contents of this job verbose_ = parameters_.getUntrackedParameter<bool>("verbose", false); monitorDir_ = parameters_.getUntrackedParameter<std::string>("monitorDir",""); if(verbose_) std::cout << "Monitor dir = " << monitorDir_ << std::endl; prescaleLS_ = parameters_.getUntrackedParameter<int>("prescaleLS", -1); if(verbose_) std::cout << "DQM lumi section prescale = " << prescaleLS_ << " lumi section(s)"<< std::endl; prescaleEvt_ = parameters_.getUntrackedParameter<int>("prescaleEvt", -1); if(verbose_) std::cout << "DQM event prescale = " << prescaleEvt_ << " events(s)"<< std::endl; }
int HLTEventInfoClient::counterEvt_ [private] |
counter
Definition at line 70 of file HLTEventInfoClient.h.
int HLTEventInfoClient::counterLS_ [private] |
Definition at line 69 of file HLTEventInfoClient.h.
DQMStore* HLTEventInfoClient::dbe_ [private] |
Definition at line 66 of file HLTEventInfoClient.h.
std::string HLTEventInfoClient::monitorDir_ [private] |
Definition at line 67 of file HLTEventInfoClient.h.
int HLTEventInfoClient::nChannels [private] |
prescale on number of events
Definition at line 73 of file HLTEventInfoClient.h.
Definition at line 64 of file HLTEventInfoClient.h.
int HLTEventInfoClient::prescaleEvt_ [private] |
units of lumi sections
Definition at line 72 of file HLTEventInfoClient.h.
int HLTEventInfoClient::prescaleLS_ [private] |
counter
Definition at line 71 of file HLTEventInfoClient.h.
Float_t HLTEventInfoClient::reportSummary [private] |
Definition at line 74 of file HLTEventInfoClient.h.
MonitorElement* HLTEventInfoClient::reportSummary_ [private] |
Definition at line 79 of file HLTEventInfoClient.h.
MonitorElement* HLTEventInfoClient::reportSummaryContent_[20] [private] |
Definition at line 80 of file HLTEventInfoClient.h.
Definition at line 81 of file HLTEventInfoClient.h.
Float_t HLTEventInfoClient::summaryContent[20] [private] |
Definition at line 76 of file HLTEventInfoClient.h.
Float_t HLTEventInfoClient::summarySum [private] |
Definition at line 75 of file HLTEventInfoClient.h.
bool HLTEventInfoClient::verbose_ [private] |
Definition at line 68 of file HLTEventInfoClient.h.