112 std::map<EcalLogicID, MonCrystalConsistencyDat> crystalConsistencies;
113 std::map<EcalLogicID, MonTTConsistencyDat> towerConsistencies;
114 std::map<EcalLogicID, MonMemChConsistencyDat> memChannelConsistencies;
115 std::map<EcalLogicID, MonMemTTConsistencyDat> memTowerConsistencies;
117 MESet
const &digiME(
source_.at(
"Digi"));
118 MESet
const &gainME(
source_.at(
"Gain"));
119 MESet
const &chidME(
source_.at(
"ChId"));
120 MESet
const &gainswitchME(
source_.at(
"GainSwitch"));
121 MESet
const &qualityME(
source_.at(
"Quality"));
123 MESet
const &toweridME(
source_.at(
"TowerId"));
124 MESet
const &blocksizeME(
source_.at(
"BlockSize"));
125 MESet
const &l1aME(
source_.at(
"L1AFE"));
126 MESet
const &bxME(
source_.at(
"BXFE"));
128 MESet
const &memdigiME(
source_.at(
"MEMDigi"));
129 MESet
const &memchidME(
source_.at(
"MEMChId"));
130 MESet
const &memgainME(
source_.at(
"MEMGain"));
131 MESet
const &pnqualityME(
source_.at(
"PNQuality"));
133 MESet
const &memtoweridME(
source_.at(
"MEMTowerId"));
134 MESet
const &memblocksizeME(
source_.at(
"MEMBlockSize"));
139 MESet::const_iterator dEnd(digiME.end());
140 MESet::const_iterator qItr(qualityME);
141 for (MESet::const_iterator dItr(digiME.beginChannel()); dItr != dEnd; dItr.toNextChannel()) {
144 int nDigis(dItr->getBinContent());
145 int gain(gainME.getBinContent(
id));
146 int chid(chidME.getBinContent(
id));
147 int gainswitch(gainswitchME.getBinContent(
id));
150 if (
gain > 0 || chid > 0 || gainswitch > 0) {
152 data.setProcessedEvents(nDigis);
153 data.setProblematicEvents(
gain + chid + gainswitch);
155 data.setProblemsID(chid);
156 data.setProblemsGainSwitch(gainswitch);
158 int channelStatus(qItr->getBinContent());
159 bool channelBad(channelStatus ==
kBad || channelStatus ==
kMBad);
160 data.setTaskStatus(channelBad);
170 for (
unsigned iTower(1); iTower <= 68; ++iTower) {
177 bool towerBad(
false);
178 for (
unsigned iD(0); iD <
channels.size(); ++iD) {
179 int n(digiME.getBinContent(
channels[iD]));
182 int channelStatus(qualityME.getBinContent(
channels[iD]));
183 if (channelStatus ==
kBad || channelStatus ==
kMBad)
187 int towerid(toweridME.getBinContent(
eid));
188 int blocksize(blocksizeME.getBinContent(
eid));
189 int l1a(l1aME.getBinContent(iDCC + 1, iTower));
190 int bx(bxME.getBinContent(iDCC + 1, iTower));
192 if (towerid > 0 || blocksize > 0 || l1a > 0 ||
bx > 0) {
194 data.setProcessedEvents(nDigis);
195 data.setProblematicEvents(towerid + blocksize + l1a +
bx);
196 data.setProblemsID(towerid);
197 data.setProblemsSize(blocksize);
198 data.setProblemsLV1(l1a);
199 data.setProblemsBunchX(
bx);
200 data.setTaskStatus(towerBad);
208 edm::LogInfo(
"EcalDQM") <<
" Looping over MEM channels and towers";
210 for (
unsigned iMD(0); iMD <
memDCC.size(); ++iMD) {
211 unsigned iDCC(
memDCC[iMD]);
215 for (
unsigned iPN(1); iPN <= 10; ++iPN) {
218 int nDigis(memdigiME.getBinContent(pnid));
219 int memchid(memchidME.getBinContent(pnid));
220 int memgain(memgainME.getBinContent(pnid));
222 if (memchid > 0 || memgain > 0) {
225 data.setProcessedEvents(nDigis);
226 data.setProblematicEvents(memchid + memgain);
227 data.setProblemsID(memchid);
228 data.setProblemsGainZero(memgain);
230 int channelStatus(pnqualityME.getBinContent(pnid));
231 bool channelBad(channelStatus ==
kBad || channelStatus ==
kMBad);
232 data.setTaskStatus(channelBad);
238 for (
unsigned iTower(69); iTower <= 70; ++iTower) {
242 bool towerBad(
false);
243 for (
unsigned iPN(1); iPN <= 10; ++iPN) {
245 int n(memdigiME.getBinContent(pnid));
248 int channelStatus(pnqualityME.getBinContent(pnid));
249 if (channelStatus ==
kBad || channelStatus ==
kMBad)
253 int towerid(memtoweridME.getBinContent(
eid));
254 int blocksize(memblocksizeME.getBinContent(
eid));
256 if (towerid > 0 || blocksize > 0) {
259 data.setProcessedEvents(nDigis);
260 data.setProblematicEvents(towerid + blocksize);
261 data.setProblemsID(towerid);
262 data.setProblemsSize(blocksize);
263 data.setTaskStatus(towerBad);
274 if (!crystalConsistencies.empty()) {
279 if (!towerConsistencies.empty()) {
284 if (!memChannelConsistencies.empty()) {
289 if (!memTowerConsistencies.empty()) {
294 }
catch (std::runtime_error &
e) {
295 if (
std::string(e.what()).
find(
"unique constraint") != std::string::npos)
std::vector< unsigned > const memDCC
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
EcalElectronicsMapping const * getElectronicsMap()
bool ccuExists(unsigned, unsigned)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
EcalLogicID memChannelID(EcalPnDiodeDetId const &)
void insertDataArraySet(const std::map< EcalLogicID, DATT > *data, IOVT *iov) noexcept(false)
bool qualityOK(int _quality)
char data[epos_bytes_allocation]
EcalLogicID towerID(EcalElectronicsId const &)
EcalLogicID memTowerID(EcalElectronicsId const &)
EcalLogicID crystalID(DetId const &)