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 Member Functions | Protected Attributes
RPCMonitorLinkSynchro Class Reference

#include <RPCMonitorLinkSynchro.h>

Inheritance diagram for RPCMonitorLinkSynchro:
edm::EDAnalyzer

Public Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
virtual void beginJob ()
 
virtual void beginRun (const edm::Run &, const edm::EventSetup &)
 
virtual void endJob ()
 
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 edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

Protected Member Functions

virtual TObjArray histos () const
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

Protected Attributes

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

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 

Detailed Description

Monitor and anlyse synchro counts () produced by R2D.

Definition at line 20 of file RPCMonitorLinkSynchro.h.

Constructor & Destructor Documentation

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

Definition at line 30 of file RPCMonitorLinkSynchro.cc.

31  : theConfig(cfg),
32  theSynchroStat(RPCLinkSynchroStat(theConfig.getUntrackedParameter<bool>("useFirstHitOnly", false)))
33 {
34 }
T getUntrackedParameter(std::string const &, T const &) const
RPCLinkSynchroStat theSynchroStat
edm::ParameterSet theConfig
RPCMonitorLinkSynchro::~RPCMonitorLinkSynchro ( )
virtual

Definition at line 36 of file RPCMonitorLinkSynchro.cc.

37 {
38 }

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 106 of file RPCMonitorLinkSynchro.cc.

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

107 {
109  ev.getByType(synchroCounts);
110  std::vector<LinkBoardElectronicIndex> problems;
111  const RPCRawSynchro::ProdItem &vItem = select(*synchroCounts.product(), ev,es);
112  theSynchroStat.add(vItem, problems);
113 
114  for (std::vector<LinkBoardElectronicIndex>::const_iterator it=problems.begin(); it != problems.end(); ++it) {
115  me_notComplete[it->dccId-790]->Fill(it->dccInputChannelNum,it->tbLinkInputNum);
116  }
117 }
std::vector< std::pair< LinkBoardElectronicIndex, int > > ProdItem
Definition: RPCRawSynchro.h:9
bool getByType(Handle< PROD > &result) const
Definition: Event.h:403
RPCLinkSynchroStat theSynchroStat
virtual const RPCRawSynchro::ProdItem & select(const RPCRawSynchro::ProdItem &v, const edm::Event &, const edm::EventSetup &)
void Fill(long long x)
MonitorElement * me_notComplete[3]
void add(const RPCRawSynchro::ProdItem &counts, std::vector< LinkBoardElectronicIndex > &problems)
T const * product() const
Definition: Handle.h:74
void RPCMonitorLinkSynchro::beginJob ( void  )
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 59 of file RPCMonitorLinkSynchro.cc.

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

60 {
62  dmbe->setCurrentFolder("RPC/LinkMonitor/");
63 
64  me_delaySummary = dmbe->book1D("delaySummary","LinkDelaySummary",8,-3.5, 4.5);
65  me_delaySummary->getTH1F()->SetStats(111);
66 
67  me_delaySpread = dmbe->book2D("delaySpread","LinkDelaySpread",71,-3.05, 4.05, 31,-0.05,3.05);
68  me_delaySpread->getTH2F()->SetStats(0);
69 
70  me_notComplete[0] = dmbe->book2D("notComplete790","FED790: not All Paths hit",36,-0.5,35.5,18,-0.5,17.5);
71  me_notComplete[1] = dmbe->book2D("notComplete791","FED791: not All Paths hit",36,-0.5,35.5,18,-0.5,17.5);
72  me_notComplete[2] = dmbe->book2D("notComplete792","FED792: not All Paths hit",36,-0.5,35.5,18,-0.5,17.5);
73  for (unsigned int i=0;i<3;++i) {
74  me_notComplete[i]->getTH2F()->GetXaxis()->SetNdivisions(512);
75  me_notComplete[i]->getTH2F()->GetYaxis()->SetNdivisions(505);
76  me_notComplete[i]->getTH2F()->SetXTitle("rmb");
77  me_notComplete[i]->getTH2F()->SetYTitle("link");
78  me_notComplete[i]->getTH2F()->SetStats(0);
79  }
80  me_topOccup = dmbe->book2D("topOccup","Top10 LinkBoard occupancy",8,-0.5,7.5, 10,0.,10.);
81  me_topSpread = dmbe->book2D("topSpread","Top10 LinkBoard delay spread",8,-0.5,7.5, 10,0.,10.);
82  me_topOccup->getTH2F()->GetXaxis()->SetNdivisions(110);
83  me_topSpread->getTH2F()->GetXaxis()->SetNdivisions(110);
84  me_topOccup->getTH2F()->SetStats(0);
85  me_topSpread->getTH2F()->SetStats(0);
86 
87 }
int i
Definition: DBlmapReader.cc:9
MonitorElement * me_topOccup
MonitorElement * me_topSpread
MonitorElement * me_delaySpread
MonitorElement * me_notComplete[3]
TH1F * getTH1F(void) const
TH2F * getTH2F(void) const
MonitorElement * me_delaySummary
void RPCMonitorLinkSynchro::beginRun ( const edm::Run ,
const edm::EventSetup es 
)
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 40 of file RPCMonitorLinkSynchro.cc.

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

