CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
ecaldqm::PNIntegrityClient Class Reference

#include <PNIntegrityClient.h>

Inheritance diagram for ecaldqm::PNIntegrityClient:
ecaldqm::DQWorkerClient ecaldqm::DQWorker

Public Member Functions

 PNIntegrityClient ()
 
void producePlots (ProcessType) override
 
 ~PNIntegrityClient () override
 
- Public Member Functions inherited from ecaldqm::DQWorkerClient
void bookMEs (DQMStore::IBooker &) override
 
 DQWorkerClient ()
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) override
 
void releaseMEs () override
 
void releaseSource ()
 
virtual void resetMEs ()
 
void resetPerLumi ()
 
bool retrieveSource (DQMStore::IGetter &, ProcessType)
 
bool runsOn (ProcessType _type) const
 
void setStatusManager (StatusManager const &_manager)
 
virtual void setTokens (edm::ConsumesCollector &)
 
 ~DQWorkerClient () override
 
- Public Member Functions inherited from ecaldqm::DQWorker
virtual void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void beginRun (edm::Run const &, edm::EventSetup const &)
 
 DQWorker ()
 
virtual void endRun (edm::Run const &, edm::EventSetup const &)
 
const EcalDQMSetupObjects getEcalDQMSetupObjects ()
 
const EcalElectronicsMappingGetElectronicsMap ()
 
const CaloGeometryGetGeometry ()
 
const std::string & getName () const
 
const CaloTopologyGetTopology ()
 
const EcalTrigTowerConstituentsMapGetTrigTowerMap ()
 
bool onlineMode () const
 
void setEventNumber (edm::EventNumber_t _e)
 
void setLumiNumber (edm::LuminosityBlockNumber_t _l)
 
void setRunNumber (edm::RunNumber_t _r)
 
void setSetupObjects (edm::EventSetup const &)
 
void setSetupObjectsEndLumi (edm::EventSetup const &)
 
void setTime (time_t _t)
 
void setTokens (edm::ConsumesCollector &)
 
virtual ~DQWorker () noexcept(false)
 

Private Member Functions

void setParams (edm::ParameterSet const &) override
 

Private Attributes

float errFractionThreshold_
 

Additional Inherited Members

- Public Types inherited from ecaldqm::DQWorkerClient
enum  ProcessType { kLumi, kJob, nProcessType }
 
enum  Quality {
  kBad = 0, kGood = 1, kUnknown = 2, kMBad = 3,
  kMGood = 4, kMUnknown = 5
}
 
- Static Public Member Functions inherited from ecaldqm::DQWorkerClient
static void fillDescriptions (edm::ParameterSetDescription &)
 
- Static Public Member Functions inherited from ecaldqm::DQWorker
static void fillDescriptions (edm::ParameterSetDescription &_desc)
 
- Public Attributes inherited from ecaldqm::DQWorker
edm::ESGetToken< EcalElectronicsMapping, EcalMappingRcdelecMapHandle
 
edm::ESGetToken< EcalElectronicsMapping, EcalMappingRcdelecMapHandleEndLumi
 
edm::ESGetToken< CaloGeometry, CaloGeometryRecordgeomHandle
 
edm::ESGetToken< CaloGeometry, CaloGeometryRecordgeomHandleEndLumi
 
edm::ESGetToken< CaloTopology, CaloTopologyRecordtopoHandle
 
edm::ESGetToken< CaloTopology, CaloTopologyRecordtopoHandleEndLumi
 
edm::ESGetToken< EcalTrigTowerConstituentsMap, IdealGeometryRecordttMapHandle
 
edm::ESGetToken< EcalTrigTowerConstituentsMap, IdealGeometryRecordttMapHandleEndLumi
 
- Protected Types inherited from ecaldqm::DQWorker
typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 
- Protected Member Functions inherited from ecaldqm::DQWorkerClient
void setME (edm::ParameterSet const &_ps) final
 
void setSource (edm::ParameterSet const &) override
 
void towerAverage_ (MESet &, MESet const &, float)
 
bool using_ (std::string const &_name, ProcessType _type=kJob) const
 
- Protected Member Functions inherited from ecaldqm::DQWorker
void initialize (std::string const &_name, edm::ParameterSet const &)
 
void print_ (std::string const &, int=0) const
 
void setVerbosity (int _verbosity)
 
- Protected Attributes inherited from ecaldqm::DQWorkerClient
bool hasLumiPlots_
 
