CMS 3D CMS Logo

List of all members | Public Member Functions | Private Types | Private Member Functions | Private Attributes
RPCFEDIntegrity Class Reference

#include <RPCFEDIntegrity.h>

Inheritance diagram for RPCFEDIntegrity:
DQMEDAnalyzer edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

Public Member Functions

void analyze (const edm::Event &iEvent, const edm::EventSetup &c) override
 Analyze. More...
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 Begin Lumi block. More...
 
 RPCFEDIntegrity (const edm::ParameterSet &ps)
 Constructor. More...
 
 ~RPCFEDIntegrity () override
 Destructor. More...
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Private Types

enum  fedHisto { Entries, Fatal, NonFatal }
 

Private Member Functions

void bookFEDMe (DQMStore::IBooker &)
 
void labelBins (MonitorElement *myMe)
 

Private Attributes

int FATAL_LIMIT
 
MonitorElementfedMe_ [3]
 
std::vector< std::string > histoName_
 
bool init_
 
int maxFEDNum_
 
bool merge_
 
int minFEDNum_
 
int numOfFED_
 
std::string prefixDir_
 
edm::EDGetTokenT< RPCRawDataCountsrawCountsLabel_
 

Additional Inherited Members

- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static void globalEndJob (DQMEDAnalyzerGlobalCache const *)
 
static void globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context)
 
static void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context)
 
static std::unique_ptr< DQMEDAnalyzerGlobalCacheinitializeGlobalCache (edm::ParameterSet const &)
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Definition at line 19 of file RPCFEDIntegrity.h.

Member Enumeration Documentation

◆ fedHisto

Enumerator
Entries 
Fatal 
NonFatal 

Definition at line 44 of file RPCFEDIntegrity.h.

44 { Entries, Fatal, NonFatal };

Constructor & Destructor Documentation

◆ RPCFEDIntegrity()

RPCFEDIntegrity::RPCFEDIntegrity ( const edm::ParameterSet ps)

Constructor.

Definition at line 19 of file RPCFEDIntegrity.cc.

19  {
20  edm::LogVerbatim("rpcfedintegrity") << "[RPCFEDIntegrity]: Constructor";
21 
22  rawCountsLabel_ = consumes<RPCRawDataCounts>(ps.getUntrackedParameter<edm::InputTag>("RPCRawCountsInputTag"));
23  prefixDir_ = ps.getUntrackedParameter<std::string>("RPCPrefixDir", "RPC/FEDIntegrity");
24  merge_ = ps.getUntrackedParameter<bool>("MergeRuns", false);
25  minFEDNum_ = ps.getUntrackedParameter<int>("MinimumFEDID", 790);
26  maxFEDNum_ = ps.getUntrackedParameter<int>("MaximumFEDID", 792);
27 
28  init_ = false;
30  FATAL_LIMIT = 5;
31 }

References FATAL_LIMIT, edm::ParameterSet::getUntrackedParameter(), init_, maxFEDNum_, merge_, minFEDNum_, numOfFED_, prefixDir_, rawCountsLabel_, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ ~RPCFEDIntegrity()

RPCFEDIntegrity::~RPCFEDIntegrity ( )
override

Destructor.

Definition at line 33 of file RPCFEDIntegrity.cc.

33  {
34  edm::LogVerbatim("rpcfedintegrity") << "[RPCFEDIntegrity]: Destructor ";
35  // dbe_=0;
36 }

Member Function Documentation

◆ analyze()

void RPCFEDIntegrity::analyze ( const edm::Event iEvent,
const edm::EventSetup c 
)
overridevirtual

Analyze.

Reimplemented from DQMEDAnalyzer.

Definition at line 44 of file RPCFEDIntegrity.cc.

44  {
45  //get hold of raw data counts
47  iEvent.getByToken(rawCountsLabel_, rawCounts);
48  if (!rawCounts.isValid())
49  return;
50 
51  const RPCRawDataCounts& counts = *rawCounts.product();
52 
53  for (int fed = minFEDNum_; fed <= maxFEDNum_; ++fed) {
54  if (counts.fedBxRecords(fed))
55  fedMe_[Entries]->Fill(fed);
56  if (counts.fedFormatErrors(fed))
57  fedMe_[Fatal]->Fill(fed);
58  if (counts.fedErrorRecords(fed))
59  fedMe_[NonFatal]->Fill(fed);
60  }
61 }