41 {
42  if (theCablingWatcher.check(es)) {
43  edm::ESTransientHandle<RPCEMap> readoutMapping;
44  es.get<RPCEMapRcd>().get(readoutMapping);
45  RPCReadOutMapping * cabling = readoutMapping->convert();
46  edm::LogInfo("RPCMonitorLinkSynchro") << "RPCMonitorLinkSynchro - record has CHANGED!!, read map, VERSION: " << cabling->version();
47  theSynchroStat.init(cabling, theConfig.getUntrackedParameter<bool>("dumpDelays"));
48  delete cabling;
49  }
50 }
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
const T & get() const
Definition: EventSetup.h:55
edm::ParameterSet theConfig
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:59
void RPCMonitorLinkSynchro::endJob ( void  )
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 101 of file RPCMonitorLinkSynchro.cc.

References RPCLinkSynchroStat::dumpDelays(), edm::ParameterSet::getUntrackedParameter(), theConfig, and theSynchroStat.

102 {
103  if (theConfig.getUntrackedParameter<bool>("dumpDelays")) edm::LogInfo("RPCMonitorLinkSynchro DumpDelays") << theSynchroStat.dumpDelays();
104 }
T getUntrackedParameter(std::string const &, T const &) const
RPCLinkSynchroStat theSynchroStat
edm::ParameterSet theConfig
void RPCMonitorLinkSynchro::endLuminosityBlock ( const edm::LuminosityBlock ls,
const edm::EventSetup es 
)
virtual
TObjArray RPCMonitorLinkSynchro::histos ( ) const
protectedvirtual

Definition at line 89 of file RPCMonitorLinkSynchro.cc.

References MonitorElement::getTH1F(), MonitorElement::getTH2F(), i, me_delaySpread, me_delaySummary, me_notComplete, me_topOccup, me_topSpread, and query::result.

90 {
91  TObjArray result;
92  result.Add(me_delaySummary->getTH1F());
93  result.Add(me_delaySpread->getTH2F());
94  result.Add(me_topOccup->getTH2F());
95  result.Add(me_topSpread->getTH2F());
96  for (unsigned int i=0;i<=2;i++) result.Add(me_notComplete[i]->getTH2F());
97  return result;
98 }
int i
Definition: DBlmapReader.cc:9
MonitorElement * me_topOccup
MonitorElement * me_topSpread
MonitorElement * me_delaySpread
tuple result
Definition: query.py:137
MonitorElement * me_notComplete[3]
TH1F * getTH1F(void) const
TH2F * getTH2F(void) const
MonitorElement * me_delaySummary
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 38 of file RPCMonitorLinkSynchro.h.

Referenced by beginJob(), endLuminosityBlock(), and histos().

MonitorElement* RPCMonitorLinkSynchro::me_delaySummary
protected

Definition at line 37 of file RPCMonitorLinkSynchro.h.

Referenced by beginJob(), endLuminosityBlock(), and histos().

MonitorElement* RPCMonitorLinkSynchro::me_notComplete[3]
protected

Definition at line 41 of file RPCMonitorLinkSynchro.h.

Referenced by analyze(), beginJob(), and histos().

MonitorElement* RPCMonitorLinkSynchro::me_topOccup
protected

Definition at line 39 of file RPCMonitorLinkSynchro.h.

Referenced by beginJob(), endLuminosityBlock(), and histos().

MonitorElement* RPCMonitorLinkSynchro::me_topSpread
protected

Definition at line 40 of file RPCMonitorLinkSynchro.h.

Referenced by beginJob(), endLuminosityBlock(), and histos().

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

Definition at line 34 of file RPCMonitorLinkSynchro.h.

Referenced by beginRun().

edm::ParameterSet RPCMonitorLinkSynchro::theConfig
protected

Definition at line 33 of file RPCMonitorLinkSynchro.h.

Referenced by beginRun(), and endJob().

RPCLinkSynchroStat RPCMonitorLinkSynchro::theSynchroStat
protected

Definition at line 35 of file RPCMonitorLinkSynchro.h.

Referenced by analyze(), beginRun(), endJob(), and endLuminosityBlock().