DQM
EcalMonitorClient
src
SelectiveReadoutClient.cc
Go to the documentation of this file.
1
#include "
DQM/EcalMonitorClient/interface/SelectiveReadoutClient.h
"
2
3
#include "
DQM/EcalCommon/interface/EcalDQMCommonUtils.h
"
4
5
#include <cmath>
6
7
namespace
ecaldqm
{
8
SelectiveReadoutClient::SelectiveReadoutClient
() :
DQWorkerClient
() {}
9
10
void
SelectiveReadoutClient::producePlots
(
ProcessType
) {
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) {
77
EcalTrigTowerDetId
id
(
EcalTrigTowerDetId::detIdFromDenseIndex
(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
}
91
92
DEFINE_ECALDQM_WORKER
(
SelectiveReadoutClient
);
93
}
// namespace ecaldqm
ecaldqm
Definition:
DQWorker.h:29
ecaldqm::MESet::ConstBin::getBinContent
double getBinContent() const
Definition:
MESet.h:192
ecaldqm::MESet::const_iterator::toNextChannel
const_iterator & toNextChannel(EcalElectronicsMapping const *)
Definition:
MESet.cc:413
EcalTrigTowerDetId
Definition:
EcalTrigTowerDetId.h:14
ecaldqm::DQWorker::GetElectronicsMap
const EcalElectronicsMapping * GetElectronicsMap()
Definition:
DQWorker.cc:104
ecaldqm::MESet::Bin::setBinContent
void setBinContent(double _content)
Definition:
MESet.h:243
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:104
ecaldqm::DQWorkerClient::sources_
MESetCollection sources_
Definition:
DQWorkerClient.h:55
ecaldqm::MESetCollection::at
MESet & at(const std::string &key)
Definition:
MESet.h:399
ecaldqm::MESet::iterator
Definition:
MESet.h:297
ecaldqm::DQWorkerClient
Definition:
DQWorkerClient.h:13
ecaldqm::DQWorker::getEcalDQMSetupObjects
const EcalDQMSetupObjects getEcalDQMSetupObjects()
Definition:
DQWorker.cc:128
ecaldqm::MESet::const_iterator
Definition:
MESet.h:273
triggerObjects_cff.id
id
Definition:
triggerObjects_cff.py:29
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:141
EcalDQMCommonUtils.h
ecaldqm::MESet
Definition:
MESet.h:42
Generated for CMSSW Reference Manual by
1.8.16