#include <L1TCSCTFClient.h>
Public Member Functions | |
L1TCSCTFClient (const edm::ParameterSet &ps) | |
Constructor. | |
virtual | ~L1TCSCTFClient () |
Destructor. | |
Protected Member Functions | |
void | analyze (const edm::Event &e, const edm::EventSetup &c) |
Fake Analyze. | |
void | beginJob (void) |
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 | |
void | initialize () |
Private Attributes | |
int | counterEvt |
counter | |
int | counterLS |
MonitorElement * | csctferrors_ |
prescale on number of events | |
DQMStore * | dbe |
std::string | input_dir |
std::string | output_dir |
edm::ParameterSet | parameters |
int | prescaleEvt |
units of lumi sections | |
int | prescaleLS |
counter |
Definition at line 13 of file L1TCSCTFClient.h.
L1TCSCTFClient::L1TCSCTFClient | ( | const edm::ParameterSet & | ps | ) |
Constructor.
Definition at line 15 of file L1TCSCTFClient.cc.
References Parameters::parameters.
{ parameters=ps; initialize(); }
L1TCSCTFClient::~L1TCSCTFClient | ( | ) | [virtual] |
void L1TCSCTFClient::analyze | ( | const edm::Event & | e, |
const edm::EventSetup & | c | ||
) | [protected, virtual] |
Fake Analyze.
Implements edm::EDAnalyzer.
Definition at line 103 of file L1TCSCTFClient.cc.
References newFWLiteAna::bin, benchmark_cfg::errors, MonitorElement::getTH1F(), and reco_calib_source_client_cfg::prescaleEvt.
{ counterEvt++; if (prescaleEvt<1) return; if (prescaleEvt>0 && counterEvt%prescaleEvt!=0) return; dbe->setCurrentFolder(input_dir); // The code below duplicates one from endLuminosityBlock function vector<string> meVec = dbe->getMEs(); for(vector<string>::const_iterator it=meVec.begin(); it!=meVec.end(); it++){ string full_path = input_dir + "/" + (*it); MonitorElement *me =dbe->get(full_path); if( !me ){ LogError("TriggerDQM")<<full_path<<" NOT FOUND."; continue; } // But for now we only do a simple workaround if( (*it) != "CSCTF_errors" ) continue; TH1F *errors = me->getTH1F(); csctferrors_->getTH1F()->Reset(); if(!errors) continue; for(int bin=1; bin<=errors->GetXaxis()->GetNbins(); bin++) csctferrors_->Fill(bin-0.5,errors->GetBinContent(bin)); } }
void L1TCSCTFClient::beginJob | ( | void | ) | [protected, virtual] |
BeginJob.
Reimplemented from edm::EDAnalyzer.
Definition at line 37 of file L1TCSCTFClient.cc.
References cmsCodeRules::cppFunctionSkipper::operator, and o2o::output_dir.
{ // get backendinterface dbe = Service<DQMStore>().operator->(); // do your thing dbe->setCurrentFolder(output_dir); csctferrors_ = dbe->book1D("csctferrors_","CSCTF Errors",6,0,6); dbe->setCurrentFolder(input_dir); }
void L1TCSCTFClient::beginLuminosityBlock | ( | const edm::LuminosityBlock & | lumiSeg, |
const edm::EventSetup & | context | ||
) | [protected, virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 51 of file L1TCSCTFClient.cc.
{
// optionally reset histograms here
}
void L1TCSCTFClient::beginRun | ( | const edm::Run & | r, |
const edm::EventSetup & | c | ||
) | [protected, virtual] |
void L1TCSCTFClient::endJob | ( | void | ) | [protected, virtual] |
void L1TCSCTFClient::endLuminosityBlock | ( | const edm::LuminosityBlock & | lumiSeg, |
const edm::EventSetup & | c | ||
) | [protected, virtual] |
DQM Client Diagnostic.
Reimplemented from edm::EDAnalyzer.
Definition at line 55 of file L1TCSCTFClient.cc.
References newFWLiteAna::bin, benchmark_cfg::errors, and MonitorElement::getTH1F().
{ dbe->setCurrentFolder(input_dir); vector<string> meVec = dbe->getMEs(); for(vector<string>::const_iterator it=meVec.begin(); it!=meVec.end(); it++){ string full_path = input_dir + "/" + (*it); MonitorElement *me =dbe->get(full_path); if( !me ){ LogInfo("TriggerDQM")<<full_path<<" NOT FOUND."; continue; } // The commented code below requires to be developed to support QT framework /* std::vector<QReport *> Qtest_map = me->getQReports(); for(std::vector<QReport *>::const_iterator it=Qtest_map.begin(); it!=Qtest_map.end(); it++){ string qt_name = (*it)->getQRName(); int qt_status = (*it)->getStatus(); switch(qt_status){ case dqm::qstatus::WARNING: break; case dqm::qstatus::ERROR: break; case dqm::qstatus::DISABLED: break; case dqm::qstatus::INVALID: break; case dqm::qstatus::INSUF_STAT: break; default: break; } // get bad channel list std::vector<dqm::me_util::Channel> badChannels=(*it)->getBadChannels(); for(vector<dqm::me_util::Channel>::iterator badchsit=badChannels.begin(); badchsit!=badChannels.end(); badchsit++){ int ix = badchsit->getBinX(); int iy = badchsit->getBinY(); (*badchsit).getContents(); } } */ // But for now we only do a simple workaround if( (*it) != "CSCTF_errors" ) continue; TH1F *errors = me->getTH1F(); csctferrors_->getTH1F()->Reset(); if(!errors) continue; for(int bin=1; bin<=errors->GetXaxis()->GetNbins(); bin++) csctferrors_->Fill(bin-0.5,errors->GetBinContent(bin)); } }
void L1TCSCTFClient::endRun | ( | const edm::Run & | r, |
const edm::EventSetup & | c | ||
) | [protected, virtual] |
void L1TCSCTFClient::initialize | ( | ) | [private] |
Definition at line 23 of file L1TCSCTFClient.cc.
References cmsCodeRules::cppFunctionSkipper::operator, o2o::output_dir, Parameters::parameters, reco_calib_source_client_cfg::prescaleEvt, and reco_calib_source_client_cfg::prescaleLS.
{ counterLS = 0; counterEvt = 0; // get back-end interface dbe = Service<DQMStore>().operator->(); input_dir = parameters.getUntrackedParameter<string>("input_dir",""); output_dir = parameters.getUntrackedParameter<string>("output_dir",""); prescaleLS = parameters.getUntrackedParameter<int>("prescaleLS",-1); prescaleEvt = parameters.getUntrackedParameter<int>("prescaleEvt",-1); }
int L1TCSCTFClient::counterEvt [private] |
counter
Definition at line 54 of file L1TCSCTFClient.h.
int L1TCSCTFClient::counterLS [private] |
Definition at line 53 of file L1TCSCTFClient.h.
MonitorElement* L1TCSCTFClient::csctferrors_ [private] |
prescale on number of events
Definition at line 59 of file L1TCSCTFClient.h.
DQMStore* L1TCSCTFClient::dbe [private] |
Definition at line 51 of file L1TCSCTFClient.h.
std::string L1TCSCTFClient::input_dir [private] |
Definition at line 52 of file L1TCSCTFClient.h.
std::string L1TCSCTFClient::output_dir [private] |
Definition at line 52 of file L1TCSCTFClient.h.
edm::ParameterSet L1TCSCTFClient::parameters [private] |
Definition at line 49 of file L1TCSCTFClient.h.
int L1TCSCTFClient::prescaleEvt [private] |
units of lumi sections
Definition at line 56 of file L1TCSCTFClient.h.
int L1TCSCTFClient::prescaleLS [private] |
counter
Definition at line 55 of file L1TCSCTFClient.h.