CMS 3D CMS Logo

List of all members | Public Member Functions
ecaldqm::SelectiveReadoutClient Class Reference

#include <SelectiveReadoutClient.h>

Inheritance diagram for ecaldqm::SelectiveReadoutClient:
ecaldqm::DQWorkerClient ecaldqm::DQWorker

Public Member Functions

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

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
 
virtual void setParams (edm::ParameterSet 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 SelectiveReadoutClient.h.

Constructor & Destructor Documentation

◆ SelectiveReadoutClient()

ecaldqm::SelectiveReadoutClient::SelectiveReadoutClient ( )

Definition at line 8 of file SelectiveReadoutClient.cc.

◆ ~SelectiveReadoutClient()

ecaldqm::SelectiveReadoutClient::~SelectiveReadoutClient ( )
inlineoverride

Definition at line 11 of file SelectiveReadoutClient.h.

11 {}

Member Function Documentation

◆ producePlots()

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

Implements ecaldqm::DQWorkerClient.

Definition at line 10 of file SelectiveReadoutClient.cc.

References ecaldqm::MESetCollection::at(), EcalTrigTowerDetId::detIdFromDenseIndex(), ecaldqm::MESet::ConstBin::getBinContent(), ecaldqm::DQWorker::getEcalDQMSetupObjects(), ecaldqm::DQWorker::GetElectronicsMap(), EcalPhiSymFlatTableProducers_cfi::id, EcalTrigTowerDetId::kSizeForDenseIndexing, ecaldqm::DQWorker::MEs_, ecaldqm::MESet::Bin::setBinContent(), ecaldqm::DQWorkerClient::sources_, ecaldqm::MESet::const_iterator::toNextChannel(), and dqmMemoryStats::total.

10  {
11  MESet& meFRDropped(MEs_.at("FRDropped"));
12  MESet& meZSReadout(MEs_.at("ZSReadout"));
13  MESet& meFR(MEs_.at("FR"));
14  MESet& meRUForced(MEs_.at("RUForced"));
15  MESet& meZS1(MEs_.at("ZS1"));
16  MESet& meHighInterest(MEs_.at("HighInterest"));
17  MESet& meMedInterest(MEs_.at("MedInterest"));
18  MESet& meLowInterest(MEs_.at("LowInterest"));
19 
20  MESet const& sFlagCounterMap(sources_.at("FlagCounterMap"));
21  MESet const& sRUForcedMap(sources_.at("RUForcedMap"));
22  MESet const& sFullReadoutMap(sources_.at("FullReadoutMap"));
23  MESet const& sZS1Map(sources_.at("ZS1Map"));
24  MESet const& sZSMap(sources_.at("ZSMap"));
25  MESet const& sZSFullReadoutMap(sources_.at("ZSFullReadoutMap"));
26  MESet const& sFRDroppedMap(sources_.at("FRDroppedMap"));
27  MESet const& sHighIntMap(sources_.at("HighIntMap"));
28  MESet const& sMedIntMap(sources_.at("MedIntMap"));
29  MESet const& sLowIntMap(sources_.at("LowIntMap"));
30 
31  MESet::const_iterator ruItr(GetElectronicsMap(), sRUForcedMap);
32  MESet::const_iterator frItr(GetElectronicsMap(), sFullReadoutMap);
33  MESet::const_iterator zs1Itr(GetElectronicsMap(), sZS1Map);
34  MESet::const_iterator zsItr(GetElectronicsMap(), sZSMap);
35  MESet::const_iterator zsfrItr(GetElectronicsMap(), sZSFullReadoutMap);
36  MESet::const_iterator frdItr(GetElectronicsMap(), sFRDroppedMap);
37 
38  MESet::iterator frdRateItr(GetElectronicsMap(), meFRDropped);
39  MESet::iterator zsrRateItr(GetElectronicsMap(), meZSReadout);
40  MESet::iterator frRateItr(GetElectronicsMap(), meFR);
41  MESet::iterator ruRateItr(GetElectronicsMap(), meRUForced);
42  MESet::iterator zs1RateItr(GetElectronicsMap(), meZS1);
43 
44  MESet::const_iterator cEnd(sFlagCounterMap.end(GetElectronicsMap()));
45  for (MESet::const_iterator cItr(sFlagCounterMap.beginChannel(GetElectronicsMap())); cItr != cEnd;
46  cItr.toNextChannel(GetElectronicsMap())) {
47  ruItr = cItr;
48  frItr = cItr;
49  zs1Itr = cItr;
50  zsItr = cItr;
51  zsfrItr = cItr;
52  frdItr = cItr;
53 
54  frdRateItr = cItr;
55  zsrRateItr = cItr;
56  frRateItr = cItr;
57  ruRateItr = cItr;
58  zs1RateItr = cItr;
59 
60  float nFlags(cItr->getBinContent());
61  float nZS12Flags(zsItr->getBinContent());
62  float nFullReadoutFlags(frItr->getBinContent());
63 
64  if (nFlags > 0.) {
65  frRateItr->setBinContent(nFullReadoutFlags / nFlags);
66  zs1RateItr->setBinContent(zs1Itr->getBinContent() / nFlags);
67  ruRateItr->setBinContent(ruItr->getBinContent() / nFlags);
68  }
69  if (nZS12Flags > 0.)
70  zsrRateItr->setBinContent(zsfrItr->getBinContent() / nZS12Flags);
71  if (nFullReadoutFlags > 0.)
72  frdRateItr->setBinContent(frdItr->getBinContent() / nFullReadoutFlags);
73  }
74 
75  // iterator not supported for kTriggerTower binning yet
76  for (unsigned iTT(0); iTT < EcalTrigTowerDetId::kSizeForDenseIndexing; ++iTT) {
78 
79  float nHigh(sHighIntMap.getBinContent(getEcalDQMSetupObjects(), id));
80  float nMed(sMedIntMap.getBinContent(getEcalDQMSetupObjects(), id));
81  float nLow(sLowIntMap.getBinContent(getEcalDQMSetupObjects(), id));
82  float total(nHigh + nMed + nLow);
83 
84  if (total > 0.) {
85  meHighInterest.setBinContent(getEcalDQMSetupObjects(), id, nHigh / total);
86  meMedInterest.setBinContent(getEcalDQMSetupObjects(), id, nMed / total);
87  meLowInterest.setBinContent(getEcalDQMSetupObjects(), id, nLow / total);
88  }
89  }
90  }
static EcalTrigTowerDetId detIdFromDenseIndex(uint32_t di)
static constexpr int kSizeForDenseIndexing
MESet & at(const std::string &key)
Definition: MESet.h:401
MESetCollection sources_
EcalElectronicsMapping const * GetElectronicsMap()
Definition: DQWorker.cc:150
EcalDQMSetupObjects const getEcalDQMSetupObjects()
Definition: DQWorker.cc:170
MESetCollection MEs_
Definition: DQWorker.h:131