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 &)
 
bool checkElectronicsMap (bool=true)
 
bool checkGeometry (bool=true)
 
bool checkTopology (bool=true)
 
bool checkTrigTowerMap (bool=true)
 
 DQWorker ()
 
virtual void endRun (edm::Run const &, edm::EventSetup const &)
 
EcalDQMSetupObjects const getEcalDQMSetupObjects ()
 
EcalElectronicsMapping const * GetElectronicsMap ()
 
CaloGeometry const * GetGeometry ()
 
std::string const & getName () const
 
CaloTopology const * GetTopology ()
 
EcalTrigTowerConstituentsMap const * GetTrigTowerMap ()
 
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.

References ecaldqm::DQWorkerClient::qualitySummaries_.

13  qualitySummaries_.insert("QualitySummary");
14  }
std::set< std::string > 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.

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(), l1ctLayer2EG_cff::id, ecaldqm::DQWorkerClient::kBad, ecaldqm::kEBmLow, ecaldqm::kEBpHigh, ecaldqm::DQWorkerClient::kGood, ecaldqm::DQWorkerClient::kMBad, ecaldqm::DQWorkerClient::kMGood, ecaldqm::DQWorkerClient::kMUnknown, ecaldqm::DQWorkerClient::kUnknown, ALPAKA_ACCELERATOR_NAMESPACE::pixelClustering::pixelStatus::mask, ecaldqm::memDCCIndex(), ecaldqm::DQWorker::MEs_, ecaldqm::nDCC, ecaldqm::DQWorkerClient::sources_, ecaldqm::DQWorkerClient::statusManager_, EcalDQMStatusHelper::TT_ID_ERROR, and EcalDQMStatusHelper::TT_SIZE_ERROR.

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  }
unsigned memDCCIndex(unsigned)
MESet & at(const std::string &key)
Definition: MESet.h:399
static const int TT_SIZE_ERROR
StatusManager const * statusManager_
MESetCollection sources_
EcalDQMSetupObjects const getEcalDQMSetupObjects()
Definition: DQWorker.cc:170
static const int CH_GAIN_ZERO_ERROR
MESetCollection MEs_
Definition: DQWorker.h:131
static const int TT_ID_ERROR
EcalTrigTowerConstituentsMap const * GetTrigTowerMap()
Definition: DQWorker.cc:155
static const int CH_ID_ERROR

◆ setParams()

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

Reimplemented from ecaldqm::DQWorker.

Definition at line 16 of file PNIntegrityClient.cc.

References l1extraParticles_cfi::_params, and errFractionThreshold_.

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

Member Data Documentation

◆ errFractionThreshold_

float ecaldqm::PNIntegrityClient::errFractionThreshold_
private

Definition at line 17 of file PNIntegrityClient.h.

Referenced by producePlots(), and setParams().