References dqmiodumpmetadata::counts, Entries, Fatal, fedMe_, HcalObjRepresent::Fill(), iEvent, edm::HandleBase::isValid(), maxFEDNum_, minFEDNum_, NonFatal, edm::Handle< T >::product(), and rawCountsLabel_.

◆ bookFEDMe()

void RPCFEDIntegrity::bookFEDMe ( DQMStore::IBooker ibooker)
private

Definition at line 64 of file RPCFEDIntegrity.cc.

64  {
65  ibooker.cd();
66  ibooker.setCurrentFolder(prefixDir_);
67 
68  fedMe_[Entries] = ibooker.book1D("FEDEntries", "FED Entries", numOfFED_, minFEDNum_, maxFEDNum_ + 1);
69  this->labelBins(fedMe_[Entries]);
70  fedMe_[Fatal] = ibooker.book1D("FEDFatal", "FED Fatal Errors", numOfFED_, minFEDNum_, maxFEDNum_ + 1);
71  this->labelBins(fedMe_[Fatal]);
72  fedMe_[NonFatal] = ibooker.book1D("FEDNonFatal", "FED NON Fatal Errors", numOfFED_, minFEDNum_, maxFEDNum_ + 1);
73  this->labelBins(fedMe_[NonFatal]);
74 
75  init_ = true;
76 }

References dqm::implementation::IBooker::book1D(), dqm::implementation::NavigatorBase::cd(), Entries, Fatal, fedMe_, init_, labelBins(), maxFEDNum_, minFEDNum_, NonFatal, numOfFED_, prefixDir_, and dqm::implementation::NavigatorBase::setCurrentFolder().

Referenced by bookHistograms().

◆ bookHistograms()

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

Begin Lumi block.

Implements DQMEDAnalyzer.

Definition at line 38 of file RPCFEDIntegrity.cc.

38  {
39  edm::LogVerbatim("rpcfedintegrity") << "[RPCFEDIntegrity]: Begin booking histograms ";
40 
41  this->bookFEDMe(ibooker);
42 }

References bookFEDMe().

◆ labelBins()

void RPCFEDIntegrity::labelBins ( MonitorElement myMe)
private

Definition at line 78 of file RPCFEDIntegrity.cc.

78  {
79  int xbins = myMe->getNbinsX();
80 
81  if (xbins != numOfFED_)
82  return;
83  std::stringstream xLabel;
84 
85  for (int i = 0; i < xbins; i++) {
86  xLabel.str("");
87  int fedNum = minFEDNum_ + i;
88  xLabel << fedNum;
89  myMe->setBinLabel(i + 1, xLabel.str(), 1);
90  }
91 }

References dqm::impl::MonitorElement::getNbinsX(), mps_fire::i, minFEDNum_, numOfFED_, dqm::impl::MonitorElement::setBinLabel(), and fw3dlego::xbins.

Referenced by bookFEDMe().

Member Data Documentation

◆ FATAL_LIMIT

int RPCFEDIntegrity::FATAL_LIMIT
private

Definition at line 42 of file RPCFEDIntegrity.h.

Referenced by RPCFEDIntegrity().

◆ fedMe_

MonitorElement* RPCFEDIntegrity::fedMe_[3]
private

Definition at line 46 of file RPCFEDIntegrity.h.

Referenced by analyze(), and bookFEDMe().

◆ histoName_

std::vector<std::string> RPCFEDIntegrity::histoName_
private

Definition at line 49 of file RPCFEDIntegrity.h.

◆ init_

bool RPCFEDIntegrity::init_
private

Definition at line 40 of file RPCFEDIntegrity.h.

Referenced by bookFEDMe(), and RPCFEDIntegrity().

◆ maxFEDNum_

