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::one::EDProducer< edm::Accumulator, edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

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 &ev, edm::EventSetup const &es) final
 
virtual void analyze (edm::Event const &, edm::EventSetup const &)
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) override
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
 DQMEDAnalyzer (DQMEDAnalyzer const &)=delete
 
 DQMEDAnalyzer (DQMEDAnalyzer &&)=delete
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) override
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) override
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) override
 
 ~DQMEDAnalyzer () override=default
 
- Public Member Functions inherited from edm::one::EDProducer< edm::Accumulator, edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
 ~ProducerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

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 edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 21 of file RPCFEDIntegrity.h.

Member Enumeration Documentation

Enumerator
Entries 
Fatal 
NonFatal 

Definition at line 52 of file RPCFEDIntegrity.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 20 of file RPCFEDIntegrity.cc.

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

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

Destructor.

Definition at line 34 of file RPCFEDIntegrity.cc.

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

Member Function Documentation

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

Analyze.

Definition at line 51 of file RPCFEDIntegrity.cc.

References Entries, Fatal, RPCRawDataCounts::fedBxRecords(), RPCRawDataCounts::fedErrorRecords(), RPCRawDataCounts::fedFormatErrors(), fedMe_, HcalObjRepresent::Fill(), edm::Event::getByToken(), edm::HandleBase::isValid(), maxFEDNum_, minFEDNum_, NonFatal, edm::Handle< T >::product(), and rawCountsLabel_.

51  {
52 
53  //get hold of raw data counts
55  iEvent.getByToken (rawCountsLabel_, rawCounts);
56  if(!rawCounts.isValid()) return;
57 
58 
59  const RPCRawDataCounts & counts = *rawCounts.product();
60 
61  for (int fed=minFEDNum_; fed <=maxFEDNum_; ++fed) {
62  if (counts.fedBxRecords(fed) ) fedMe_[Entries]->Fill(fed);
63  if (counts.fedFormatErrors(fed)) fedMe_[Fatal]->Fill(fed);
64  if (counts.fedErrorRecords(fed)) fedMe_[NonFatal]->Fill(fed);
65  }
66 }
int fedErrorRecords(int fedId) const
int fedBxRecords(int fedId) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:519
int fedFormatErrors(int fedId) const
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
bool isValid() const
Definition: HandleBase.h:74
MonitorElement * fedMe_[3]
T const * product() const
Definition: Handle.h:81
edm::EDGetTokenT< RPCRawDataCounts > rawCountsLabel_
void RPCFEDIntegrity::bookFEDMe ( DQMStore::IBooker ibooker)
private

Definition at line 70 of file RPCFEDIntegrity.cc.

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

Referenced by bookHistograms().

70  {
71 
72 
73  ibooker.cd();
75 
76  fedMe_[Entries] = ibooker.book1D("FEDEntries","FED Entries",numOfFED_, minFEDNum_, maxFEDNum_ +1);
77  this->labelBins(fedMe_[Entries]);
78  fedMe_[Fatal] = ibooker.book1D("FEDFatal","FED Fatal Errors",numOfFED_, minFEDNum_, maxFEDNum_ +1);
79  this->labelBins(fedMe_[Fatal]);
80  fedMe_[NonFatal] = ibooker.book1D("FEDNonFatal","FED NON Fatal Errors",numOfFED_, minFEDNum_, maxFEDNum_ +1);
81  this->labelBins(fedMe_[NonFatal]);
82 
83  init_ = true;
84 }
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:118
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:279
MonitorElement * fedMe_[3]
void labelBins(MonitorElement *myMe)
std::string prefixDir_
void RPCFEDIntegrity::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
overridevirtual

Begin Lumi block.

Implements DQMEDAnalyzer.

Definition at line 40 of file RPCFEDIntegrity.cc.

References bookFEDMe().

42  {
43 
44 
45  edm::LogVerbatim ("rpcfedintegrity") << "[RPCFEDIntegrity]: Begin booking histograms ";
46 
47  this->bookFEDMe(ibooker);
48 }
void bookFEDMe(DQMStore::IBooker &)
void RPCFEDIntegrity::labelBins ( MonitorElement myMe)
private

Definition at line 86 of file RPCFEDIntegrity.cc.

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

Referenced by bookFEDMe().

86  {
87 
88  int xbins = myMe->getNbinsX();
89 
90  if (xbins!= numOfFED_ ) return;
91  std::stringstream xLabel;
92 
93  for (int i = 0; i<xbins; i++){
94  xLabel.str("");
95  int fedNum = minFEDNum_ + i;
96  xLabel<<fedNum;
97  myMe->setBinLabel(i+1, xLabel.str(),1);
98  }
99 }
const double xbins[]
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)
int getNbinsX() const
get # of bins in X-axis

Member Data Documentation

int RPCFEDIntegrity::FATAL_LIMIT
private

Definition at line 50 of file RPCFEDIntegrity.h.

Referenced by RPCFEDIntegrity().

MonitorElement* RPCFEDIntegrity::fedMe_[3]
private

Definition at line 54 of file RPCFEDIntegrity.h.

Referenced by analyze(), and bookFEDMe().

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

Definition at line 57 of file RPCFEDIntegrity.h.

bool RPCFEDIntegrity::init_
private

Definition at line 48 of file RPCFEDIntegrity.h.

Referenced by bookFEDMe(), and RPCFEDIntegrity().

int RPCFEDIntegrity::maxFEDNum_
private

Definition at line 56 of file RPCFEDIntegrity.h.

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

bool RPCFEDIntegrity::merge_
private

Definition at line 48 of file RPCFEDIntegrity.h.

Referenced by RPCFEDIntegrity().

int RPCFEDIntegrity::minFEDNum_
private

Definition at line 56 of file RPCFEDIntegrity.h.

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

int RPCFEDIntegrity::numOfFED_
private

Definition at line 56 of file RPCFEDIntegrity.h.

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

std::string RPCFEDIntegrity::prefixDir_
private

Definition at line 46 of file RPCFEDIntegrity.h.

Referenced by bookFEDMe(), and RPCFEDIntegrity().

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

Definition at line 43 of file RPCFEDIntegrity.h.

Referenced by analyze(), and RPCFEDIntegrity().