#include <DQM/L1TMonitorClient/interface/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 (const edm::EventSetup &c) |
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 initialize(), and parameters.
00015 { 00016 parameters=ps; 00017 initialize(); 00018 }
L1TCSCTFClient::~L1TCSCTFClient | ( | ) | [virtual] |
void L1TCSCTFClient::analyze | ( | const edm::Event & | e, | |
const edm::EventSetup & | c | |||
) | [protected, virtual] |
Fake Analyze.
Implements edm::EDAnalyzer.
Definition at line 101 of file L1TCSCTFClient.cc.
References counterEvt, csctferrors_, dbe, HLT_VtxMuL3::errors, MonitorElement::Fill(), DQMStore::get(), DQMStore::getMEs(), MonitorElement::getTH1F(), input_dir, it, me, and prescaleEvt.
00101 { 00102 counterEvt++; 00103 if (prescaleEvt<1) return; 00104 if (prescaleEvt>0 && counterEvt%prescaleEvt!=0) return; 00105 00106 // The code below duplicates one from endLuminosityBlock function 00107 vector<string> meVec = dbe->getMEs(); 00108 for(vector<string>::const_iterator it=meVec.begin(); it!=meVec.end(); it++){ 00109 string full_path = input_dir + "/" + (*it); 00110 MonitorElement *me =dbe->get(full_path); 00111 if( !me ){ 00112 LogError("TriggerDQM")<<full_path<<" NOT FOUND."; 00113 continue; 00114 } 00115 // But for now we only do a simple workaround 00116 if( (*it) != "CSCTF_errors" ) continue; 00117 TH1F *errors = me->getTH1F(); 00118 csctferrors_->getTH1F()->Reset(); 00119 if(!errors) continue; 00120 for(int bin=1; bin<=errors->GetXaxis()->GetNbins(); bin++) 00121 csctferrors_->Fill(bin-0.5,errors->GetBinContent(bin)); 00122 } 00123 }
void L1TCSCTFClient::beginJob | ( | const edm::EventSetup & | c | ) | [protected, virtual] |
BeginJob.
Reimplemented from edm::EDAnalyzer.
Definition at line 37 of file L1TCSCTFClient.cc.
References DQMStore::book1D(), csctferrors_, dbe, input_dir, output_dir, and DQMStore::setCurrentFolder().
00037 { 00038 // get backendinterface 00039 dbe = Service<DQMStore>().operator->(); 00040 00041 // do your thing 00042 dbe->setCurrentFolder(output_dir); 00043 csctferrors_ = dbe->book1D("csctferrors_","CSCTF Errors",6,0,6); 00044 dbe->setCurrentFolder(input_dir); 00045 }
void L1TCSCTFClient::beginLuminosityBlock | ( | const edm::LuminosityBlock & | lumiSeg, | |
const edm::EventSetup & | context | |||
) | [protected, virtual] |
void L1TCSCTFClient::beginRun | ( | const edm::Run & | r, | |
const edm::EventSetup & | c | |||
) | [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 csctferrors_, dbe, HLT_VtxMuL3::errors, MonitorElement::Fill(), DQMStore::get(), DQMStore::getMEs(), MonitorElement::getTH1F(), input_dir, it, and me.
00055 { 00056 vector<string> meVec = dbe->getMEs(); 00057 for(vector<string>::const_iterator it=meVec.begin(); it!=meVec.end(); it++){ 00058 string full_path = input_dir + "/" + (*it); 00059 MonitorElement *me =dbe->get(full_path); 00060 if( !me ){ 00061 LogInfo("TriggerDQM")<<full_path<<" NOT FOUND."; 00062 continue; 00063 } 00064 00065 // The commented code below requires to be developed to support QT framework 00066 /* std::vector<QReport *> Qtest_map = me->getQReports(); 00067 for(std::vector<QReport *>::const_iterator it=Qtest_map.begin(); it!=Qtest_map.end(); it++){ 00068 string qt_name = (*it)->getQRName(); 00069 int qt_status = (*it)->getStatus(); 00070 00071 switch(qt_status){ 00072 case dqm::qstatus::WARNING: break; 00073 case dqm::qstatus::ERROR: break; 00074 case dqm::qstatus::DISABLED: break; 00075 case dqm::qstatus::INVALID: break; 00076 case dqm::qstatus::INSUF_STAT: break; 00077 default: break; 00078 } 00079 00080 // get bad channel list 00081 std::vector<dqm::me_util::Channel> badChannels=(*it)->getBadChannels(); 00082 for(vector<dqm::me_util::Channel>::iterator badchsit=badChannels.begin(); badchsit!=badChannels.end(); badchsit++){ 00083 int ix = badchsit->getBinX(); 00084 int iy = badchsit->getBinY(); 00085 (*badchsit).getContents(); 00086 } 00087 00088 } 00089 */ 00090 // But for now we only do a simple workaround 00091 if( (*it) != "CSCTF_errors" ) continue; 00092 TH1F *errors = me->getTH1F(); 00093 csctferrors_->getTH1F()->Reset(); 00094 if(!errors) continue; 00095 for(int bin=1; bin<=errors->GetXaxis()->GetNbins(); bin++) 00096 csctferrors_->Fill(bin-0.5,errors->GetBinContent(bin)); 00097 } 00098 }
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 counterEvt, counterLS, dbe, edm::ParameterSet::getUntrackedParameter(), input_dir, output_dir, parameters, prescaleEvt, and prescaleLS.
Referenced by L1TCSCTFClient().
00023 { 00024 counterLS = 0; 00025 counterEvt = 0; 00026 00027 // get back-end interface 00028 dbe = Service<DQMStore>().operator->(); 00029 00030 input_dir = parameters.getUntrackedParameter<string>("input_dir",""); 00031 output_dir = parameters.getUntrackedParameter<string>("output_dir",""); 00032 prescaleLS = parameters.getUntrackedParameter<int>("prescaleLS",-1); 00033 prescaleEvt = parameters.getUntrackedParameter<int>("prescaleEvt",-1); 00034 }
int L1TCSCTFClient::counterEvt [private] |
int L1TCSCTFClient::counterLS [private] |
MonitorElement* L1TCSCTFClient::csctferrors_ [private] |
prescale on number of events
Definition at line 59 of file L1TCSCTFClient.h.
Referenced by analyze(), beginJob(), and endLuminosityBlock().
DQMStore* L1TCSCTFClient::dbe [private] |
Definition at line 51 of file L1TCSCTFClient.h.
Referenced by analyze(), beginJob(), endLuminosityBlock(), and initialize().
std::string L1TCSCTFClient::input_dir [private] |
Definition at line 52 of file L1TCSCTFClient.h.
Referenced by analyze(), beginJob(), endLuminosityBlock(), and initialize().
std::string L1TCSCTFClient::output_dir [private] |
edm::ParameterSet L1TCSCTFClient::parameters [private] |
int L1TCSCTFClient::prescaleEvt [private] |
units of lumi sections
Definition at line 56 of file L1TCSCTFClient.h.
Referenced by analyze(), and initialize().
int L1TCSCTFClient::prescaleLS [private] |