CMS 3D CMS Logo

RPCMonitorLinkSynchro.cc
Go to the documentation of this file.
1 #include <memory>
2 
5 
7 
12 
15 
17  : theConfig(cfg),
18  theSynchroStat(RPCLinkSynchroStat(theConfig.getUntrackedParameter<bool>("useFirstHitOnly", false)))
19 
20 {
22  consumes<RPCRawSynchro::ProdItem>(cfg.getParameter<edm::InputTag>("rpcRawSynchroProdItemTag"));
23 }
24 
26 
30 }
31 
33  if (theCablingWatcher.check(es)) {
34  edm::ESTransientHandle<RPCEMap> readoutMapping;
35  es.get<RPCEMapRcd>().get(readoutMapping);
36  std::unique_ptr<RPCReadOutMapping const> cabling{readoutMapping->convert()};
37  edm::LogInfo("RPCMonitorLinkSynchro")
38  << "RPCMonitorLinkSynchro - record has CHANGED!!, read map, VERSION: " << cabling->version();
39  theSynchroStat.init(cabling.get(), theConfig.getUntrackedParameter<bool>("dumpDelays"));
40  }
41 }
42 
44  edm::Run const& iRun,
45  edm::EventSetup const& es) {
46  ibooker.cd();
47  ibooker.setCurrentFolder("RPC/LinkMonitor/");
48 
49  me_delaySummary = ibooker.book1D("delaySummary", "LinkDelaySummary", 8, -3.5, 4.5);
50  me_delaySummary->getTH1F()->SetStats(true);
51 
52  me_delaySpread = ibooker.book2D("delaySpread", "LinkDelaySpread", 71, -3.05, 4.05, 31, -0.05, 3.05);
53  me_delaySpread->getTH2F()->SetStats(false);
54 
55  me_notComplete[0] = ibooker.book2D("notComplete790", "FED790: not All Paths hit", 36, -0.5, 35.5, 18, -0.5, 17.5);
56  me_notComplete[1] = ibooker.book2D("notComplete791", "FED791: not All Paths hit", 36, -0.5, 35.5, 18, -0.5, 17.5);
57  me_notComplete[2] = ibooker.book2D("notComplete792", "FED792: not All Paths hit", 36, -0.5, 35.5, 18, -0.5, 17.5);
58  for (unsigned int i = 0; i < 3; ++i) {
59  me_notComplete[i]->getTH2F()->GetXaxis()->SetNdivisions(512);
60  me_notComplete[i]->getTH2F()->GetYaxis()->SetNdivisions(505);
61  me_notComplete[i]->setAxisTitle("rmb");
62  me_notComplete[i]->getTH2F()->SetYTitle("link");
63  me_notComplete[i]->getTH2F()->SetStats(false);
64  }
65  me_topOccup = ibooker.book2D("topOccup", "Top10 LinkBoard occupancy", 8, -0.5, 7.5, 10, 0., 10.);
66  me_topSpread = ibooker.book2D("topSpread", "Top10 LinkBoard delay spread", 8, -0.5, 7.5, 10, 0., 10.);
67  me_topOccup->getTH2F()->GetXaxis()->SetNdivisions(110);
68  me_topSpread->getTH2F()->GetXaxis()->SetNdivisions(110);
69  me_topOccup->getTH2F()->SetStats(false);
70  me_topSpread->getTH2F()->SetStats(false);
71 }
72 
75  ev.getByToken(rpcRawSynchroProdItemTag_, synchroCounts);
76  std::vector<LinkBoardElectronicIndex> problems;
77  const RPCRawSynchro::ProdItem& vItem = select(*synchroCounts.product(), ev, es);
78  theSynchroStat.add(vItem, problems);
79 
80  for (std::vector<LinkBoardElectronicIndex>::const_iterator it = problems.begin(); it != problems.end(); ++it) {
81  me_notComplete[it->dccId - 790]->Fill(it->dccInputChannelNum, it->tbLinkInputNum);
82  }
83 }
edm::ESWatcher::check
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:52
eostools.ls
def ls(path, rec=False)
Definition: eostools.py:349
electrons_cff.bool
bool
Definition: electrons_cff.py:393
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:43
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:131
RPCMonitorLinkSynchro::me_topSpread
MonitorElement * me_topSpread
Definition: RPCMonitorLinkSynchro.h:48
DQMStore.h
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:27
RPCLinkSynchroHistoMaker.h
edm::Handle
Definition: AssociativeIterator.h:50
RPCMonitorLinkSynchro::~RPCMonitorLinkSynchro
~RPCMonitorLinkSynchro() override
Definition: RPCMonitorLinkSynchro.cc:25
RPCMonitorLinkSynchro.h
RPCMonitorLinkSynchro::me_topOccup
MonitorElement * me_topOccup
Definition: RPCMonitorLinkSynchro.h:47
RPCMonitorLinkSynchro::me_delaySpread
MonitorElement * me_delaySpread
Definition: RPCMonitorLinkSynchro.h:46
dqm::impl::MonitorElement::getTH2F
virtual TH2F * getTH2F()
Definition: MonitorElement.cc:992
edm::EventSetup::get
T get() const
Definition: EventSetup.h:80
RPCMonitorLinkSynchro::RPCMonitorLinkSynchro
RPCMonitorLinkSynchro(const edm::ParameterSet &cfg)
Definition: RPCMonitorLinkSynchro.cc:16
Service.h
RPCLinkSynchroHistoMaker::fill
void fill(TH1F *hDelay, TH2F *hDelaySpread, TH2F *hTopOccup, TH2F *hTopSpread) const
Definition: RPCLinkSynchroHistoMaker.cc:22
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:974
RPCLinkSynchroHistoMaker
Definition: RPCLinkSynchroHistoMaker.h:13
RPCMonitorLinkSynchro::rpcRawSynchroProdItemTag_
edm::EDGetTokenT< RPCRawSynchro::ProdItem > rpcRawSynchroProdItemTag_
Definition: RPCMonitorLinkSynchro.h:52
RPCMonitorLinkSynchro::theCablingWatcher
edm::ESWatcher< RPCEMapRcd > theCablingWatcher
Definition: RPCMonitorLinkSynchro.h:42
edm::ParameterSet
Definition: ParameterSet.h:47
RPCLinkSynchroStat::add
void add(const RPCRawSynchro::ProdItem &counts, std::vector< LinkBoardElectronicIndex > &problems)
Definition: RPCLinkSynchroStat.cc:176
Event.h
RPCMonitorLinkSynchro::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: RPCMonitorLinkSynchro.cc:73
RPCMonitorLinkSynchro::me_notComplete
MonitorElement * me_notComplete[3]
Definition: RPCMonitorLinkSynchro.h:49
RPCRawSynchro::ProdItem
std::vector< std::pair< LinkBoardElectronicIndex, int > > ProdItem
Definition: RPCRawSynchro.h:9
edm::EventSetup
Definition: EventSetup.h:57
get
#define get
RPCEMapRcd
Definition: RPCEMapRcd.h:5
edm::ESTransientHandle
Definition: ESTransientHandle.h:41
looper.cfg
cfg
Definition: looper.py:297
alignCSCRings.r
r
Definition: alignCSCRings.py:93
RPCMonitorLinkSynchro::theConfig
edm::ParameterSet theConfig
Definition: RPCMonitorLinkSynchro.h:38
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:95
edmOneToOneComparison.problems
problems
Definition: edmOneToOneComparison.py:170
RPCLinkSynchroStat
Definition: RPCLinkSynchroStat.h:12
RPCMonitorLinkSynchro::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: RPCMonitorLinkSynchro.cc:43
dqm::implementation::IBooker
Definition: DQMStore.h:43
RPCEMap.h
RPCMonitorLinkSynchro::me_delaySummary
MonitorElement * me_delaySummary
Definition: RPCMonitorLinkSynchro.h:45
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:800
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:34
RPCMonitorLinkSynchro::dqmBeginRun
void dqmBeginRun(const edm::Run &r, const edm::EventSetup &c) override
Definition: RPCMonitorLinkSynchro.cc:32
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