#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 () |
void | processHistograms () |
Private Attributes | |
int | counterEvt |
counter | |
int | counterLS |
MonitorElement * | csctferrors_ |
DQMStore * | dbe |
std::string | input_dir |
bool | m_runInEndJob |
bool | m_runInEndLumi |
bool | m_runInEndRun |
bool | m_runInEventLoop |
prescale on number of events | |
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 71 of file L1TCSCTFClient.cc.
References reco_calib_source_client_cfg::prescaleEvt.
{ counterEvt++; if (prescaleEvt<1) return; if (prescaleEvt>0 && counterEvt%prescaleEvt!=0) return; // there is no loop on events in the offline harvesting step // code here will not be executed offline if (m_runInEventLoop) { processHistograms(); } }
void L1TCSCTFClient::beginJob | ( | void | ) | [protected, virtual] |
BeginJob.
Reimplemented from edm::EDAnalyzer.
Definition at line 43 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 57 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] |
Endjob.
Reimplemented from edm::EDAnalyzer.
Definition at line 98 of file L1TCSCTFClient.cc.
{ if (m_runInEndJob) { processHistograms(); } }
void L1TCSCTFClient::endLuminosityBlock | ( | const edm::LuminosityBlock & | lumiSeg, |
const edm::EventSetup & | c | ||
) | [protected, virtual] |
DQM Client Diagnostic.
Reimplemented from edm::EDAnalyzer.
Definition at line 61 of file L1TCSCTFClient.cc.
{ if (m_runInEndLumi) { processHistograms(); } }
void L1TCSCTFClient::endRun | ( | const edm::Run & | r, |
const edm::EventSetup & | c | ||
) | [protected, virtual] |
EndRun.
Reimplemented from edm::EDAnalyzer.
Definition at line 88 of file L1TCSCTFClient.cc.
{ if (m_runInEndRun) { processHistograms(); } }
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); m_runInEventLoop = parameters.getUntrackedParameter<bool>("runInEventLoop", false); m_runInEndLumi = parameters.getUntrackedParameter<bool>("runInEndLumi", false); m_runInEndRun = parameters.getUntrackedParameter<bool>("runInEndRun", false); m_runInEndJob = parameters.getUntrackedParameter<bool>("runInEndJob", false); }
void L1TCSCTFClient::processHistograms | ( | ) | [private] |
Definition at line 108 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; } // 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)); } }
int L1TCSCTFClient::counterEvt [private] |
counter
Definition at line 57 of file L1TCSCTFClient.h.
int L1TCSCTFClient::counterLS [private] |
Definition at line 56 of file L1TCSCTFClient.h.
MonitorElement* L1TCSCTFClient::csctferrors_ [private] |
Definition at line 69 of file L1TCSCTFClient.h.
DQMStore* L1TCSCTFClient::dbe [private] |
Definition at line 54 of file L1TCSCTFClient.h.
std::string L1TCSCTFClient::input_dir [private] |
Definition at line 55 of file L1TCSCTFClient.h.
bool L1TCSCTFClient::m_runInEndJob [private] |
Definition at line 64 of file L1TCSCTFClient.h.
bool L1TCSCTFClient::m_runInEndLumi [private] |
Definition at line 62 of file L1TCSCTFClient.h.
bool L1TCSCTFClient::m_runInEndRun [private] |
Definition at line 63 of file L1TCSCTFClient.h.
bool L1TCSCTFClient::m_runInEventLoop [private] |
prescale on number of events
Definition at line 61 of file L1TCSCTFClient.h.
std::string L1TCSCTFClient::output_dir [private] |
Definition at line 55 of file L1TCSCTFClient.h.
edm::ParameterSet L1TCSCTFClient::parameters [private] |
Definition at line 52 of file L1TCSCTFClient.h.
int L1TCSCTFClient::prescaleEvt [private] |
units of lumi sections
Definition at line 59 of file L1TCSCTFClient.h.
int L1TCSCTFClient::prescaleLS [private] |
counter
Definition at line 58 of file L1TCSCTFClient.h.