CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

void analyze (const edm::Event &iEvent, const edm::EventSetup &c)
 Analyze. More...
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 Begin Lumi block. More...
 
 RPCFEDIntegrity (const edm::ParameterSet &ps)
 Constructor. More...
 
virtual ~RPCFEDIntegrity ()
 Destructor. More...
 
- Public Member Functions inherited from DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer (void)
 
virtual void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
virtual void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

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
< RPCRawDataCounts
rawCountsLabel_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T...> CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T...> HasAbility
 
typedef
CacheTypes::LuminosityBlockCache 
LuminosityBlockCache
 
typedef
LuminosityBlockContextT
< LuminosityBlockCache,
RunCache, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr
< dqmDetails::NoCache
globalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr
< dqmDetails::NoCache
globalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
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)
 

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

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

Analyze.

Implements edm::stream::EDAnalyzerBase.

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:462
int fedFormatErrors(int fedId) const
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
bool isValid() const
Definition: HandleBase.h:75
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 }
void cd(void)
Definition: DQMStore.cc:265
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:273
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(), 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 }
int i
Definition: DBlmapReader.cc:9
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(void) 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().