#include <RPCDcsInfo.h>
Public Member Functions | |
RPCDcsInfo (const edm::ParameterSet &ps) | |
Constructor. | |
virtual | ~RPCDcsInfo () |
Destructor. | |
Protected Member Functions | |
void | analyze (const edm::Event &e, const edm::EventSetup &c) |
Analyze. | |
void | beginRun (const edm::Run &r, const edm::EventSetup &c) |
void | endLuminosityBlock (const edm::LuminosityBlock &l, const edm::EventSetup &c) |
Private Member Functions | |
void | makeDcsInfo (const edm::Event &e) |
Private Attributes | |
DQMStore * | dbe_ |
bool | dcs |
MonitorElement * | DCSbyLS_ |
std::string | dcsinfofolder_ |
edm::ParameterSet | parameters_ |
std::string | scalersRawToDigiLabel_ |
std::string | subsystemname_ |
Definition at line 14 of file RPCDcsInfo.h.
RPCDcsInfo::RPCDcsInfo | ( | const edm::ParameterSet & | ps | ) |
Constructor.
Definition at line 8 of file RPCDcsInfo.cc.
References dbe_, dcs, dcsinfofolder_, edm::ParameterSet::getUntrackedParameter(), cmsCodeRules::cppFunctionSkipper::operator, scalersRawToDigiLabel_, and subsystemname_.
{ dbe_ = edm::Service<DQMStore>().operator->(); subsystemname_ = ps.getUntrackedParameter<std::string>("subSystemFolder", "RPC") ; dcsinfofolder_ = ps.getUntrackedParameter<std::string>("dcsInfoFolder", "DCSInfo") ; scalersRawToDigiLabel_ = ps.getUntrackedParameter<std::string>("ScalersRawToDigiLabel", "scalersRawToDigi"); // initialize dcs = true; }
RPCDcsInfo::~RPCDcsInfo | ( | ) | [virtual] |
void RPCDcsInfo::analyze | ( | const edm::Event & | e, |
const edm::EventSetup & | c | ||
) | [protected, virtual] |
Analyze.
Implements edm::EDAnalyzer.
Definition at line 34 of file RPCDcsInfo.cc.
References makeDcsInfo().
{ makeDcsInfo(e); return; }
void RPCDcsInfo::beginRun | ( | const edm::Run & | r, |
const edm::EventSetup & | c | ||
) | [protected, virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 22 of file RPCDcsInfo.cc.
References DQMStore::book1D(), DQMStore::cd(), dbe_, dcs, DCSbyLS_, dcsinfofolder_, DQMStore::setCurrentFolder(), MonitorElement::setLumiFlag(), and subsystemname_.
{ dbe_->cd(); dbe_->setCurrentFolder(subsystemname_ + "/" + dcsinfofolder_); DCSbyLS_=dbe_->book1D("DCSbyLS","DCS",1,0.5,1.5); DCSbyLS_->setLumiFlag(); // initialize dcs=true; }
void RPCDcsInfo::endLuminosityBlock | ( | const edm::LuminosityBlock & | l, |
const edm::EventSetup & | c | ||
) | [protected, virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 40 of file RPCDcsInfo.cc.
References dcs, DCSbyLS_, and MonitorElement::setBinContent().
{ // int nlumi = l.id().luminosityBlock(); // fill dcs vs lumi /* set those bins 0 for which bits are ON needed for merge off lumi histograms across files */ if (dcs) DCSbyLS_->setBinContent(1,0.); else DCSbyLS_->setBinContent(1,1.); dcs = true; return; }
void RPCDcsInfo::makeDcsInfo | ( | const edm::Event & | e | ) | [private] |
Definition at line 56 of file RPCDcsInfo.cc.
References dcs, edm::Event::getByLabel(), edm::HandleBase::isValid(), and DcsStatus::RPC.
Referenced by analyze().
{ edm::Handle<DcsStatusCollection> dcsStatus; if ( ! e.getByLabel("scalersRawToDigi", dcsStatus) ){ dcs = false; return; } if ( ! dcsStatus.isValid() ) { edm::LogWarning("RPCDcsInfo") << "scalersRawToDigi not found" ; dcs = false; // info not available: set to false return; } for (DcsStatusCollection::const_iterator dcsStatusItr = dcsStatus->begin(); dcsStatusItr != dcsStatus->end(); ++dcsStatusItr) { if (!dcsStatusItr->ready(DcsStatus::RPC)) dcs=false; } return ; }
DQMStore* RPCDcsInfo::dbe_ [private] |
Definition at line 35 of file RPCDcsInfo.h.
Referenced by beginRun(), and RPCDcsInfo().
bool RPCDcsInfo::dcs [private] |
Definition at line 41 of file RPCDcsInfo.h.
Referenced by beginRun(), endLuminosityBlock(), makeDcsInfo(), and RPCDcsInfo().
MonitorElement* RPCDcsInfo::DCSbyLS_ [private] |
Definition at line 43 of file RPCDcsInfo.h.
Referenced by beginRun(), and endLuminosityBlock().
std::string RPCDcsInfo::dcsinfofolder_ [private] |
Definition at line 39 of file RPCDcsInfo.h.
Referenced by beginRun(), and RPCDcsInfo().
edm::ParameterSet RPCDcsInfo::parameters_ [private] |
Definition at line 37 of file RPCDcsInfo.h.
std::string RPCDcsInfo::scalersRawToDigiLabel_ [private] |
Definition at line 36 of file RPCDcsInfo.h.
Referenced by RPCDcsInfo().
std::string RPCDcsInfo::subsystemname_ [private] |
Definition at line 38 of file RPCDcsInfo.h.
Referenced by beginRun(), and RPCDcsInfo().