int RPCFEDIntegrity::maxFEDNum_
private

Definition at line 48 of file RPCFEDIntegrity.h.

Referenced by analyze(), bookFEDMe(), and RPCFEDIntegrity().

◆ merge_

bool RPCFEDIntegrity::merge_
private

Definition at line 40 of file RPCFEDIntegrity.h.

Referenced by RPCFEDIntegrity().

◆ minFEDNum_

int RPCFEDIntegrity::minFEDNum_
private

Definition at line 48 of file RPCFEDIntegrity.h.

Referenced by analyze(), bookFEDMe(), labelBins(), and RPCFEDIntegrity().

◆ numOfFED_

int RPCFEDIntegrity::numOfFED_
private

Definition at line 48 of file RPCFEDIntegrity.h.

Referenced by bookFEDMe(), labelBins(), and RPCFEDIntegrity().

◆ prefixDir_

std::string RPCFEDIntegrity::prefixDir_
private

Definition at line 38 of file RPCFEDIntegrity.h.

Referenced by bookFEDMe(), and RPCFEDIntegrity().

◆ rawCountsLabel_

edm::EDGetTokenT<RPCRawDataCounts> RPCFEDIntegrity::rawCountsLabel_
private

Definition at line 35 of file RPCFEDIntegrity.h.

Referenced by analyze(), and RPCFEDIntegrity().

fw3dlego::xbins
const double xbins[]
Definition: fw3dlego_xbins.cc:16
mps_fire.i
i
Definition: mps_fire.py:355
edm::Handle::product
T const * product() const
Definition: Handle.h:70
RPCRawDataCounts
Definition: RPCRawDataCounts.h:15
RPCFEDIntegrity::NonFatal
Definition: RPCFEDIntegrity.h:44
RPCFEDIntegrity::fedMe_
MonitorElement * fedMe_[3]
Definition: RPCFEDIntegrity.h:46
RPCFEDIntegrity::labelBins
void labelBins(MonitorElement *myMe)
Definition: RPCFEDIntegrity.cc:78
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
edm::Handle
Definition: AssociativeIterator.h:50
RPCFEDIntegrity::Entries
Definition: RPCFEDIntegrity.h:44
RPCFEDIntegrity::Fatal
Definition: RPCFEDIntegrity.h:44
RPCFEDIntegrity::minFEDNum_
int minFEDNum_
Definition: RPCFEDIntegrity.h:48
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
RPCFEDIntegrity::bookFEDMe
void bookFEDMe(DQMStore::IBooker &)
Definition: RPCFEDIntegrity.cc:64
RPCFEDIntegrity::maxFEDNum_
int maxFEDNum_
Definition: RPCFEDIntegrity.h:48
iEvent
int iEvent
Definition: GenABIO.cc:224
dqm::impl::MonitorElement::setBinLabel
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:771
edm::LogVerbatim
Definition: MessageLogger.h:297
RPCFEDIntegrity::rawCountsLabel_
edm::EDGetTokenT< RPCRawDataCounts > rawCountsLabel_
Definition: RPCFEDIntegrity.h:35
RPCFEDIntegrity::init_
bool init_
Definition: RPCFEDIntegrity.h:40
RPCFEDIntegrity::FATAL_LIMIT
int FATAL_LIMIT
Definition: RPCFEDIntegrity.h:42
HcalObjRepresent::Fill
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
Definition: HcalObjRepresent.h:1053
RPCFEDIntegrity::merge_
bool merge_
Definition: RPCFEDIntegrity.h:40
dqm::impl::MonitorElement::getNbinsX
virtual int getNbinsX() const
get # of bins in X-axis
Definition: MonitorElement.cc:574
dqmiodumpmetadata.counts
counts
Definition: dqmiodumpmetadata.py:25
RPCFEDIntegrity::numOfFED_
int numOfFED_
Definition: RPCFEDIntegrity.h:48
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
RPCFEDIntegrity::prefixDir_
std::string prefixDir_
Definition: RPCFEDIntegrity.h:38
edm::InputTag
Definition: InputTag.h:15