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)
 
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

int minEvents_
 
float synchErrThresholdFactor_
 

Additional Inherited Members

- Public Types inherited from ecaldqm::DQWorkerClient
enum  ProcessType { kLumi, kJob, nProcessType }
 
- 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
 
- Static Public Attributes inherited from ecaldqm::DQWorkerClient
static constexpr int kBad = 0
 
static constexpr int kGood = 1
 
static constexpr int kMBad = 3
 
static constexpr int kMGood = 4
 
static constexpr int kMUnknown = 5
 
static constexpr int kUnknown = 2
 
- 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.

References ecaldqm::DQWorkerClient::qualitySummaries_.

15  qualitySummaries_.insert("QualitySummary");
16  }
std::set< std::string > 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 23 of file RawDataClient.cc.

References ecaldqm::MESetCollection::at(), ecaldqm::dccId(), ecaldqm::Enabled, ecaldqm::FIFOFull, ecaldqm::ForcedFullSupp, ecaldqm::ForcedZS, ecaldqm::DQWorker::getEcalDQMSetupObjects(), ecaldqm::DQWorker::GetElectronicsMap(), ecaldqm::DQWorker::GetTrigTowerMap(), l1ctLayer2EG_cff::id, ecaldqm::DQWorkerClient::kBad, ecaldqm::DQWorkerClient::kGood, ecaldqm::DQWorkerClient::kMBad, ecaldqm::DQWorkerClient::kMGood, ecaldqm::DQWorkerClient::kMUnknown, ecaldqm::DQWorkerClient::kUnknown, dqm-mbProfile::log, ALPAKA_ACCELERATOR_NAMESPACE::pixelClustering::pixelStatus::mask, ecaldqm::DQWorker::MEs_, minEvents_, ecaldqm::nDCC, ecaldqm::nFEFlags, ecaldqm::DQWorkerClient::sources_, EcalDQMStatusHelper::STATUS_FLAG_ERROR, ecaldqm::DQWorkerClient::statusManager_, ecaldqm::Suppressed, synchErrThresholdFactor_, and ecaldqm::MESet::iterator::toNextChannel().

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

◆ setParams()

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

Reimplemented from ecaldqm::DQWorker.

Definition at line 18 of file RawDataClient.cc.

References l1extraParticles_cfi::_params, minEvents_, and synchErrThresholdFactor_.

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

Member Data Documentation

◆ minEvents_

int ecaldqm::RawDataClient::minEvents_
private

Definition at line 17 of file RawDataClient.h.

Referenced by producePlots(), and setParams().

◆ synchErrThresholdFactor_

float ecaldqm::RawDataClient::synchErrThresholdFactor_
private

Definition at line 18 of file RawDataClient.h.

Referenced by producePlots(), and setParams().