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 Member Functions | Private Attributes
ecaldqm::IntegrityClient Class Reference

#include <IntegrityClient.h>

Inheritance diagram for ecaldqm::IntegrityClient:
ecaldqm::DQWorkerClient ecaldqm::DQWorker

Public Member Functions

 IntegrityClient ()
 
void producePlots (ProcessType) override
 
 ~IntegrityClient ()
 
- 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 ()
 

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 IntegrityClient.h.

Constructor & Destructor Documentation

ecaldqm::IntegrityClient::IntegrityClient ( )

Definition at line 9 of file IntegrityClient.cc.

References ecaldqm::DQWorkerClient::qualitySummaries_.

9  :
12  {
13  qualitySummaries_.insert("Quality");
14  qualitySummaries_.insert("QualitySummary");
15  }
std::set< std::string > qualitySummaries_
ecaldqm::IntegrityClient::~IntegrityClient ( )
inline

Definition at line 11 of file IntegrityClient.h.

11 {}

Member Function Documentation

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

Implements ecaldqm::DQWorkerClient.

Definition at line 24 of file IntegrityClient.cc.

References EcalDQMStatusHelper::CH_GAIN_SWITCH_ERROR, EcalDQMStatusHelper::CH_GAIN_ZERO_ERROR, EcalDQMStatusHelper::CH_ID_ERROR, python.tagInventory::entries, errFractionThreshold_, ecaldqm::DQWorkerClient::kBad, ecaldqm::DQWorkerClient::kGood, ecaldqm::DQWorkerClient::kMBad, ecaldqm::DQWorkerClient::kMGood, ecaldqm::DQWorkerClient::kMUnknown, ecaldqm::DQWorkerClient::kUnknown, ecaldqm::DQWorker::MEs_, ecaldqm::DQWorkerClient::sources_, ecaldqm::DQWorkerClient::statusManager_, ecaldqm::MESet::iterator::toNextChannel(), EcalDQMStatusHelper::TT_ID_ERROR, and EcalDQMStatusHelper::TT_SIZE_ERROR.

25  {
26  uint32_t mask(1 << EcalDQMStatusHelper::CH_ID_ERROR |
31 
32  MESet& meQuality(MEs_.at("Quality"));
33  MESet& meQualitySummary(MEs_.at("QualitySummary"));
34 
35  MESet const& sOccupancy(sources_.at("Occupancy"));
36  MESet const& sGain(sources_.at("Gain"));
37  MESet const& sChId(sources_.at("ChId"));
38  MESet const& sGainSwitch(sources_.at("GainSwitch"));
39  MESet const& sTowerId(sources_.at("TowerId"));
40  MESet const& sBlockSize(sources_.at("BlockSize"));
41 
42  MESet::iterator qEnd(meQuality.end());
43  MESet::const_iterator occItr(sOccupancy);
44  for(MESet::iterator qItr(meQuality.beginChannel()); qItr != qEnd; qItr.toNextChannel()){
45 
46  occItr = qItr;
47 
48  DetId id(qItr->getId());
49 
50  bool doMask(meQuality.maskMatches(id, mask, statusManager_));
51 
52  float entries(occItr->getBinContent());
53 
54  float gain(sGain.getBinContent(id));
55  float chid(sChId.getBinContent(id));
56  float gainswitch(sGainSwitch.getBinContent(id));
57 
58  float towerid(sTowerId.getBinContent(id));
59  float blocksize(sBlockSize.getBinContent(id));
60 
61  if(entries + gain + chid + gainswitch + towerid + blocksize < 1.){
62  qItr->setBinContent(doMask ? kMUnknown : kUnknown);
63  meQualitySummary.setBinContent(id, doMask ? kMUnknown : kUnknown);
64  continue;
65  }
66 
67  float chErr((gain + chid + gainswitch + towerid + blocksize) / (entries + gain + chid + gainswitch + towerid + blocksize));
68 
69  if(chErr > errFractionThreshold_){
70  qItr->setBinContent(doMask ? kMBad : kBad);
71  meQualitySummary.setBinContent(id, doMask ? kMBad : kBad);
72  }
73  else{
74  qItr->setBinContent(doMask ? kMGood : kGood);
75  meQualitySummary.setBinContent(id, doMask ? kMGood : kGood);
76  }
77  }
78  }
static const int TT_SIZE_ERROR
static const int CH_GAIN_SWITCH_ERROR
StatusManager const * statusManager_
MESetCollection sources_
Definition: DetId.h:18
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::IntegrityClient::setParams ( edm::ParameterSet const &  _params)
overrideprivatevirtual

Reimplemented from ecaldqm::DQWorker.

Definition at line 18 of file IntegrityClient.cc.

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

19  {
20  errFractionThreshold_ = _params.getUntrackedParameter<double>("errFractionThreshold");
21  }

Member Data Documentation

float ecaldqm::IntegrityClient::errFractionThreshold_
private

Definition at line 18 of file IntegrityClient.h.

Referenced by producePlots(), and setParams().