CMS 3D CMS Logo

RPCMonitorLinkSynchro.cc
Go to the documentation of this file.
3 
7 
9 
10 #include <memory>
11 
13  : theConfig(cfg),
14  theSynchroStat(RPCLinkSynchroStat(theConfig.getUntrackedParameter<bool>("useFirstHitOnly", false)))
15 
16 {
18  consumes<RPCRawSynchro::ProdItem>(cfg.getParameter<edm::InputTag>("rpcRawSynchroProdItemTag"));
19  rpcEMapToken_ = esConsumes<edm::Transition::BeginRun>();
20 }
21 
25 }
26 
28  if (theCablingWatcher.check(es)) {
30  std::unique_ptr<RPCReadOutMapping const> cabling{readoutMapping->convert()};
31  edm::LogInfo("RPCMonitorLinkSynchro")
32  << "RPCMonitorLinkSynchro - record has CHANGED!!, read map, VERSION: " << cabling->version();
33  theSynchroStat.init(cabling.get(), theConfig.getUntrackedParameter<bool>("dumpDelays"));
34  }
35 }
36 
38  edm::Run const& iRun,
39  edm::EventSetup const& es) {
40  ibooker.cd();
41  ibooker.setCurrentFolder("RPC/LinkMonitor/");
42 
43  me_delaySummary = ibooker.book1D("delaySummary", "LinkDelaySummary", 8, -3.5, 4.5);
44  me_delaySummary->getTH1F()->SetStats(true);
45 
46  me_delaySpread = ibooker.book2D("delaySpread", "LinkDelaySpread", 71, -3.05, 4.05, 31, -0.05, 3.05);
47  me_delaySpread->getTH2F()->SetStats(false);
48 
49  me_notComplete[0] = ibooker.book2D("notComplete790", "FED790: not All Paths hit", 36, -0.5, 35.5, 18, -0.5, 17.5);
50  me_notComplete[1] = ibooker.book2D("notComplete791", "FED791: not All Paths hit", 36, -0.5, 35.5, 18, -0.5, 17.5);
51  me_notComplete[2] = ibooker.book2D("notComplete792", "FED792: not All Paths hit", 36, -0.5, 35.5, 18, -0.5, 17.5);
52  for (unsigned int i = 0; i < 3; ++i) {
53  me_notComplete[i]->getTH2F()->GetXaxis()->SetNdivisions(512);
54  me_notComplete[i]->getTH2F()->GetYaxis()->SetNdivisions(505);
55  me_notComplete[i]->setAxisTitle("rmb");
56  me_notComplete[i]->getTH2F()->SetYTitle("link");
57  me_notComplete[i]->getTH2F()->SetStats(false);
58  }
59  me_topOccup = ibooker.book2D("topOccup", "Top10 LinkBoard occupancy", 8, -0.5, 7.5, 10, 0., 10.);
60  me_topSpread = ibooker.book2D("topSpread", "Top10 LinkBoard delay spread", 8, -0.5, 7.5, 10, 0., 10.);
61  me_topOccup->getTH2F()->GetXaxis()->SetNdivisions(110);
62  me_topSpread->getTH2F()->GetXaxis()->SetNdivisions(110);
63  me_topOccup->getTH2F()->SetStats(false);
64  me_topSpread->getTH2F()->SetStats(false);
65 }
66 
69  ev.getByToken(rpcRawSynchroProdItemTag_, synchroCounts);
70  std::vector<LinkBoardElectronicIndex> problems;
71  const RPCRawSynchro::ProdItem& vItem = select(*synchroCounts.product(), ev, es);
72  theSynchroStat.add(vItem, problems);
73 
74  for (std::vector<LinkBoardElectronicIndex>::const_iterator it = problems.begin(); it != problems.end(); ++it) {
75  me_notComplete[it->dccId - 790]->Fill(it->dccInputChannelNum, it->tbLinkInputNum);
76  }
77 }
edm::ESWatcher::check
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:57
eostools.ls
def ls(path, rec=False)
Definition: eostools.py:349
electrons_cff.bool
bool
Definition: electrons_cff.py:366
mps_fire.i
i
Definition: mps_fire.py:428
ESTransientHandle.h
MessageLogger.h
funct::false
false
Definition: Factorize.h:29
edm::Handle::product
T const * product() const
Definition: Handle.h:70
RPCReadOutMapping.h
RPCMonitorLinkSynchro::theSynchroStat
RPCLinkSynchroStat theSynchroStat
Definition: RPCMonitorLinkSynchro.h:39
RPCEMap::convert
RPCReadOutMapping const * convert() const
Definition: RPCEMap.h:64
edm::LuminosityBlock
Definition: LuminosityBlock.h:50
edm::Run
Definition: Run.h:45
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
RPCLinkSynchroStat::init
void init(const RPCReadOutMapping *theCabling, bool addChamberInfo)
Definition: RPCLinkSynchroStat.cc:129
RPCMonitorLinkSynchro::me_topSpread
MonitorElement * me_topSpread
Definition: RPCMonitorLinkSynchro.h:44
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
RPCMonitorLinkSynchro::endLuminosityBlock
void endLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) override
Definition: RPCMonitorLinkSynchro.cc:22
RPCLinkSynchroHistoMaker.h
edm::Handle
Definition: AssociativeIterator.h:50
RPCMonitorLinkSynchro.h
RPCMonitorLinkSynchro::me_topOccup
MonitorElement * me_topOccup
Definition: RPCMonitorLinkSynchro.h:43
RPCMonitorLinkSynchro::me_delaySpread
MonitorElement * me_delaySpread
Definition: RPCMonitorLinkSynchro.h:42
dqm::impl::MonitorElement::getTH2F
virtual TH2F * getTH2F()
Definition: MonitorElement.cc:995
RPCMonitorLinkSynchro::RPCMonitorLinkSynchro
RPCMonitorLinkSynchro(const edm::ParameterSet &cfg)
Definition: RPCMonitorLinkSynchro.cc:12
RPCLinkSynchroHistoMaker::fill
void fill(TH1F *hDelay, TH2F *hDelaySpread, TH2F *hTopOccup, TH2F *hTopSpread) const
Definition: RPCLinkSynchroHistoMaker.cc:18
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
dqm::implementation::NavigatorBase::cd
virtual void cd()
Definition: DQMStore.cc:29
dqm::impl::MonitorElement::getTH1F
virtual TH1F * getTH1F()
Definition: MonitorElement.cc:977
RPCLinkSynchroHistoMaker
Definition: RPCLinkSynchroHistoMaker.h:12
RPCMonitorLinkSynchro::rpcRawSynchroProdItemTag_
edm::EDGetTokenT< RPCRawSynchro::ProdItem > rpcRawSynchroProdItemTag_
Definition: RPCMonitorLinkSynchro.h:48
RPCMonitorLinkSynchro::theCablingWatcher
edm::ESWatcher< RPCEMapRcd > theCablingWatcher
Definition: RPCMonitorLinkSynchro.h:37
edm::ParameterSet
Definition: ParameterSet.h:47
RPCLinkSynchroStat::add
void add(const RPCRawSynchro::ProdItem &counts, std::vector< LinkBoardElectronicIndex > &problems)
Definition: RPCLinkSynchroStat.cc:174
Event.h
RPCMonitorLinkSynchro::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: RPCMonitorLinkSynchro.cc:67
RPCMonitorLinkSynchro::me_notComplete
MonitorElement * me_notComplete[3]
Definition: RPCMonitorLinkSynchro.h:45
RPCMonitorLinkSynchro::rpcEMapToken_
edm::ESGetToken< RPCEMap, RPCEMapRcd > rpcEMapToken_
Definition: RPCMonitorLinkSynchro.h:38
RPCRawSynchro::ProdItem
std::vector< std::pair< LinkBoardElectronicIndex, int > > ProdItem
Definition: RPCRawSynchro.h:9
edm::EventSetup
Definition: EventSetup.h:58
edm::EventSetup::getTransientHandle
ESTransientHandle< T > getTransientHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:166
edm::ESTransientHandle
Definition: ESTransientHandle.h:41
looper.cfg
cfg
Definition: looper.py:296
alignCSCRings.r
r
Definition: alignCSCRings.py:93
RPCMonitorLinkSynchro::theConfig
edm::ParameterSet theConfig
Definition: RPCMonitorLinkSynchro.h:33
dqm::implementation::IBooker::book2D
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:177
ev
bool ev
Definition: Hydjet2Hadronizer.cc:97
edmOneToOneComparison.problems
problems
Definition: edmOneToOneComparison.py:170
RPCLinkSynchroStat
Definition: RPCLinkSynchroStat.h:11
RPCMonitorLinkSynchro::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: RPCMonitorLinkSynchro.cc:37
dqm::implementation::IBooker
Definition: DQMStore.h:43
RPCMonitorLinkSynchro::me_delaySummary
MonitorElement * me_delaySummary
Definition: RPCMonitorLinkSynchro.h:41
edm::Event
Definition: Event.h:73
dqm::impl::MonitorElement::setAxisTitle
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:791
edm::InputTag
Definition: InputTag.h:15
RPCMonitorLinkSynchro::select
virtual const RPCRawSynchro::ProdItem & select(const RPCRawSynchro::ProdItem &v, const edm::Event &, const edm::EventSetup &)
Definition: RPCMonitorLinkSynchro.h:29
RPCMonitorLinkSynchro::dqmBeginRun
void dqmBeginRun(const edm::Run &r, const edm::EventSetup &c) override
Definition: RPCMonitorLinkSynchro.cc:27
dqm::implementation::IBooker::book1D
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98