std::set< std::string > qualitySummaries_
 
MESetCollection sources_
 
StatusManager const * statusManager_
 
- Protected Attributes inherited from ecaldqm::DQWorker
bool booked_
 
MESetCollection MEs_
 
std::string name_
 
bool onlineMode_
 
Timestamp timestamp_
 
int verbosity_
 
bool willConvertToEDM_
 

Detailed Description

Definition at line 7 of file PNIntegrityClient.h.

Constructor & Destructor Documentation

◆ PNIntegrityClient()

ecaldqm::PNIntegrityClient::PNIntegrityClient ( )

Definition at line 12 of file PNIntegrityClient.cc.

13  qualitySummaries_.insert("QualitySummary");
14  }

References ecaldqm::DQWorkerClient::qualitySummaries_.

◆ ~PNIntegrityClient()

ecaldqm::PNIntegrityClient::~PNIntegrityClient ( )
inlineoverride

Definition at line 10 of file PNIntegrityClient.h.

10 {}

Member Function Documentation

◆ producePlots()

void ecaldqm::PNIntegrityClient::producePlots ( ProcessType  )
overridevirtual

Implements ecaldqm::DQWorkerClient.

Definition at line 20 of file PNIntegrityClient.cc.

20  {
23 
24  MESet& meQualitySummary(MEs_.at("QualitySummary"));
25 
26  MESet const& sOccupancy(sources_.at("Occupancy"));
27  MESet const& sMEMChId(sources_.at("MEMChId"));
28  MESet const& sMEMGain(sources_.at("MEMGain"));
29  MESet const& sMEMBlockSize(sources_.at("MEMBlockSize"));
30  MESet const& sMEMTowerId(sources_.at("MEMTowerId"));
31 
32  for (unsigned iDCC(0); iDCC < nDCC; ++iDCC) {
33  if (memDCCIndex(iDCC + 1) == unsigned(-1))
34  continue;
35  for (unsigned iPN(0); iPN < 10; ++iPN) {
36  int subdet(0);
37  if (iDCC >= kEBmLow && iDCC <= kEBpHigh)
38  subdet = EcalBarrel;
39  else
40  subdet = EcalEndcap;
41 
42  EcalPnDiodeDetId id(subdet, iDCC + 1, iPN + 1);
43 
44  bool doMask(meQualitySummary.maskMatches(id, mask, statusManager_, GetTrigTowerMap()));
45 
46  float entries(sOccupancy.getBinContent(getEcalDQMSetupObjects(), id));
47 
48  float chid(sMEMChId.getBinContent(getEcalDQMSetupObjects(), id));
49  float gain(sMEMGain.getBinContent(getEcalDQMSetupObjects(), id));
50 
51  float blocksize(sMEMBlockSize.getBinContent(getEcalDQMSetupObjects(), id));
52  float towerid(sMEMTowerId.getBinContent(getEcalDQMSetupObjects(), id));
53 
54  if (entries + gain + chid + blocksize + towerid < 1.) {
55  meQualitySummary.setBinContent(getEcalDQMSetupObjects(), id, doMask ? kMUnknown : kUnknown);
56  continue;
57  }
58 
59  float chErr((gain + chid + blocksize + towerid) / (entries + gain + chid + blocksize + towerid));
60 
61  if (chErr > errFractionThreshold_)
62  meQualitySummary.setBinContent(getEcalDQMSetupObjects(), id, doMask ? kMBad : kBad);
63  else
64  meQualitySummary.setBinContent(getEcalDQMSetupObjects(), id, doMask ? kMGood : kGood);
65  }
66  }
67  }

References ecaldqm::MESetCollection::at(), EcalDQMStatusHelper::CH_GAIN_ZERO_ERROR, EcalDQMStatusHelper::CH_ID_ERROR, EcalBarrel, EcalEndcap, errFractionThreshold_, PedestalClient_cfi::gain, ecaldqm::DQWorker::getEcalDQMSetupObjects(), ecaldqm::DQWorker::GetTrigTowerMap(), triggerObjects_cff::id, ecaldqm::DQWorkerClient::kBad, ecaldqm::kEBmLow, ecaldqm::kEBpHigh, ecaldqm::DQWorkerClient::kGood, ecaldqm::DQWorkerClient::kMBad, ecaldqm::DQWorkerClient::kMGood, ecaldqm::DQWorkerClient::kMUnknown, ecaldqm::DQWorkerClient::kUnknown, ecaldqm::memDCCIndex(), ecaldqm::DQWorker::MEs_, ecaldqm::nDCC, ecaldqm::DQWorkerClient::sources_, ecaldqm::DQWorkerClient::statusManager_, EcalDQMStatusHelper::TT_ID_ERROR, EcalDQMStatusHelper::TT_SIZE_ERROR, and testProducerWithPsetDescEmpty_cfi::x1.

