CMS 3D CMS Logo

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

#include <RawDataClient.h>

Inheritance diagram for ecaldqm::RawDataClient:
ecaldqm::DQWorkerClient ecaldqm::DQWorker

Public Member Functions

void producePlots (ProcessType) override
 
 RawDataClient ()
 
 ~RawDataClient () 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)
 
 ~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 std::string & 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 () noexcept(false)
 

Private Member Functions

void setParams (edm::ParameterSet const &) override
 

Private Attributes

float synchErrThresholdFactor_
 

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 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 8 of file RawDataClient.h.

Constructor & Destructor Documentation

◆ RawDataClient()

ecaldqm::RawDataClient::RawDataClient ( )

Definition at line 14 of file RawDataClient.cc.

15  qualitySummaries_.insert("QualitySummary");
16  }

References ecaldqm::DQWorkerClient::qualitySummaries_.

◆ ~RawDataClient()

ecaldqm::RawDataClient::~RawDataClient ( )
inlineoverride

Definition at line 11 of file RawDataClient.h.

11 {}

Member Function Documentation

◆ producePlots()

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

Implements ecaldqm::DQWorkerClient.

Definition at line 22 of file RawDataClient.cc.

22  {
23  MESet& meQualitySummary(MEs_.at("QualitySummary"));
24  MESet& meErrorsSummary(MEs_.at("ErrorsSummary"));
25 
26  MESet const& sEntries(sources_.at("Entries"));
27  MESet const& sL1ADCC(sources_.at("L1ADCC"));
28  MESet const& sFEStatus(sources_.at("FEStatus"));
29 
30  uint32_t mask(1 << EcalDQMStatusHelper::STATUS_FLAG_ERROR);
31 
32  std::vector<int> dccStatus(nDCC, 1);
33 
34  for (unsigned iDCC(0); iDCC < nDCC; ++iDCC) {
35  double entries(sEntries.getBinContent(iDCC + 1));
36  if (entries > 1. &&
37  sL1ADCC.getBinContent(iDCC + 1) > synchErrThresholdFactor_ * std::log(entries) / std::log(10.))
38  dccStatus[iDCC] = 0;
39  }
40 
41  MESet::iterator meEnd(meQualitySummary.end());
42  for (MESet::iterator meItr(meQualitySummary.beginChannel()); meItr != meEnd; meItr.toNextChannel()) {
43  DetId id(meItr->getId());
44 
45  bool doMask(meQualitySummary.maskMatches(id, mask, statusManager_));
46 
47  int dccid(dccId(id));
48 
49  if (dccStatus[dccid - 1] == 0) {
50  meItr->setBinContent(doMask ? kMUnknown : kUnknown);
51  continue;
52  }
53 
54  int towerStatus(doMask ? kMGood : kGood);
55  float towerEntries(0.);
56  for (unsigned iS(0); iS < nFEFlags; iS++) {
57  float entries(sFEStatus.getBinContent(id, iS + 1));
58  towerEntries += entries;
59  if (entries > 0. && iS != Enabled && iS != Suppressed && iS != FIFOFull && iS != FIFOFullL1ADesync &&
60  iS != ForcedZS)
61  towerStatus = doMask ? kMBad : kBad;
62  }
63 
64  if (towerEntries < 1.)
65  towerStatus = doMask ? kMUnknown : kUnknown;
66 
67  meItr->setBinContent(towerStatus);
68  if (towerStatus == kBad)
69  meErrorsSummary.fill(dccid);
70  }
71  }

References ecaldqm::dccId(), ecaldqm::Enabled, ecaldqm::FIFOFull, ecaldqm::FIFOFullL1ADesync, ecaldqm::ForcedZS, triggerObjects_cff::id, ecaldqm::DQWorkerClient::kBad, ecaldqm::DQWorkerClient::kGood, ecaldqm::DQWorkerClient::kMBad, ecaldqm::DQWorkerClient::kMGood, ecaldqm::DQWorkerClient::kMUnknown, ecaldqm::DQWorkerClient::kUnknown, dqm-mbProfile::log, ecaldqm::DQWorker::MEs_, ecaldqm::nDCC, ecaldqm::nFEFlags, ecaldqm::DQWorkerClient::sources_, EcalDQMStatusHelper::STATUS_FLAG_ERROR, ecaldqm::DQWorkerClient::statusManager_, ecaldqm::Suppressed, synchErrThresholdFactor_, and ecaldqm::MESet::iterator::toNextChannel().

◆ setParams()

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

Reimplemented from ecaldqm::DQWorker.

Definition at line 18 of file RawDataClient.cc.

18  {
19  synchErrThresholdFactor_ = _params.getUntrackedParameter<double>("synchErrThresholdFactor");
20  }

References l1extraParticles_cfi::_params, and synchErrThresholdFactor_.

Member Data Documentation

◆ synchErrThresholdFactor_

float ecaldqm::RawDataClient::synchErrThresholdFactor_
private

Definition at line 18 of file RawDataClient.h.

Referenced by producePlots(), and setParams().

ecaldqm::Enabled
Definition: FEFlags.h:9
l1extraParticles_cfi._params
_params
Definition: l1extraParticles_cfi.py:29
ecaldqm::DQWorkerClient::statusManager_
StatusManager const * statusManager_
Definition: DQWorkerClient.h:60
EcalDQMStatusHelper::STATUS_FLAG_ERROR
static const int STATUS_FLAG_ERROR
Definition: EcalDQMStatusHelper.h:44
ecaldqm::Suppressed
Definition: FEFlags.h:16
ecaldqm::FIFOFullL1ADesync
Definition: FEFlags.h:21
DetId
Definition: DetId.h:17
ecaldqm::DQWorkerClient::qualitySummaries_
std::set< std::string > qualitySummaries_
Definition: DQWorkerClient.h:56
ecaldqm::RawDataClient::synchErrThresholdFactor_
float synchErrThresholdFactor_
Definition: RawDataClient.h:18
ecaldqm::DQWorker::MEs_
MESetCollection MEs_
Definition: DQWorker.h:78
ecaldqm::DQWorkerClient::kMBad
Definition: DQWorkerClient.h:37
ecaldqm::DQWorkerClient::kUnknown
Definition: DQWorkerClient.h:37
ecaldqm::DQWorkerClient::kBad
Definition: DQWorkerClient.h:37
ecaldqm::DQWorkerClient::sources_
MESetCollection sources_
Definition: DQWorkerClient.h:55
ecaldqm::DQWorkerClient::kMGood
Definition: DQWorkerClient.h:37
ecaldqm::DQWorkerClient::kMUnknown
Definition: DQWorkerClient.h:37
ecaldqm::DQWorkerClient::DQWorkerClient
DQWorkerClient()
Definition: DQWorkerClient.cc:17
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
ecaldqm::DQWorkerClient::kGood
Definition: DQWorkerClient.h:37
ecaldqm::nFEFlags
Definition: FEFlags.h:25
dqm-mbProfile.log
log
Definition: dqm-mbProfile.py:17
ecaldqm::nDCC
Definition: EcalDQMCommonUtils.h:92
ecaldqm::ForcedZS
Definition: FEFlags.h:24
ecaldqm::FIFOFull
Definition: FEFlags.h:17
ecaldqm::dccId
unsigned dccId(DetId const &)
Definition: EcalDQMCommonUtils.cc:16