CMS 3D CMS Logo

SelectiveReadoutClient.cc
Go to the documentation of this file.
2 
4 
5 #include <cmath>
6 
7 namespace ecaldqm {
9 
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  }
90 
92 } // namespace ecaldqm
ecaldqm
Definition: DQWorker.h:24
ecaldqm::MESet::ConstBin::getBinContent
double getBinContent() const
Definition: MESet.h:164
EcalTrigTowerDetId
Definition: EcalTrigTowerDetId.h:14
ecaldqm::MESet::const_iterator::toNextChannel
const_iterator & toNextChannel()
Definition: MESet.cc:404
ecaldqm::MESet::Bin::setBinContent
void setBinContent(double _content)
Definition: MESet.h:215
ecaldqm::SelectiveReadoutClient
Definition: SelectiveReadoutClient.h:8
ecaldqm::SelectiveReadoutClient::producePlots
void producePlots(ProcessType) override
Definition: SelectiveReadoutClient.cc:10
EcalTrigTowerDetId::kSizeForDenseIndexing
Definition: EcalTrigTowerDetId.h:119
ecaldqm::DQWorkerClient::ProcessType
ProcessType
Definition: DQWorkerClient.h:15
ecaldqm::SelectiveReadoutClient::SelectiveReadoutClient
SelectiveReadoutClient()
Definition: SelectiveReadoutClient.cc:8
ecaldqm::DQWorker::MEs_
MESetCollection MEs_
Definition: DQWorker.h:78
ecaldqm::DQWorkerClient::sources_
MESetCollection sources_
Definition: DQWorkerClient.h:55
ecaldqm::MESetCollection::at
MESet & at(const std::string &key)
Definition: MESet.h:362
ecaldqm::MESet::iterator
Definition: MESet.h:268
ecaldqm::DQWorkerClient
Definition: DQWorkerClient.h:13
ecaldqm::MESet::const_iterator
Definition: MESet.h:245
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
SelectiveReadoutClient.h
EcalTrigTowerDetId::detIdFromDenseIndex
static EcalTrigTowerDetId detIdFromDenseIndex(uint32_t di)
Definition: EcalTrigTowerDetId.cc:104
dqmMemoryStats.total
total
Definition: dqmMemoryStats.py:152
DEFINE_ECALDQM_WORKER
#define DEFINE_ECALDQM_WORKER(TYPE)
Definition: DQWorker.h:112
EcalDQMCommonUtils.h
ecaldqm::MESet
Definition: MESet.h:27