Global stuff. More...
#include <CSCOfflineClient.h>
Public Member Functions | |
cscdqm::MonitorObject * | bookMonitorObject (const cscdqm::HistoBookRequest &p_req) |
Book Monitor Object on Request. | |
CSCOfflineClient (const edm::ParameterSet &ps) | |
Constructor. | |
bool | getCSCDetId (const unsigned int crateId, const unsigned int dmbId, CSCDetId &detId) const |
virtual | ~CSCOfflineClient () |
Destructor. | |
Protected Member Functions | |
void | analyze (const edm::Event &e, const edm::EventSetup &c) |
void | beginJob () |
void | beginLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &context) |
void | beginRun (const edm::Run &r, const edm::EventSetup &c) |
void | endJob () |
void | endLuminosityBlock (edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &iSetup) |
void | endRun (const edm::Run &r, const edm::EventSetup &c) |
void | setup () |
Private Attributes | |
cscdqm::Configuration | config |
DQMStore * | dbe |
cscdqm::Dispatcher * | dispatcher |
Global stuff.
DQM Framework stuff CSC Framework stuff CSCDQM Framework stuff Local stuff Local Constants
CSC Offline DQM Client that uses CSCDQM Framework
Definition at line 64 of file CSCOfflineClient.h.
CSCOfflineClient::CSCOfflineClient | ( | const edm::ParameterSet & | ps | ) |
Constructor.
Global stuff
ps | Parameters. |
Definition at line 25 of file CSCOfflineClient.cc.
References config, dbe, dispatcher, edm::ParameterSet::exists(), edm::ParameterSet::getUntrackedParameter(), cscdqm::Dispatcher::init(), cscdqm::Dispatcher::maskHWElements(), and cmsCodeRules::cppFunctionSkipper::operator.
{ edm::ParameterSet params = ps.getUntrackedParameter<edm::ParameterSet>("EventProcessor"); config.load(params); dbe = edm::Service<DQMStore>().operator->(); dispatcher = new cscdqm::Dispatcher(&config, const_cast<CSCOfflineClient*>(this)); dispatcher->init(); if (ps.exists("MASKEDHW")) { std::vector<std::string> maskedHW = ps.getUntrackedParameter<std::vector<std::string> >("MASKEDHW"); dispatcher->maskHWElements(maskedHW); } }
CSCOfflineClient::~CSCOfflineClient | ( | ) | [virtual] |
Destructor.
Definition at line 45 of file CSCOfflineClient.cc.
References dispatcher.
{ if (dispatcher) delete dispatcher; }
void CSCOfflineClient::analyze | ( | const edm::Event & | e, |
const edm::EventSetup & | c | ||
) | [inline, protected, virtual] |
void CSCOfflineClient::beginJob | ( | void | ) | [inline, protected, virtual] |
EDAnalyzer Implementation
Reimplemented from edm::EDAnalyzer.
Definition at line 96 of file CSCOfflineClient.h.
{ }
void CSCOfflineClient::beginLuminosityBlock | ( | const edm::LuminosityBlock & | lumiSeg, |
const edm::EventSetup & | context | ||
) | [inline, protected, virtual] |
void CSCOfflineClient::beginRun | ( | const edm::Run & | r, |
const edm::EventSetup & | c | ||
) | [inline, protected, virtual] |
cscdqm::MonitorObject * CSCOfflineClient::bookMonitorObject | ( | const cscdqm::HistoBookRequest & | req | ) | [virtual] |
Book Monitor Object on Request.
req | Request. |
Implements cscdqm::MonitorObjectProvider.
Definition at line 93 of file CSCOfflineClient.cc.
References DQMStore::bookFloat(), DQMStore::bookInt(), DQMStore::bookString(), dbe, cscdqm::HistoBookRequest::default_float, cscdqm::HistoBookRequest::default_int, cscdqm::HistoBookRequest::default_string, DIR_CRTINFO, DIR_DAQINFO, DIR_DCSINFO, DIR_EVENTINFO, cscdqm::MonitorObject::Fill(), cscdqm::FLOAT, cscdqm::HistoBookRequest::folder, cscdqm::HistoBookRequest::hdef, cscdqm::HistoBookRequest::htype, cscdqm::INT, relativeConstraints::keys, mergeVDriftHistosByStation::name, NULL, path(), cscdqm::Utility::regexMatch(), DQMStore::setCurrentFolder(), and cscdqm::STRING.
{ cscdqm::MonitorObject *me = NULL; std::string name = req.hdef->getName(); std::string path = req.folder; if (req.hdef->getPath().size() > 0) { path = path + req.hdef->getPath() + "/"; } dbe->setCurrentFolder(path); if (req.htype == cscdqm::INT) { me = new CSCMonitorObject(dbe->bookInt(name)); me->Fill(req.default_int); } else if (req.htype == cscdqm::FLOAT) { if (req.hdef->getId() == cscdqm::h::PAR_REPORT_SUMMARY) { dbe->setCurrentFolder(DIR_EVENTINFO); } else if (cscdqm::Utility::regexMatch("^PAR_DCS_", cscdqm::h::keys[req.hdef->getId()])) { dbe->setCurrentFolder(DIR_DCSINFO); } else if (cscdqm::Utility::regexMatch("^PAR_DAQ_", cscdqm::h::keys[req.hdef->getId()])) { dbe->setCurrentFolder(DIR_DAQINFO); } else if (cscdqm::Utility::regexMatch("^PAR_CRT_", cscdqm::h::keys[req.hdef->getId()])) { dbe->setCurrentFolder(DIR_CRTINFO); } me = new CSCMonitorObject(dbe->bookFloat(name)); me->Fill(req.default_float); } else if (req.htype == cscdqm::STRING) { me = new CSCMonitorObject(dbe->bookString(name, req.default_string)); } return me; }
void CSCOfflineClient::endJob | ( | void | ) | [inline, protected, virtual] |
void CSCOfflineClient::endLuminosityBlock | ( | edm::LuminosityBlock const & | lumiSeg, |
edm::EventSetup const & | iSetup | ||
) | [inline, protected, virtual] |
void CSCOfflineClient::endRun | ( | const edm::Run & | r, |
const edm::EventSetup & | c | ||
) | [protected, virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 49 of file CSCOfflineClient.cc.
References config, dbe, def, DIR_EVENTINFO, dispatcher, cscdqm::Configuration::fnPutHisto, DQMStore::get(), cscdqm::HistoDef::getHistoIdByName(), DQMStore::getMEs(), cscdqm::Configuration::incNEvents(), mergeVDriftHistosByStation::name, DQMStore::setCurrentFolder(), and cscdqm::Dispatcher::updateFractionAndEfficiencyHistos().
{ /* * Putting histograms to internal cache: EMU stuff */ dbe->setCurrentFolder(config.getFOLDER_EMU()); std::vector<std::string> me_names = dbe->getMEs(); for (std::vector<std::string>::iterator iter = me_names.begin(); iter != me_names.end(); iter++) { std::string me_name = *iter; MonitorElement* me = dbe->get(config.getFOLDER_EMU() + me_name); cscdqm::HistoId id; if (me && cscdqm::HistoDef::getHistoIdByName(me_name, id)) { const cscdqm::EMUHistoDef def(id); cscdqm::MonitorObject* mo = new CSCMonitorObject(me); config.fnPutHisto(def, mo); } } /* * Putting histograms to internal cache: EventInfo */ { std::string name = DIR_EVENTINFO; name += "reportSummaryMap"; MonitorElement* me = dbe->get(name); if (me) { const cscdqm::EMUHistoDef def(cscdqm::h::EMU_CSC_STATS_SUMMARY); cscdqm::MonitorObject* mo = new CSCMonitorObject(me); config.fnPutHisto(def, mo); } } config.incNEvents(); dispatcher->updateFractionAndEfficiencyHistos(); }
bool CSCOfflineClient::getCSCDetId | ( | const unsigned int | crateId, |
const unsigned int | dmbId, | ||
CSCDetId & | detId | ||
) | const [inline, virtual] |
MonitorObjectProvider Implementation
Implements cscdqm::MonitorObjectProvider.
Definition at line 87 of file CSCOfflineClient.h.
{ return false; }
void CSCOfflineClient::setup | ( | ) | [inline, protected] |
Definition at line 98 of file CSCOfflineClient.h.
{ }
Definition at line 77 of file CSCOfflineClient.h.
Referenced by CSCOfflineClient(), and endRun().
DQMStore* CSCOfflineClient::dbe [private] |
Definition at line 79 of file CSCOfflineClient.h.
Referenced by bookMonitorObject(), CSCOfflineClient(), and endRun().
cscdqm::Dispatcher* CSCOfflineClient::dispatcher [private] |
Definition at line 78 of file CSCOfflineClient.h.
Referenced by CSCOfflineClient(), endRun(), and ~CSCOfflineClient().