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)
 
 ~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 &)
 
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 ()(false)
 

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

ecaldqm::SelectiveReadoutClient::SelectiveReadoutClient ( )

Definition at line 8 of file SelectiveReadoutClient.cc.

ecaldqm::SelectiveReadoutClient::~SelectiveReadoutClient ( )
inlineoverride

Definition at line 11 of file SelectiveReadoutClient.h.

References producePlots().

11 {}

Member Function Documentation

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

Implements ecaldqm::DQWorkerClient.

Definition at line 10 of file SelectiveReadoutClient.cc.

References DEFINE_ECALDQM_WORKER, EcalTrigTowerDetId::detIdFromDenseIndex(), ecaldqm::MESet::ConstBin::getBinContent(), triggerObjects_cff::id, EcalTrigTowerDetId::kSizeForDenseIndexing, ecaldqm::DQWorker::MEs_, ecaldqm::MESet::Bin::setBinContent(), ecaldqm::DQWorkerClient::sources_, ecaldqm::MESet::const_iterator::toNextChannel(), and dqmMemoryStats::total.

Referenced by ~SelectiveReadoutClient().

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(sRUForcedMap);
32  MESet::const_iterator frItr(sFullReadoutMap);
33  MESet::const_iterator zs1Itr(sZS1Map);
34  MESet::const_iterator zsItr(sZSMap);
35  MESet::const_iterator zsfrItr(sZSFullReadoutMap);
36  MESet::const_iterator frdItr(sFRDroppedMap);
37 
38  MESet::iterator frdRateItr(meFRDropped);
39  MESet::iterator zsrRateItr(meZSReadout);
40  MESet::iterator frRateItr(meFR);
41  MESet::iterator ruRateItr(meRUForced);
42  MESet::iterator zs1RateItr(meZS1);
43 
44  MESet::const_iterator cEnd(sFlagCounterMap.end());
45  for (MESet::const_iterator cItr(sFlagCounterMap.beginChannel()); cItr != cEnd; cItr.toNextChannel()) {
46  ruItr = cItr;
47  frItr = cItr;
48  zs1Itr = cItr;
49  zsItr = cItr;
50  zsfrItr = cItr;
51  frdItr = cItr;
52 
53  frdRateItr = cItr;
54  zsrRateItr = cItr;
55  frRateItr = cItr;
56  ruRateItr = cItr;
57  zs1RateItr = cItr;
58 
59  float nFlags(cItr->getBinContent());
60  float nZS12Flags(zsItr->getBinContent());
61  float nFullReadoutFlags(frItr->getBinContent());
62 
63  if (nFlags > 0.) {
64  frRateItr->setBinContent(nFullReadoutFlags / nFlags);
65  zs1RateItr->setBinContent(zs1Itr->getBinContent() / nFlags);
66  ruRateItr->setBinContent(ruItr->getBinContent() / nFlags);
67  }
68  if (nZS12Flags > 0.)
69  zsrRateItr->setBinContent(zsfrItr->getBinContent() / nZS12Flags);
70  if (nFullReadoutFlags > 0.)
71  frdRateItr->setBinContent(frdItr->getBinContent() / nFullReadoutFlags);
72  }
73 
74  // iterator not supported for kTriggerTower binning yet
75  for (unsigned iTT(0); iTT < EcalTrigTowerDetId::kSizeForDenseIndexing; ++iTT) {
77 
78  float nHigh(sHighIntMap.getBinContent(id));
79  float nMed(sMedIntMap.getBinContent(id));
80  float nLow(sLowIntMap.getBinContent(id));
81  float total(nHigh + nMed + nLow);
82 
83  if (total > 0.) {
84  meHighInterest.setBinContent(id, nHigh / total);
85  meMedInterest.setBinContent(id, nMed / total);
86  meLowInterest.setBinContent(id, nLow / total);
87  }
88  }
89  }
static EcalTrigTowerDetId detIdFromDenseIndex(uint32_t di)
MESetCollection sources_
MESetCollection MEs_
Definition: DQWorker.h:78