CMS 3D CMS Logo

Public Member Functions | Protected Member Functions | Protected Attributes

RPCMonitorLinkSynchro Class Reference

#include <RPCMonitorLinkSynchro.h>

Inheritance diagram for RPCMonitorLinkSynchro:
edm::EDAnalyzer

List of all members.

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 ()

Protected Member Functions

virtual TObjArray histos () const

Protected Attributes

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

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.

    : theConfig(cfg),
      theSynchroStat(RPCLinkSynchroStat(theConfig.getUntrackedParameter<bool>("useFirstHitOnly", false))) 
{ 
}
RPCMonitorLinkSynchro::~RPCMonitorLinkSynchro ( ) [virtual]

Definition at line 36 of file RPCMonitorLinkSynchro.cc.

{ 
}

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.

{
  edm::Handle<RPCRawSynchro::ProdItem> synchroCounts;
  ev.getByType(synchroCounts);
  std::vector<LinkBoardElectronicIndex> problems;
  const RPCRawSynchro::ProdItem &vItem = select(*synchroCounts.product(), ev,es);
  theSynchroStat.add(vItem, problems);

  for (std::vector<LinkBoardElectronicIndex>::const_iterator it=problems.begin(); it != problems.end(); ++it) {
    me_notComplete[it->dccId-790]->Fill(it->dccInputChannelNum,it->tbLinkInputNum);    
  }
}
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().

{
  DQMStore* dmbe = edm::Service<DQMStore>().operator->();
  dmbe->setCurrentFolder("RPC/LinkMonitor/");

  me_delaySummary = dmbe->book1D("delaySummary","LinkDelaySummary",8,-3.5, 4.5);
  me_delaySummary->getTH1F()->SetStats(111);

  me_delaySpread = dmbe->book2D("delaySpread","LinkDelaySpread",71,-3.05, 4.05, 31,-0.05,3.05);
  me_delaySpread->getTH2F()->SetStats(0);

  me_notComplete[0] = dmbe->book2D("notComplete790","FED790: not All Paths hit",36,-0.5,35.5,18,-0.5,17.5);
  me_notComplete[1] = dmbe->book2D("notComplete791","FED791: not All Paths hit",36,-0.5,35.5,18,-0.5,17.5);
  me_notComplete[2] = dmbe->book2D("notComplete792","FED792: not All Paths hit",36,-0.5,35.5,18,-0.5,17.5);
  for (unsigned int i=0;i<3;++i) {
    me_notComplete[i]->getTH2F()->GetXaxis()->SetNdivisions(512);
    me_notComplete[i]->getTH2F()->GetYaxis()->SetNdivisions(505);
    me_notComplete[i]->getTH2F()->SetXTitle("rmb");
    me_notComplete[i]->getTH2F()->SetYTitle("link");
    me_notComplete[i]->getTH2F()->SetStats(0);
  }
  me_topOccup  = dmbe->book2D("topOccup","Top10 LinkBoard occupancy",8,-0.5,7.5, 10,0.,10.);
  me_topSpread = dmbe->book2D("topSpread","Top10 LinkBoard delay spread",8,-0.5,7.5, 10,0.,10.);
  me_topOccup->getTH2F()->GetXaxis()->SetNdivisions(110);
  me_topSpread->getTH2F()->GetXaxis()->SetNdivisions(110);
  me_topOccup->getTH2F()->SetStats(0);
  me_topSpread->getTH2F()->SetStats(0);

}
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().

{
  if (theCablingWatcher.check(es)) {
    edm::ESTransientHandle<RPCEMap> readoutMapping;
    es.get<RPCEMapRcd>().get(readoutMapping);
    RPCReadOutMapping * cabling = readoutMapping->convert();
    edm::LogInfo("RPCMonitorLinkSynchro") << "RPCMonitorLinkSynchro - record has CHANGED!!, read map, VERSION: " << cabling->version();
    theSynchroStat.init(cabling, theConfig.getUntrackedParameter<bool>("dumpDelays"));
    delete cabling;
  }
}
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.

{
  if (theConfig.getUntrackedParameter<bool>("dumpDelays")) edm::LogInfo("RPCMonitorLinkSynchro DumpDelays") <<  theSynchroStat.dumpDelays();
}
void RPCMonitorLinkSynchro::endLuminosityBlock ( const edm::LuminosityBlock ls,
const edm::EventSetup es 
) [virtual]
TObjArray RPCMonitorLinkSynchro::histos ( ) const [protected, virtual]

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.

{
  TObjArray result;
  result.Add(me_delaySummary->getTH1F());
  result.Add(me_delaySpread->getTH2F());
  result.Add(me_topOccup->getTH2F());
  result.Add(me_topSpread->getTH2F());
  for (unsigned int i=0;i<=2;i++) result.Add(me_notComplete[i]->getTH2F());
  return result;
}
virtual const RPCRawSynchro::ProdItem& RPCMonitorLinkSynchro::select ( const RPCRawSynchro::ProdItem v,
const edm::Event ,
const edm::EventSetup  
) [inline, virtual]

Definition at line 28 of file RPCMonitorLinkSynchro.h.

References v.

Referenced by analyze().

{ return v; };

Member Data Documentation

Definition at line 38 of file RPCMonitorLinkSynchro.h.

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

Definition at line 37 of file RPCMonitorLinkSynchro.h.

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

Definition at line 41 of file RPCMonitorLinkSynchro.h.

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

Definition at line 39 of file RPCMonitorLinkSynchro.h.

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

Definition at line 40 of file RPCMonitorLinkSynchro.h.

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

Definition at line 34 of file RPCMonitorLinkSynchro.h.

Referenced by beginRun().

Definition at line 33 of file RPCMonitorLinkSynchro.h.

Referenced by beginRun(), and endJob().

Definition at line 35 of file RPCMonitorLinkSynchro.h.

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