#include <RPCFEDIntegrity.h>
Public Member Functions | |
void | analyze (const edm::Event &iEvent, const edm::EventSetup &c) |
Analyze. | |
void | beginJob () |
BeginJob. | |
void | beginLuminosityBlock (edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &context) |
Begin Lumi block. | |
void | beginRun (const edm::Run &r, const edm::EventSetup &c) |
void | endJob () |
void | endLuminosityBlock (edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &c) |
End Lumi Block. | |
void | endRun (const edm::Run &r, const edm::EventSetup &c) |
RPCFEDIntegrity (const edm::ParameterSet &ps) | |
Constructor. | |
virtual | ~RPCFEDIntegrity () |
Destructor. | |
Private Types | |
enum | fedHisto { Entries, Fatal, NonFatal } |
Private Member Functions | |
void | bookFEDMe (void) |
void | labelBins (MonitorElement *myMe) |
void | reset (void) |
Private Attributes | |
DQMStore * | dbe_ |
int | FATAL_LIMIT |
MonitorElement * | fedMe_ [3] |
std::vector< std::string > | histoName_ |
bool | init_ |
int | maxFEDNum_ |
bool | merge_ |
int | minFEDNum_ |
int | numOfFED_ |
std::string | prefixDir_ |
edm::InputTag | rawCountsLabel_ |
Definition at line 16 of file RPCFEDIntegrity.h.
enum RPCFEDIntegrity::fedHisto [private] |
Definition at line 60 of file RPCFEDIntegrity.h.
RPCFEDIntegrity::RPCFEDIntegrity | ( | const edm::ParameterSet & | ps | ) |
Constructor.
Definition at line 21 of file RPCFEDIntegrity.cc.
References FATAL_LIMIT, edm::ParameterSet::getUntrackedParameter(), init_, maxFEDNum_, merge_, minFEDNum_, numOfFED_, prefixDir_, and rawCountsLabel_.
{ edm::LogVerbatim ("rpcfedintegrity") << "[RPCFEDIntegrity]: Constructor"; rawCountsLabel_ = ps.getUntrackedParameter<edm::InputTag>("RPCRawCountsInputTag"); prefixDir_ = ps.getUntrackedParameter<std::string>("RPCPrefixDir", "RPC/FEDIntegrity"); merge_ = ps.getUntrackedParameter<bool>("MergeRuns", false); minFEDNum_ = ps.getUntrackedParameter<int>("MinimumFEDID", 790); maxFEDNum_ = ps.getUntrackedParameter<int>("MaximumFEDID", 792); init_ = false; numOfFED_= maxFEDNum_ - minFEDNum_ + 1; FATAL_LIMIT = 5; }
RPCFEDIntegrity::~RPCFEDIntegrity | ( | ) | [virtual] |
Destructor.
Definition at line 35 of file RPCFEDIntegrity.cc.
{ edm::LogVerbatim ("rpcfedintegrity") << "[RPCFEDIntegrity]: Destructor "; // dbe_=0; }
void RPCFEDIntegrity::analyze | ( | const edm::Event & | iEvent, |
const edm::EventSetup & | c | ||
) | [virtual] |
Analyze.
Implements edm::EDAnalyzer.
Definition at line 55 of file RPCFEDIntegrity.cc.
References Entries, Fatal, RPCRawDataCounts::fedBxRecords(), RPCRawDataCounts::fedErrorRecords(), RPCRawDataCounts::fedFormatErrors(), fedMe_, HcalObjRepresent::Fill(), edm::Event::getByLabel(), edm::HandleBase::isValid(), maxFEDNum_, minFEDNum_, NonFatal, edm::Handle< T >::product(), and rawCountsLabel_.
{ //get hold of raw data counts edm::Handle<RPCRawDataCounts> rawCounts; iEvent.getByLabel (rawCountsLabel_, rawCounts); if(!rawCounts.isValid()) return; const RPCRawDataCounts & counts = *rawCounts.product(); for (int fed=minFEDNum_; fed <=maxFEDNum_; ++fed) { if (counts.fedBxRecords(fed) ) fedMe_[Entries]->Fill(fed); if (counts.fedFormatErrors(fed)) fedMe_[Fatal]->Fill(fed); if (counts.fedErrorRecords(fed)) fedMe_[NonFatal]->Fill(fed); } }
void RPCFEDIntegrity::beginJob | ( | void | ) | [virtual] |
BeginJob.
Reimplemented from edm::EDAnalyzer.
Definition at line 40 of file RPCFEDIntegrity.cc.
References dbe_, and cppFunctionSkipper::operator.
{ edm::LogVerbatim ("rpcfedintegrity") << "[RPCFEDIntegrity]: Begin job "; dbe_ = edm::Service<DQMStore>().operator->(); }
void RPCFEDIntegrity::beginLuminosityBlock | ( | edm::LuminosityBlock const & | lumiSeg, |
edm::EventSetup const & | context | ||
) | [virtual] |
Begin Lumi block.
Reimplemented from edm::EDAnalyzer.
Definition at line 53 of file RPCFEDIntegrity.cc.
{}
void RPCFEDIntegrity::beginRun | ( | const edm::Run & | r, |
const edm::EventSetup & | c | ||
) | [virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 45 of file RPCFEDIntegrity.cc.
References bookFEDMe(), init_, merge_, and reset().
{ edm::LogVerbatim ("rpcfedintegrity") << "[RPCFEDIntegrity]: Begin run "; if (!init_) this->bookFEDMe(); else if (!merge_) this->reset(); }
void RPCFEDIntegrity::bookFEDMe | ( | void | ) | [private] |
Definition at line 81 of file RPCFEDIntegrity.cc.
References DQMStore::book1D(), dbe_, Entries, Fatal, fedMe_, init_, labelBins(), maxFEDNum_, minFEDNum_, NonFatal, numOfFED_, prefixDir_, and DQMStore::setCurrentFolder().
Referenced by beginRun().
{ if(dbe_){ dbe_->setCurrentFolder(prefixDir_); fedMe_[Entries] = dbe_->book1D("FEDEntries","FED Entries",numOfFED_, minFEDNum_, maxFEDNum_ +1); this->labelBins(fedMe_[Entries]); fedMe_[Fatal] = dbe_->book1D("FEDFatal","FED Fatal Errors",numOfFED_, minFEDNum_, maxFEDNum_ +1); this->labelBins(fedMe_[Fatal]); fedMe_[NonFatal] = dbe_->book1D("FEDNonFatal","FED NON Fatal Errors",numOfFED_, minFEDNum_, maxFEDNum_ +1); this->labelBins(fedMe_[NonFatal]); } init_ = true; }
void RPCFEDIntegrity::endJob | ( | void | ) | [virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 76 of file RPCFEDIntegrity.cc.
References dbe_.
{ dbe_=0; }
void RPCFEDIntegrity::endLuminosityBlock | ( | edm::LuminosityBlock const & | lumiSeg, |
edm::EventSetup const & | c | ||
) | [virtual] |
End Lumi Block.
Reimplemented from edm::EDAnalyzer.
Definition at line 72 of file RPCFEDIntegrity.cc.
{}
void RPCFEDIntegrity::endRun | ( | const edm::Run & | r, |
const edm::EventSetup & | c | ||
) | [virtual] |
void RPCFEDIntegrity::labelBins | ( | MonitorElement * | myMe | ) | [private] |
Definition at line 97 of file RPCFEDIntegrity.cc.
References MonitorElement::getNbinsX(), i, minFEDNum_, numOfFED_, MonitorElement::setBinLabel(), and fw3dlego::xbins.
Referenced by bookFEDMe().
{ int xbins = myMe->getNbinsX(); if (xbins!= numOfFED_ ) return; std::stringstream xLabel; for (int i = 0; i<xbins; i++){ xLabel.str(""); int fedNum = minFEDNum_ + i; xLabel<<fedNum; myMe->setBinLabel(i+1, xLabel.str(),1); } }
void RPCFEDIntegrity::reset | ( | void | ) | [private] |
Definition at line 113 of file RPCFEDIntegrity.cc.
References dbe_, DQMStore::get(), histoName_, i, prefixDir_, and MonitorElement::Reset().
Referenced by beginRun().
{ MonitorElement * me; if(dbe_){ for(unsigned int i = 0; i<histoName_.size(); i++){ me = 0; me = dbe_->get(prefixDir_ + histoName_[i]); if(0!=me ) me->Reset(); } } }
DQMStore* RPCFEDIntegrity::dbe_ [private] |
Definition at line 56 of file RPCFEDIntegrity.h.
Referenced by beginJob(), bookFEDMe(), endJob(), and reset().
int RPCFEDIntegrity::FATAL_LIMIT [private] |
Definition at line 58 of file RPCFEDIntegrity.h.
Referenced by RPCFEDIntegrity().
MonitorElement* RPCFEDIntegrity::fedMe_[3] [private] |
Definition at line 62 of file RPCFEDIntegrity.h.
Referenced by analyze(), and bookFEDMe().
std::vector<std::string> RPCFEDIntegrity::histoName_ [private] |
Definition at line 65 of file RPCFEDIntegrity.h.
Referenced by reset().
bool RPCFEDIntegrity::init_ [private] |
Definition at line 54 of file RPCFEDIntegrity.h.
Referenced by beginRun(), bookFEDMe(), and RPCFEDIntegrity().
int RPCFEDIntegrity::maxFEDNum_ [private] |
Definition at line 64 of file RPCFEDIntegrity.h.
Referenced by analyze(), bookFEDMe(), and RPCFEDIntegrity().
bool RPCFEDIntegrity::merge_ [private] |
Definition at line 54 of file RPCFEDIntegrity.h.
Referenced by beginRun(), and RPCFEDIntegrity().
int RPCFEDIntegrity::minFEDNum_ [private] |
Definition at line 64 of file RPCFEDIntegrity.h.
Referenced by analyze(), bookFEDMe(), labelBins(), and RPCFEDIntegrity().
int RPCFEDIntegrity::numOfFED_ [private] |
Definition at line 64 of file RPCFEDIntegrity.h.
Referenced by bookFEDMe(), labelBins(), and RPCFEDIntegrity().
std::string RPCFEDIntegrity::prefixDir_ [private] |
Definition at line 52 of file RPCFEDIntegrity.h.
Referenced by bookFEDMe(), reset(), and RPCFEDIntegrity().
Definition at line 48 of file RPCFEDIntegrity.h.
Referenced by analyze(), and RPCFEDIntegrity().