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 ()
 
- 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 ()
 
bool retrieveSource (DQMStore::IGetter &, ProcessType)
 
bool runsOn (ProcessType _type) const
 
void setStatusManager (StatusManager const &_manager)
 
virtual ~DQWorkerClient ()
 
- 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 &)
 
std::string const & getName () const
 
bool onlineMode () const
 
void setEventNumber (edm::EventNumber_t _e)
 
void setLumiNumber (edm::LuminosityBlockNumber_t _l)
 
void setRunNumber (edm::RunNumber_t _r)
 
void setTime (time_t _t)
 
virtual ~DQWorker ()(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)
 
- 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 8 of file PNIntegrityClient.h.

Constructor & Destructor Documentation

ecaldqm::PNIntegrityClient::PNIntegrityClient ( )

Definition at line 13 of file PNIntegrityClient.cc.

References ecaldqm::DQWorkerClient::qualitySummaries_.

13  :
16  {
17  qualitySummaries_.insert("QualitySummary");
18  }
std::set< std::string > qualitySummaries_
ecaldqm::PNIntegrityClient::~PNIntegrityClient ( )
inline

Definition at line 11 of file PNIntegrityClient.h.

References producePlots(), and setParams().

11 {}

Member Function Documentation

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

Implements ecaldqm::DQWorkerClient.

Definition at line 27 of file PNIntegrityClient.cc.

References EcalDQMStatusHelper::CH_GAIN_ZERO_ERROR, EcalDQMStatusHelper::CH_ID_ERROR, DEFINE_ECALDQM_WORKER, EcalBarrel, EcalEndcap, errFractionThreshold_, muonCSCDigis_cfi::gain, hcalTTPDigis_cfi::id, ecaldqm::DQWorkerClient::kBad, ecaldqm::kEBmLow, ecaldqm::kEBpHigh, ecaldqm::DQWorkerClient::kGood, ecaldqm::DQWorkerClient::kMBad, ecaldqm::DQWorkerClient::kMGood, ecaldqm::DQWorkerClient::kMUnknown, ecaldqm::DQWorkerClient::kUnknown, RecoTauDiscriminantConfiguration::mask, ecaldqm::memDCCIndex(), ecaldqm::DQWorker::MEs_, ecaldqm::nDCC, ecaldqm::DQWorkerClient::sources_, ecaldqm::DQWorkerClient::statusManager_, EcalDQMStatusHelper::TT_ID_ERROR, and EcalDQMStatusHelper::TT_SIZE_ERROR.

Referenced by ~PNIntegrityClient().

28  {
33 
34  MESet& meQualitySummary(MEs_.at("QualitySummary"));
35 
36  MESet const& sOccupancy(sources_.at("Occupancy"));
37  MESet const& sMEMChId(sources_.at("MEMChId"));
38  MESet const& sMEMGain(sources_.at("MEMGain"));
39  MESet const& sMEMBlockSize(sources_.at("MEMBlockSize"));
40  MESet const& sMEMTowerId(sources_.at("MEMTowerId"));
41 
42  for(unsigned iDCC(0); iDCC < nDCC; ++iDCC){
43  if(memDCCIndex(iDCC + 1) == unsigned(-1)) continue;
44  for(unsigned iPN(0); iPN < 10; ++iPN){
45  int subdet(0);
46  if(iDCC >= kEBmLow && iDCC <= kEBpHigh) subdet = EcalBarrel;
47  else subdet = EcalEndcap;
48 
49  EcalPnDiodeDetId id(subdet, iDCC + 1, iPN + 1);
50 
51  bool doMask(meQualitySummary.maskMatches(id, mask, statusManager_));
52 
53  float entries(sOccupancy.getBinContent(id));
54 
55  float chid(sMEMChId.getBinContent(id));
56  float gain(sMEMGain.getBinContent(id));
57 
58  float blocksize(sMEMBlockSize.getBinContent(id));
59  float towerid(sMEMTowerId.getBinContent(id));
60 
61  if(entries + gain + chid + blocksize + towerid < 1.){
62  meQualitySummary.setBinContent(id, doMask ? kMUnknown : kUnknown);
63  continue;
64  }
65 
66  float chErr((gain + chid + blocksize + towerid) / (entries + gain + chid + blocksize + towerid));
67 
68  if(chErr > errFractionThreshold_)
69  meQualitySummary.setBinContent(id, doMask ? kMBad : kBad);
70  else
71  meQualitySummary.setBinContent(id, doMask ? kMGood : kGood);
72  }
73  }
74  }
unsigned memDCCIndex(unsigned)
static const int TT_SIZE_ERROR
StatusManager const * statusManager_
MESetCollection sources_
static const int CH_GAIN_ZERO_ERROR
MESetCollection MEs_
Definition: DQWorker.h:75
static const int TT_ID_ERROR
static const int CH_ID_ERROR
void ecaldqm::PNIntegrityClient::setParams ( edm::ParameterSet const &  _params)
overrideprivatevirtual

Reimplemented from ecaldqm::DQWorker.

Definition at line 21 of file PNIntegrityClient.cc.

References errFractionThreshold_, and edm::ParameterSet::getUntrackedParameter().

Referenced by ~PNIntegrityClient().

22  {
23  errFractionThreshold_ = _params.getUntrackedParameter<double>("errFractionThreshold");
24  }

Member Data Documentation

float ecaldqm::PNIntegrityClient::errFractionThreshold_
private

Definition at line 18 of file PNIntegrityClient.h.

Referenced by producePlots(), and setParams().