CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Attributes | Private Attributes
RPCMonitorLinkSynchro Class Reference

#include <RPCMonitorLinkSynchro.h>

Inheritance diagram for RPCMonitorLinkSynchro:
DQMEDAnalyzer edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
void dqmBeginRun (const edm::Run &r, const edm::EventSetup &c)
 
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 ()
 
- Public Member Functions inherited from DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
 DQMEDAnalyzer (void)
 
virtual void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
virtual void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

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::ProdItem
rpcRawSynchroProdItemTag_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T...> CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T...> HasAbility
 
typedef
CacheTypes::LuminosityBlockCache 
LuminosityBlockCache
 
typedef
LuminosityBlockContextT
< LuminosityBlockCache,
RunCache, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr
< dqmDetails::NoCache
globalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr
< dqmDetails::NoCache
globalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

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 15 of file RPCMonitorLinkSynchro.cc.

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

16  : theConfig(cfg),
17  theSynchroStat(RPCLinkSynchroStat(theConfig.getUntrackedParameter<bool>("useFirstHitOnly", false)))
18 
19 {
20 
21  rpcRawSynchroProdItemTag_=consumes<RPCRawSynchro::ProdItem>(cfg.getParameter<edm::InputTag>("rpcRawSynchroProdItemTag"));
22 
23 }
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 ( )
virtual

Definition at line 25 of file RPCMonitorLinkSynchro.cc.

25 { }

Member Function Documentation

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

Implements edm::stream::EDAnalyzerBase.

Definition at line 79 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.

80 {
82  ev.getByToken(rpcRawSynchroProdItemTag_, synchroCounts);
83  std::vector<LinkBoardElectronicIndex> problems;
84  const RPCRawSynchro::ProdItem &vItem = select(*synchroCounts.product(), ev,es);
85  theSynchroStat.add(vItem, problems);
86 
87  for (std::vector<LinkBoardElectronicIndex>::const_iterator it=problems.begin(); it != problems.end(); ++it) {
88  me_notComplete[it->dccId-790]->Fill(it->dccInputChannelNum,it->tbLinkInputNum);
89  }
90 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:449
std::vector< std::pair< LinkBoardElectronicIndex, int > > ProdItem
Definition: RPCRawSynchro.h:9
bool ev
RPCLinkSynchroStat theSynchroStat
virtual const RPCRawSynchro::ProdItem & select(const RPCRawSynchro::ProdItem &v, const edm::Event &, const edm::EventSetup &)
void Fill(long long x)
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:81
void RPCMonitorLinkSynchro::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  iRun,
edm::EventSetup const &  es 
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 47 of file RPCMonitorLinkSynchro.cc.

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

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

Reimplemented from DQMEDAnalyzer.

Definition at line 36 of file RPCMonitorLinkSynchro.cc.

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

36  {
37  if (theCablingWatcher.check(es)) {
38  edm::ESTransientHandle<RPCEMap> readoutMapping;
39  es.get<RPCEMapRcd>().get(readoutMapping);
40  RPCReadOutMapping const* cabling = readoutMapping->convert();
41  edm::LogInfo("RPCMonitorLinkSynchro") << "RPCMonitorLinkSynchro - record has CHANGED!!, read map, VERSION: " << cabling->version();
42  theSynchroStat.init(cabling, theConfig.getUntrackedParameter<bool>("dumpDelays"));
43  delete cabling;
44  }
45 }
T getUntrackedParameter(std::string const &, T const &) const
void init(const RPCReadOutMapping *theCabling, bool addChamberInfo)
RPCLinkSynchroStat theSynchroStat
edm::ESWatcher< RPCEMapRcd > theCablingWatcher
const std::string & version() const
version as string
edm::ParameterSet theConfig
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:57
void RPCMonitorLinkSynchro::endLuminosityBlock ( const edm::LuminosityBlock ls,
const edm::EventSetup es 
)
virtual
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 40 of file RPCMonitorLinkSynchro.h.

Referenced by bookHistograms(), and endLuminosityBlock().

MonitorElement* RPCMonitorLinkSynchro::me_delaySummary
protected

Definition at line 39 of file RPCMonitorLinkSynchro.h.

Referenced by bookHistograms(), and endLuminosityBlock().

MonitorElement* RPCMonitorLinkSynchro::me_notComplete[3]
protected

Definition at line 43 of file RPCMonitorLinkSynchro.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* RPCMonitorLinkSynchro::me_topOccup
protected

Definition at line 41 of file RPCMonitorLinkSynchro.h.

Referenced by bookHistograms(), and endLuminosityBlock().

MonitorElement* RPCMonitorLinkSynchro::me_topSpread
protected

Definition at line 42 of file RPCMonitorLinkSynchro.h.

Referenced by bookHistograms(), and endLuminosityBlock().

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

Definition at line 46 of file RPCMonitorLinkSynchro.h.

Referenced by analyze(), and RPCMonitorLinkSynchro().

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

Definition at line 36 of file RPCMonitorLinkSynchro.h.

Referenced by dqmBeginRun().

edm::ParameterSet RPCMonitorLinkSynchro::theConfig
protected

Definition at line 32 of file RPCMonitorLinkSynchro.h.

Referenced by dqmBeginRun().

RPCLinkSynchroStat RPCMonitorLinkSynchro::theSynchroStat
protected

Definition at line 37 of file RPCMonitorLinkSynchro.h.

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