CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Attributes | Private Attributes
RPCMonitorLinkSynchro Class Reference

#include <RPCMonitorLinkSynchro.h>

Inheritance diagram for RPCMonitorLinkSynchro:
one::DQMEDAnalyzer< edm::one::WatchLuminosityBlocks > one::dqmimplementation::DQMBaseClass< T... >

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void beginLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &) final
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
void dqmBeginRun (const edm::Run &r, const edm::EventSetup &c) override
 
void endLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &) override
 
 RPCMonitorLinkSynchro (const edm::ParameterSet &cfg)
 
virtual const RPCRawSynchro::ProdItemselect (const RPCRawSynchro::ProdItem &v, const edm::Event &, const edm::EventSetup &)
 
 ~RPCMonitorLinkSynchro () override
 
- Public Member Functions inherited from one::DQMEDAnalyzer< edm::one::WatchLuminosityBlocks >
 DQMEDAnalyzer ()=default
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > const &)=delete
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > &&)=delete
 
 ~DQMEDAnalyzer () override=default
 

Protected Attributes

MonitorElementme_delaySpread
 
MonitorElementme_delaySummary
 
MonitorElementme_notComplete [3]
 
MonitorElementme_topOccup
 
MonitorElementme_topSpread
 
edm::ESWatcher< RPCEMapRcdtheCablingWatcher
 
edm::ParameterSet theConfig
 
RPCLinkSynchroStat theSynchroStat
 

Private Attributes

edm::EDGetTokenT< RPCRawSynchro::ProdItemrpcRawSynchroProdItemTag_
 

Detailed Description

Monitor and anlyse synchro counts () produced by R2D.

Definition at line 22 of file RPCMonitorLinkSynchro.h.

Constructor & Destructor Documentation

RPCMonitorLinkSynchro::RPCMonitorLinkSynchro ( const edm::ParameterSet cfg)
explicit

Definition at line 17 of file RPCMonitorLinkSynchro.cc.

References edm::ParameterSet::getParameter(), and rpcRawSynchroProdItemTag_.

