#include <RPCMonitorLinkSynchro.h>
Public Member Functions | |
virtual void | analyze (const edm::Event &, const edm::EventSetup &) |
virtual void | beginJob () |
virtual void | beginRun (const edm::Run &, const edm::EventSetup &) |
virtual void | endJob () |
virtual void | endLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &) |
RPCMonitorLinkSynchro (const edm::ParameterSet &cfg) | |
virtual const RPCRawSynchro::ProdItem & | select (const RPCRawSynchro::ProdItem &v, const edm::Event &, const edm::EventSetup &) |
virtual | ~RPCMonitorLinkSynchro () |
Protected Member Functions | |
virtual TObjArray | histos () const |
Protected Attributes | |
MonitorElement * | me_delaySpread |
MonitorElement * | me_delaySummary |
MonitorElement * | me_notComplete [3] |
MonitorElement * | me_topOccup |
MonitorElement * | me_topSpread |
edm::ESWatcher< RPCEMapRcd > | theCablingWatcher |
edm::ParameterSet | theConfig |
RPCLinkSynchroStat | theSynchroStat |
Monitor and anlyse synchro counts () produced by R2D.
Definition at line 20 of file RPCMonitorLinkSynchro.h.
RPCMonitorLinkSynchro::RPCMonitorLinkSynchro | ( | const edm::ParameterSet & | cfg | ) | [explicit] |
Definition at line 30 of file RPCMonitorLinkSynchro.cc.
: theConfig(cfg), theSynchroStat(RPCLinkSynchroStat(theConfig.getUntrackedParameter<bool>("useFirstHitOnly", false))) { }
RPCMonitorLinkSynchro::~RPCMonitorLinkSynchro | ( | ) | [virtual] |
Definition at line 36 of file RPCMonitorLinkSynchro.cc.
{ }
void RPCMonitorLinkSynchro::analyze | ( | const edm::Event & | ev, |
const edm::EventSetup & | es | ||
) | [virtual] |
Implements edm::EDAnalyzer.
Definition at line 106 of file RPCMonitorLinkSynchro.cc.
References RPCLinkSynchroStat::add(), MonitorElement::Fill(), edm::Event::getByType(), me_notComplete, edmOneToOneComparison::problems, edm::Handle< T >::product(), select(), and theSynchroStat.
{ edm::Handle<RPCRawSynchro::ProdItem> synchroCounts; ev.getByType(synchroCounts); std::vector<LinkBoardElectronicIndex> problems; const RPCRawSynchro::ProdItem &vItem = select(*synchroCounts.product(), ev,es); theSynchroStat.add(vItem, problems); for (std::vector<LinkBoardElectronicIndex>::const_iterator it=problems.begin(); it != problems.end(); ++it) { me_notComplete[it->dccId-790]->Fill(it->dccInputChannelNum,it->tbLinkInputNum); } }
void RPCMonitorLinkSynchro::beginJob | ( | void | ) | [virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 59 of file RPCMonitorLinkSynchro.cc.
References DQMStore::book1D(), DQMStore::book2D(), MonitorElement::getTH1F(), MonitorElement::getTH2F(), i, me_delaySpread, me_delaySummary, me_notComplete, me_topOccup, me_topSpread, cmsCodeRules::cppFunctionSkipper::operator, and DQMStore::setCurrentFolder().
{ DQMStore* dmbe = edm::Service<DQMStore>().operator->(); dmbe->setCurrentFolder("RPC/LinkMonitor/"); me_delaySummary = dmbe->book1D("delaySummary","LinkDelaySummary",8,-3.5, 4.5); me_delaySummary->getTH1F()->SetStats(111); me_delaySpread = dmbe->book2D("delaySpread","LinkDelaySpread",71,-3.05, 4.05, 31,-0.05,3.05); me_delaySpread->getTH2F()->SetStats(0); me_notComplete[0] = dmbe->book2D("notComplete790","FED790: not All Paths hit",36,-0.5,35.5,18,-0.5,17.5); me_notComplete[1] = dmbe->book2D("notComplete791","FED791: not All Paths hit",36,-0.5,35.5,18,-0.5,17.5); me_notComplete[2] = dmbe->book2D("notComplete792","FED792: not All Paths hit",36,-0.5,35.5,18,-0.5,17.5); for (unsigned int i=0;i<3;++i) { me_notComplete[i]->getTH2F()->GetXaxis()->SetNdivisions(512); me_notComplete[i]->getTH2F()->GetYaxis()->SetNdivisions(505); me_notComplete[i]->getTH2F()->SetXTitle("rmb"); me_notComplete[i]->getTH2F()->SetYTitle("link"); me_notComplete[i]->getTH2F()->SetStats(0); } me_topOccup = dmbe->book2D("topOccup","Top10 LinkBoard occupancy",8,-0.5,7.5, 10,0.,10.); me_topSpread = dmbe->book2D("topSpread","Top10 LinkBoard delay spread",8,-0.5,7.5, 10,0.,10.); me_topOccup->getTH2F()->GetXaxis()->SetNdivisions(110); me_topSpread->getTH2F()->GetXaxis()->SetNdivisions(110); me_topOccup->getTH2F()->SetStats(0); me_topSpread->getTH2F()->SetStats(0); }
void RPCMonitorLinkSynchro::beginRun | ( | const edm::Run & | , |
const edm::EventSetup & | es | ||
) | [virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 40 of file RPCMonitorLinkSynchro.cc.
References edm::ESWatcher< T >::check(), edm::EventSetup::get(), edm::ParameterSet::getUntrackedParameter(), RPCLinkSynchroStat::init(), theCablingWatcher, theConfig, theSynchroStat, and RPCReadOutMapping::version().
{ if (theCablingWatcher.check(es)) { edm::ESTransientHandle<RPCEMap> readoutMapping; es.get<RPCEMapRcd>().get(readoutMapping); RPCReadOutMapping * cabling = readoutMapping->convert(); edm::LogInfo("RPCMonitorLinkSynchro") << "RPCMonitorLinkSynchro - record has CHANGED!!, read map, VERSION: " << cabling->version(); theSynchroStat.init(cabling, theConfig.getUntrackedParameter<bool>("dumpDelays")); delete cabling; } }
void RPCMonitorLinkSynchro::endJob | ( | void | ) | [virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 101 of file RPCMonitorLinkSynchro.cc.
References RPCLinkSynchroStat::dumpDelays(), edm::ParameterSet::getUntrackedParameter(), theConfig, and theSynchroStat.
{ if (theConfig.getUntrackedParameter<bool>("dumpDelays")) edm::LogInfo("RPCMonitorLinkSynchro DumpDelays") << theSynchroStat.dumpDelays(); }
void RPCMonitorLinkSynchro::endLuminosityBlock | ( | const edm::LuminosityBlock & | ls, |
const edm::EventSetup & | es | ||
) | [virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 52 of file RPCMonitorLinkSynchro.cc.
References RPCLinkSynchroHistoMaker::fill(), MonitorElement::getTH1F(), MonitorElement::getTH2F(), me_delaySpread, me_delaySummary, me_topOccup, me_topSpread, and theSynchroStat.
{ RPCLinkSynchroHistoMaker hm(theSynchroStat); hm.fill(me_delaySummary->getTH1F(), me_delaySpread->getTH2F(), me_topOccup->getTH2F(), me_topSpread->getTH2F()); }
TObjArray RPCMonitorLinkSynchro::histos | ( | ) | const [protected, virtual] |
Definition at line 89 of file RPCMonitorLinkSynchro.cc.
References MonitorElement::getTH1F(), MonitorElement::getTH2F(), i, me_delaySpread, me_delaySummary, me_notComplete, me_topOccup, me_topSpread, and query::result.
{ TObjArray result; result.Add(me_delaySummary->getTH1F()); result.Add(me_delaySpread->getTH2F()); result.Add(me_topOccup->getTH2F()); result.Add(me_topSpread->getTH2F()); for (unsigned int i=0;i<=2;i++) result.Add(me_notComplete[i]->getTH2F()); return result; }
virtual const RPCRawSynchro::ProdItem& RPCMonitorLinkSynchro::select | ( | const RPCRawSynchro::ProdItem & | v, |
const edm::Event & | , | ||
const edm::EventSetup & | |||
) | [inline, virtual] |
Definition at line 28 of file RPCMonitorLinkSynchro.h.
References v.
Referenced by analyze().
{ return v; };
MonitorElement* RPCMonitorLinkSynchro::me_delaySpread [protected] |
Definition at line 38 of file RPCMonitorLinkSynchro.h.
Referenced by beginJob(), endLuminosityBlock(), and histos().
MonitorElement* RPCMonitorLinkSynchro::me_delaySummary [protected] |
Definition at line 37 of file RPCMonitorLinkSynchro.h.
Referenced by beginJob(), endLuminosityBlock(), and histos().
MonitorElement* RPCMonitorLinkSynchro::me_notComplete[3] [protected] |
Definition at line 41 of file RPCMonitorLinkSynchro.h.
Referenced by analyze(), beginJob(), and histos().
MonitorElement* RPCMonitorLinkSynchro::me_topOccup [protected] |
Definition at line 39 of file RPCMonitorLinkSynchro.h.
Referenced by beginJob(), endLuminosityBlock(), and histos().
MonitorElement* RPCMonitorLinkSynchro::me_topSpread [protected] |
Definition at line 40 of file RPCMonitorLinkSynchro.h.
Referenced by beginJob(), endLuminosityBlock(), and histos().
Definition at line 34 of file RPCMonitorLinkSynchro.h.
Referenced by beginRun().
edm::ParameterSet RPCMonitorLinkSynchro::theConfig [protected] |
Definition at line 33 of file RPCMonitorLinkSynchro.h.
Referenced by beginRun(), and endJob().
Definition at line 35 of file RPCMonitorLinkSynchro.h.
Referenced by analyze(), beginRun(), endJob(), and endLuminosityBlock().