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:
DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks > edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::Accumulator, Args... > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

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 DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >
void accumulate (edm::Event const &event, edm::EventSetup const &setup) override
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
 DQMOneEDAnalyzer ()
 
void endRun (edm::Run const &, edm::EventSetup const &) final
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::Accumulator, Args... >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Attributes

MonitorElementme_delaySpread
 
MonitorElementme_delaySummary
 
MonitorElementme_notComplete [3]
 
MonitorElementme_topOccup
 
MonitorElementme_topSpread
 
edm::ESWatcher< RPCEMapRcdtheCablingWatcher
 
edm::ParameterSet theConfig
 
RPCLinkSynchroStat theSynchroStat
 
- Protected Attributes inherited from DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >
edm::EDPutTokenT< DQMTokenrunToken_
 

Private Attributes

edm::EDGetTokenT< RPCRawSynchro::ProdItemrpcRawSynchroProdItemTag_
 

Additional Inherited Members

- Public Types inherited from DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >
virtual void dqmEndRun (edm::Run const &, edm::EventSetup const &)
 
- Protected Member Functions inherited from edm::ProducerBase
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 declare what type of product will make and with which optional label More...
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

Monitor and anlyse synchro counts () produced by R2D.

Definition at line 24 of file RPCMonitorLinkSynchro.h.

Constructor & Destructor Documentation

◆ RPCMonitorLinkSynchro()

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

Definition at line 16 of file RPCMonitorLinkSynchro.cc.

17  : theConfig(cfg),
18  theSynchroStat(RPCLinkSynchroStat(theConfig.getUntrackedParameter<bool>("useFirstHitOnly", false)))
19 
20 {
22  consumes<RPCRawSynchro::ProdItem>(cfg.getParameter<edm::InputTag>("rpcRawSynchroProdItemTag"));
23 }

References looper::cfg, and rpcRawSynchroProdItemTag_.

◆ ~RPCMonitorLinkSynchro()

RPCMonitorLinkSynchro::~RPCMonitorLinkSynchro ( )
override

Definition at line 25 of file RPCMonitorLinkSynchro.cc.

25 {}

Member Function Documentation

◆ analyze()

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

Reimplemented from DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >.

Definition at line 73 of file RPCMonitorLinkSynchro.cc.

73  {
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 }

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

◆ beginLuminosityBlock()

void RPCMonitorLinkSynchro::beginLuminosityBlock ( const edm::LuminosityBlock ,
const edm::EventSetup  
)
inlinefinal

Definition at line 31 of file RPCMonitorLinkSynchro.h.

31 {}

◆ bookHistograms()

void RPCMonitorLinkSynchro::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  iRun,
edm::EventSetup const &  es 
)
overridevirtual

Implements DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >.

Definition at line 43 of file RPCMonitorLinkSynchro.cc.

45  {
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 }

References dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book2D(), dqm::implementation::NavigatorBase::cd(), dqm::impl::MonitorElement::getTH1F(), dqm::impl::MonitorElement::getTH2F(), mps_fire::i, me_delaySpread, me_delaySummary, me_notComplete, me_topOccup, me_topSpread, dqm::impl::MonitorElement::setAxisTitle(), and dqm::implementation::NavigatorBase::setCurrentFolder().

◆ dqmBeginRun()

void RPCMonitorLinkSynchro::dqmBeginRun ( const edm::Run r,
const edm::EventSetup c 
)
overridevirtual

Reimplemented from DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >.

Definition at line 32 of file RPCMonitorLinkSynchro.cc.

32  {
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 }

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

◆ endLuminosityBlock()

void RPCMonitorLinkSynchro::endLuminosityBlock ( const edm::LuminosityBlock ls,
const edm::EventSetup es 
)
override

◆ select()

virtual const RPCRawSynchro::ProdItem& RPCMonitorLinkSynchro::select ( const RPCRawSynchro::ProdItem v,
const edm::Event ,
const edm::EventSetup  
)
inlinevirtual

Definition at line 34 of file RPCMonitorLinkSynchro.h.

36  {
37  return v;
38  };

References findQualityFiles::v.

Referenced by analyze().

Member Data Documentation

◆ me_delaySpread

MonitorElement* RPCMonitorLinkSynchro::me_delaySpread
protected

Definition at line 46 of file RPCMonitorLinkSynchro.h.

Referenced by bookHistograms(), and endLuminosityBlock().

◆ me_delaySummary

MonitorElement* RPCMonitorLinkSynchro::me_delaySummary
protected

Definition at line 45 of file RPCMonitorLinkSynchro.h.

Referenced by bookHistograms(), and endLuminosityBlock().

◆ me_notComplete

MonitorElement* RPCMonitorLinkSynchro::me_notComplete[3]
protected

Definition at line 49 of file RPCMonitorLinkSynchro.h.

Referenced by analyze(), and bookHistograms().

◆ me_topOccup

MonitorElement* RPCMonitorLinkSynchro::me_topOccup
protected

Definition at line 47 of file RPCMonitorLinkSynchro.h.

Referenced by bookHistograms(), and endLuminosityBlock().

◆ me_topSpread

MonitorElement* RPCMonitorLinkSynchro::me_topSpread
protected

Definition at line 48 of file RPCMonitorLinkSynchro.h.

Referenced by bookHistograms(), and endLuminosityBlock().

◆ rpcRawSynchroProdItemTag_

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

Definition at line 52 of file RPCMonitorLinkSynchro.h.

Referenced by analyze(), and RPCMonitorLinkSynchro().

◆ theCablingWatcher

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

Definition at line 42 of file RPCMonitorLinkSynchro.h.

Referenced by dqmBeginRun().

◆ theConfig

edm::ParameterSet RPCMonitorLinkSynchro::theConfig
protected

Definition at line 38 of file RPCMonitorLinkSynchro.h.

Referenced by dqmBeginRun().

◆ theSynchroStat

RPCLinkSynchroStat RPCMonitorLinkSynchro::theSynchroStat
protected

Definition at line 43 of file RPCMonitorLinkSynchro.h.

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

edm::ESWatcher::check
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:52
mps_fire.i
i
Definition: mps_fire.py:428
edm::Handle::product
T const * product() const
Definition: Handle.h:70
RPCMonitorLinkSynchro::theSynchroStat
RPCLinkSynchroStat theSynchroStat
Definition: RPCMonitorLinkSynchro.h:43
RPCEMap::convert
RPCReadOutMapping const * convert() const
Definition: RPCEMap.h:64
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
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
findQualityFiles.v
v
Definition: findQualityFiles.py:179
edm::Handle
Definition: AssociativeIterator.h:50
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
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
RPCLinkSynchroStat::add
void add(const RPCRawSynchro::ProdItem &counts, std::vector< LinkBoardElectronicIndex > &problems)
Definition: RPCLinkSynchroStat.cc:176
RPCMonitorLinkSynchro::me_notComplete
MonitorElement * me_notComplete[3]
Definition: RPCMonitorLinkSynchro.h:49
RPCRawSynchro::ProdItem
std::vector< std::pair< LinkBoardElectronicIndex, int > > ProdItem
Definition: RPCRawSynchro.h:9
get
#define get
RPCEMapRcd
Definition: RPCEMapRcd.h:5
edm::ESTransientHandle
Definition: ESTransientHandle.h:41
looper.cfg
cfg
Definition: looper.py:297
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::me_delaySummary
MonitorElement * me_delaySummary
Definition: RPCMonitorLinkSynchro.h:45
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
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