◆ setParams()

void ecaldqm::PNIntegrityClient::setParams ( edm::ParameterSet const &  _params)
overrideprivatevirtual

Reimplemented from ecaldqm::DQWorker.

Definition at line 16 of file PNIntegrityClient.cc.

16  {
17  errFractionThreshold_ = _params.getUntrackedParameter<double>("errFractionThreshold");
18  }

References l1extraParticles_cfi::_params, and errFractionThreshold_.

Member Data Documentation

◆ errFractionThreshold_

float ecaldqm::PNIntegrityClient::errFractionThreshold_
private

Definition at line 17 of file PNIntegrityClient.h.

Referenced by producePlots(), and setParams().

l1extraParticles_cfi._params
_params
Definition: l1extraParticles_cfi.py:29
ecaldqm::memDCCIndex
unsigned memDCCIndex(unsigned)
Definition: EcalDQMCommonUtils.cc:46
ecaldqm::DQWorkerClient::statusManager_
StatusManager const * statusManager_
Definition: DQWorkerClient.h:67
EcalPnDiodeDetId
Definition: EcalPnDiodeDetId.h:22
EcalBarrel
Definition: EcalSubdetector.h:10
testProducerWithPsetDescEmpty_cfi.x1
x1
Definition: testProducerWithPsetDescEmpty_cfi.py:33
ecaldqm::DQWorkerClient::qualitySummaries_
std::set< std::string > qualitySummaries_
Definition: DQWorkerClient.h:63
ecaldqm::kEBpHigh
Definition: EcalDQMCommonUtils.h:87
ecaldqm::DQWorker::GetTrigTowerMap
const EcalTrigTowerConstituentsMap * GetTrigTowerMap()
Definition: DQWorker.cc:124
EcalDQMStatusHelper::TT_SIZE_ERROR
static const int TT_SIZE_ERROR
Definition: EcalDQMStatusHelper.h:15
ecaldqm::DQWorker::MEs_
MESetCollection MEs_
Definition: DQWorker.h:125
ecaldqm::DQWorkerClient::kMBad
Definition: DQWorkerClient.h:44
EcalDQMStatusHelper::CH_ID_ERROR
static const int CH_ID_ERROR
Definition: EcalDQMStatusHelper.h:11
EcalDQMStatusHelper::TT_ID_ERROR
static const int TT_ID_ERROR
Definition: EcalDQMStatusHelper.h:14
EcalEndcap
Definition: EcalSubdetector.h:10
ecaldqm::DQWorkerClient::kUnknown
Definition: DQWorkerClient.h:44
ecaldqm::DQWorkerClient::kBad
Definition: DQWorkerClient.h:44
ecaldqm::DQWorkerClient::sources_
MESetCollection sources_
Definition: DQWorkerClient.h:62
ecaldqm::DQWorkerClient::kMGood
Definition: DQWorkerClient.h:44
EcalDQMStatusHelper::CH_GAIN_ZERO_ERROR
static const int CH_GAIN_ZERO_ERROR
Definition: EcalDQMStatusHelper.h:12
ecaldqm::MESetCollection::at
MESet & at(const std::string &key)
Definition: MESet.h:399
ecaldqm::PNIntegrityClient::errFractionThreshold_
float errFractionThreshold_
Definition: PNIntegrityClient.h:17
ecaldqm::DQWorkerClient::kMUnknown
Definition: DQWorkerClient.h:44
ecaldqm::kEBmLow
Definition: EcalDQMCommonUtils.h:84
ecaldqm::DQWorkerClient::DQWorkerClient
DQWorkerClient()
Definition: DQWorkerClient.cc:17
PedestalClient_cfi.gain
gain
Definition: PedestalClient_cfi.py:37
ecaldqm::DQWorker::getEcalDQMSetupObjects
const EcalDQMSetupObjects getEcalDQMSetupObjects()
Definition: DQWorker.cc:142
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:29
ecaldqm::DQWorkerClient::kGood
Definition: DQWorkerClient.h:44
ecaldqm::nDCC
Definition: EcalDQMCommonUtils.h:91