18  : theConfig(cfg),
19  theSynchroStat(RPCLinkSynchroStat(theConfig.getUntrackedParameter<bool>("useFirstHitOnly", false)))
20 
21 {
22 
23  rpcRawSynchroProdItemTag_=consumes<RPCRawSynchro::ProdItem>(cfg.getParameter<edm::InputTag>("rpcRawSynchroProdItemTag"));
24 
25 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
RPCLinkSynchroStat theSynchroStat
edm::EDGetTokenT< RPCRawSynchro::ProdItem > rpcRawSynchroProdItemTag_
edm::ParameterSet theConfig
RPCMonitorLinkSynchro::~RPCMonitorLinkSynchro ( )
override

Definition at line 27 of file RPCMonitorLinkSynchro.cc.

27 { }

Member Function Documentation

void RPCMonitorLinkSynchro::analyze ( const edm::Event ev,
const edm::EventSetup es 
)
override

Definition at line 80 of file RPCMonitorLinkSynchro.cc.

References RPCLinkSynchroStat::add(), ev, MonitorElement::Fill(), edm::Event::getByToken(), me_notComplete, edmOneToOneComparison::problems, edm::Handle< T >::product(), rpcRawSynchroProdItemTag_, select(), and theSynchroStat.

81 {
83  ev.getByToken(rpcRawSynchroProdItemTag_, synchroCounts);
84  std::vector<LinkBoardElectronicIndex> problems;
85  const RPCRawSynchro::ProdItem &vItem = select(*synchroCounts.product(), ev,es);
86  theSynchroStat.add(vItem, problems);
87 
88  for (std::vector<LinkBoardElectronicIndex>::const_iterator it=problems.begin(); it != problems.end(); ++it) {
89  me_notComplete[it->dccId-790]->Fill(it->dccInputChannelNum,it->tbLinkInputNum);
90  }
91 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
bool ev
RPCLinkSynchroStat theSynchroStat
virtual const RPCRawSynchro::ProdItem & select(const RPCRawSynchro::ProdItem &v, const edm::Event &, const edm::EventSetup &)
void Fill(long long x)
std::vector< std::pair< LinkBoardElectronicIndex, int > > ProdItem
Definition: RPCRawSynchro.h:9
edm::EDGetTokenT< RPCRawSynchro::ProdItem > rpcRawSynchroProdItemTag_
MonitorElement * me_notComplete[3]
void add(const RPCRawSynchro::ProdItem &counts, std::vector< LinkBoardElectronicIndex > &problems)
T const * product() const
Definition: Handle.h:74
void RPCMonitorLinkSynchro::beginLuminosityBlock ( const edm::LuminosityBlock ,
const edm::EventSetup  
)
inlinefinal

Definition at line 30 of file RPCMonitorLinkSynchro.h.

References analyze().

30 {}
void RPCMonitorLinkSynchro::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  iRun,
edm::EventSetup const &  es 
)
override

Definition at line 48 of file RPCMonitorLinkSynchro.cc.

References DQMStore::IBooker::book1D(), DQMStore::IBooker::book2D(), DQMStore::IBooker::cd(), MonitorElement::getTH1F(), MonitorElement::getTH2F(), mps_fire::i, me_delaySpread, me_delaySummary, me_notComplete, me_topOccup, me_topSpread, and DQMStore::IBooker::setCurrentFolder().

50  {
51  ibooker.cd();
52  ibooker.setCurrentFolder("RPC/LinkMonitor/");
53 
54  me_delaySummary = ibooker.book1D("delaySummary","LinkDelaySummary",8,-3.5, 4.5);
55  me_delaySummary->getTH1F()->SetStats(true);
56 
57  me_delaySpread = ibooker.book2D("delaySpread","LinkDelaySpread",71,-3.05, 4.05, 31,-0.05,3.05);
58  me_delaySpread->getTH2F()->SetStats(false);
59 
60  me_notComplete[0] = ibooker.book2D("notComplete790","FED790: not All Paths hit",36,-0.5,35.5,18,-0.5,17.5);
61  me_notComplete[1] = ibooker.book2D("notComplete791","FED791: not All Paths hit",36,-0.5,35.5,18,-0.5,17.5);
62  me_notComplete[2] = ibooker.book2D("notComplete792","FED792: not All Paths hit",36,-0.5,35.5,18,-0.5,17.5);
63  for (unsigned int i=0;i<3;++i) {
64  me_notComplete[i]->getTH2F()->GetXaxis()->SetNdivisions(512);
65  me_notComplete[i]->getTH2F()->GetYaxis()->SetNdivisions(505);
66  me_notComplete[i]->getTH2F()->SetXTitle("rmb");
67  me_notComplete[i]->getTH2F()->SetYTitle("link");
68  me_notComplete[i]->getTH2F()->SetStats(false);
69  }
70  me_topOccup = ibooker.book2D("topOccup","Top10 LinkBoard occupancy",8,-0.5,7.5, 10,0.,10.);
71  me_topSpread = ibooker.book2D("topSpread","Top10 LinkBoard delay spread",8,-0.5,7.5, 10,0.,10.);
72  me_topOccup->getTH2F()->GetXaxis()->SetNdivisions(110);
73  me_topSpread->getTH2F()->GetXaxis()->SetNdivisions(110);
74  me_topOccup->getTH2F()->SetStats(false);
75  me_topSpread->getTH2F()->SetStats(false);
76 
77 }
TH1F * getTH1F() const
MonitorElement * me_topOccup
MonitorElement * me_topSpread
MonitorElement * me_delaySpread
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106
TH2F * getTH2F() const
MonitorElement * me_notComplete[3]
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:109
MonitorElement * me_delaySummary
void RPCMonitorLinkSynchro::dqmBeginRun ( const edm::Run r,
const edm::EventSetup c 
)
override

Definition at line 38 of file RPCMonitorLinkSynchro.cc.

References edm::ESWatcher< T >::check(), RPCEMap::convert(), edm::EventSetup::get(), edm::ParameterSet::getUntrackedParameter(), RPCLinkSynchroStat::init(), theCablingWatcher, theConfig, and theSynchroStat.

38  {
39  if (theCablingWatcher.check(es)) {
40  edm::ESTransientHandle<RPCEMap> readoutMapping;
41  es.get<RPCEMapRcd>().get(readoutMapping);
42  std::unique_ptr<RPCReadOutMapping const> cabling{ readoutMapping->convert() };
43  edm::LogInfo("RPCMonitorLinkSynchro") << "RPCMonitorLinkSynchro - record has CHANGED!!, read map, VERSION: " << cabling->version();
44  theSynchroStat.init(cabling.get(), theConfig.getUntrackedParameter<bool>("dumpDelays"));
45  }
46 }
T getUntrackedParameter(std::string const &, T const &) const
void init(const RPCReadOutMapping *theCabling, bool addChamberInfo)
RPCLinkSynchroStat theSynchroStat
edm::ESWatcher< RPCEMapRcd > theCablingWatcher
edm::ParameterSet theConfig
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:52
RPCReadOutMapping const * convert() const
Definition: RPCEMap.h:67
void RPCMonitorLinkSynchro::endLuminosityBlock ( const edm::LuminosityBlock ls,
const edm::EventSetup es 
)
override
virtual const RPCRawSynchro::ProdItem& RPCMonitorLinkSynchro::select ( const RPCRawSynchro::ProdItem v,
const edm::Event ,
const edm::EventSetup  
)
inlinevirtual

Member Data Documentation

MonitorElement* RPCMonitorLinkSynchro::me_delaySpread
protected

Definition at line 41 of file RPCMonitorLinkSynchro.h.

Referenced by bookHistograms(), and endLuminosityBlock().

MonitorElement* RPCMonitorLinkSynchro::me_delaySummary
protected

Definition at line 40 of file RPCMonitorLinkSynchro.h.

Referenced by bookHistograms(), and endLuminosityBlock().

MonitorElement* RPCMonitorLinkSynchro::me_notComplete[3]
protected

Definition at line 44 of file RPCMonitorLinkSynchro.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* RPCMonitorLinkSynchro::me_topOccup
protected

Definition at line 42 of file RPCMonitorLinkSynchro.h.

Referenced by bookHistograms(), and endLuminosityBlock().

MonitorElement* RPCMonitorLinkSynchro::me_topSpread
protected

Definition at line 43 of file RPCMonitorLinkSynchro.h.

Referenced by bookHistograms(), and endLuminosityBlock().

edm::EDGetTokenT<RPCRawSynchro::ProdItem> RPCMonitorLinkSynchro::rpcRawSynchroProdItemTag_
private

Definition at line 47 of file RPCMonitorLinkSynchro.h.

Referenced by analyze(), and RPCMonitorLinkSynchro().

edm::ESWatcher<RPCEMapRcd> RPCMonitorLinkSynchro::theCablingWatcher
protected

Definition at line 37 of file RPCMonitorLinkSynchro.h.

Referenced by dqmBeginRun().

edm::ParameterSet RPCMonitorLinkSynchro::theConfig
protected

Definition at line 33 of file RPCMonitorLinkSynchro.h.

Referenced by dqmBeginRun().

RPCLinkSynchroStat RPCMonitorLinkSynchro::theSynchroStat
protected

Definition at line 38 of file RPCMonitorLinkSynchro.h.

Referenced by analyze(), dqmBeginRun(), and endLuminosityBlock().