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::TrigPrimClient Class Reference

#include <TrigPrimClient.h>

Inheritance diagram for ecaldqm::TrigPrimClient:
ecaldqm::DQWorkerClient ecaldqm::DQWorker

Public Member Functions

void producePlots (ProcessType) override
 
 TrigPrimClient ()
 
 ~TrigPrimClient ()
 
- Public Member Functions inherited from ecaldqm::DQWorkerClient
void bookMEs (DQMStore &) override
 
 DQWorkerClient ()
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) override
 
void releaseMEs () override
 
void releaseSource ()
 
void resetMEs ()
 
bool retrieveSource (DQMStore const &, ProcessType)
 
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 &)
 
virtual void bookMEs (DQMStore::IBooker &)
 
 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 errorFractionThreshold_
 
int minEntries_
 

Additional Inherited Members

- Public Types inherited from ecaldqm::DQWorkerClient
enum  ProcessType { kLumi, kRun, 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=kRun) 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
std::set< std::string > qualitySummaries_
 
MESetCollection sources_
 
StatusManager const * statusManager_
 
- Protected Attributes inherited from ecaldqm::DQWorker
MESetCollection MEs_
 
std::string name_
 
bool onlineMode_
 
Timestamp timestamp_
 
int verbosity_
 
bool willConvertToEDM_
 

Detailed Description

Definition at line 8 of file TrigPrimClient.h.

Constructor & Destructor Documentation

ecaldqm::TrigPrimClient::TrigPrimClient ( )

Definition at line 13 of file TrigPrimClient.cc.

References ecaldqm::DQWorkerClient::qualitySummaries_.

13  :
15  minEntries_(0),
17  {
18  qualitySummaries_.insert("EmulQualitySummary");
19  }
std::set< std::string > qualitySummaries_
ecaldqm::TrigPrimClient::~TrigPrimClient ( )
inline

Definition at line 11 of file TrigPrimClient.h.

11 {}

Member Function Documentation

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

Implements ecaldqm::DQWorkerClient.

Definition at line 29 of file TrigPrimClient.cc.

References EcalTrigTowerDetId::detIdFromDenseIndex(), python.tagInventory::entries, errorFractionThreshold_, ecaldqm::DQWorkerClient::kBad, ecaldqm::DQWorkerClient::kGood, ecaldqm::DQWorkerClient::kMBad, ecaldqm::DQWorkerClient::kMGood, ecaldqm::DQWorkerClient::kMUnknown, EcalTrigTowerDetId::kSizeForDenseIndexing, ecaldqm::DQWorkerClient::kUnknown, ecaldqm::DQWorker::MEs_, minEntries_, EcalDQMStatusHelper::PHYSICS_BAD_CHANNEL_WARNING, ecaldqm::DQWorkerClient::sources_, and ecaldqm::DQWorkerClient::statusManager_.

30  {
31  MESet& meTimingSummary(MEs_.at("TimingSummary"));
32  MESet& meNonSingleSummary(MEs_.at("NonSingleSummary"));
33  MESet& meEmulQualitySummary(MEs_.at("EmulQualitySummary"));
34 
35  MESet const& sEtEmulError(sources_.at("EtEmulError"));
36  MESet const& sMatchedIndex(sources_.at("MatchedIndex"));
37 
39 
40  for(unsigned iTT(0); iTT < EcalTrigTowerDetId::kSizeForDenseIndexing; iTT++){
42 
43  bool doMask(meEmulQualitySummary.maskMatches(ttid, mask, statusManager_));
44 
45  float towerEntries(0.);
46  float tMax(0.5);
47  float nMax(0.);
48  for(int iBin(0); iBin < 6; iBin++){
49  float entries(sMatchedIndex.getBinContent(ttid, iBin + 1));
50  towerEntries += entries;
51 
52  if(entries > nMax){
53  nMax = entries;
54  tMax = iBin == 0 ? -0.5 : iBin + 0.5; // historical reasons.. much clearer to say "no entry = -0.5"
55  }
56  }
57 
58  meTimingSummary.setBinContent(ttid, tMax);
59 
60  if(towerEntries < minEntries_){
61  meEmulQualitySummary.setBinContent(ttid, doMask ? kMUnknown : kUnknown);
62  continue;
63  }
64 
65  float nonsingleFraction(1. - nMax / towerEntries);
66 
67  if(nonsingleFraction > 0.)
68  meNonSingleSummary.setBinContent(ttid, nonsingleFraction);
69 
70  if(sEtEmulError.getBinContent(ttid) / towerEntries > errorFractionThreshold_)
71  meEmulQualitySummary.setBinContent(ttid, doMask ? kMBad : kBad);
72  else
73  meEmulQualitySummary.setBinContent(ttid, doMask ? kMGood : kGood);
74  }
75  }
static EcalTrigTowerDetId detIdFromDenseIndex(uint32_t di)
static const int PHYSICS_BAD_CHANNEL_WARNING
StatusManager const * statusManager_
MESetCollection sources_
MESetCollection MEs_
Definition: DQWorker.h:76
void ecaldqm::TrigPrimClient::setParams ( edm::ParameterSet const &  _params)
overrideprivatevirtual

Reimplemented from ecaldqm::DQWorker.

Definition at line 22 of file TrigPrimClient.cc.

References errorFractionThreshold_, edm::ParameterSet::getUntrackedParameter(), and minEntries_.

23  {
24  minEntries_ = _params.getUntrackedParameter<int>("minEntries");
25  errorFractionThreshold_ = _params.getUntrackedParameter<double>("errorFractionThreshold");
26  }

Member Data Documentation

float ecaldqm::TrigPrimClient::errorFractionThreshold_
private

Definition at line 19 of file TrigPrimClient.h.

Referenced by producePlots(), and setParams().

int ecaldqm::TrigPrimClient::minEntries_
private

Definition at line 18 of file TrigPrimClient.h.

Referenced by producePlots(), and setParams().