25 :
nevents(0), neventsPrev(0), prevNLumiSegs(0), prevTotalPerc(0), hSystFractionVsLS(nullptr) {
26 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest") <<
"[DTBlockedROChannelsTest]: Constructor";
37 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
38 <<
"DataIntegrityTest: analyzed " <<
nupdates <<
" updates";
50 bool tenDDU = !
mapping->
readOutToGeometry(779, 7, 1, 1, 1,
dummy,
dummy,
dummy,
dummy,
dummy,
dummy);
54 for (
int mapSlot = 1; mapSlot != 13; ++mapSlot) {
59 if (crate == 1370 && mapSlot > 5)
61 if ((mapSlot == 5 || mapSlot == 11) &&
link > 11)
68 int dduId =
theDDU(crate, mapSlot,
link, tenDDU);
83 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
84 <<
"[DTLinkBinsMap] FED: " << crate <<
"mapSlot: " << mapSlot <<
" Link: " <<
link
85 <<
" not in the mapping!" << endl;
95 for (
int ros = 1; ros != 13; ++ros) {
96 for (
int rob = 1; rob != 26; ++rob) {
100 if (!
mapping->
readOutToGeometry(dduId, ros, rob - 1, 0, 2,
wheel,
station, sector,
dummy,
dummy,
dummy) ||
101 !
mapping->
readOutToGeometry(dduId, ros, rob - 1, 0, 16,
wheel,
station, sector,
dummy,
dummy,
dummy)) {
109 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
110 <<
"[DTRobBinsMap] FED: " << dduId <<
" ROS " << ros <<
" ROB: " << rob - 1 <<
" not in the mapping!"
117 for (map<DTChamberId, DTRobBinsMap>::iterator chAndRobs =
chamberMap.begin(); chAndRobs !=
chamberMap.end();
119 chAndRobs->second.init(
false);
135 summaryHisto = ibooker.
book2D(
"ROChannelSummary",
"Summary Blocked RO Channels", 12, 1, 13, 5, -2, 3);
140 stringstream namestream;
141 namestream <<
"ROChannelSummary_W" <<
wheel;
142 stringstream titlestream;
143 titlestream <<
"Blocked RO Channels (Wh " <<
wheel <<
")";
144 wheelHistos[
wheel] = ibooker.
book2D(namestream.str().c_str(), titlestream.str().c_str(), 12, 1, 13, 4, 1, 5);
178 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
179 <<
"[DTBlockedROChannelsTest]: End of LS " <<
nLumiSegs
180 <<
". Client called in online mode, performing client operations";
190 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
191 <<
"[DTBlockedROChannelsTest] endRun called. Client called in offline mode, performing operations.";
203 if (procEvt !=
nullptr) {
224 for (map<DTChamberId, DTLinkBinsMap>::iterator chAndLinks =
chamberMapUros.begin();
229 int sectorForPlot = chId.
sector();
230 if (sectorForPlot == 13 || (sectorForPlot == 4 && chId.
station() == 4)) {
233 }
else if (sectorForPlot == 14 || (sectorForPlot == 10 && chId.
station() == 4)) {
239 double chPercent = (*chAndLinks).second.getChamberPercentage(igetter);
241 totalPerc += chPercent *
scale * 1. /
250 for (map<DTChamberId, DTRobBinsMap>::iterator chAndRobs =
chamberMap.begin(); chAndRobs !=
chamberMap.end();
254 int sectorForPlot = chId.
sector();
255 if (sectorForPlot == 13 || (sectorForPlot == 4 && chId.
station() == 4)) {
258 }
else if (sectorForPlot == 14 || (sectorForPlot == 10 && chId.
station() == 4)) {
264 double chPercent = (*chAndRobs).second.getChamberPercentage(igetter);
266 totalPerc += chPercent *
scale * 1. /
284 return mapping->
readOutToGeometry(dduId, ros, rob, 2, 2,
wheel,
station, sector,
dummy,
dummy,
dummy);
288 : rosBin(ros), init_(
true), rosValue(0) {
292 mename <<
"DT/00-DataIntegrity/FED" << fed <<
"/ROS" << ros <<
"/FED" << fed <<
"_ROS" << ros <<
"_ROSError";
296 whname <<
"DT/00-DataIntegrity/FED" << fed <<
"/FED" << fed <<
"_ROSStatus";
315 value += (
int)meROS->getBinContent(9, robBin);
316 value += (
int)meROS->getBinContent(11, robBin);
324 value += (
int)meDDU->getBinContent(2, rosBin);
325 value += (
int)meDDU->getBinContent(10, rosBin);
332 if (robsAndValues.find(robBin) == robsAndValues.end()) {
333 LogWarning(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
334 <<
"[DTRobBinsMap]***Error: ROB: " << robBin <<
" is not valid" << endl;
338 int newValue = getValueRobBin(robBin);
339 if (newValue > robsAndValues[robBin]) {
340 robsAndValues[robBin] = newValue;
347 meROS = igetter.
get(rosHName);
348 meDDU = igetter.
get(dduHName);
349 int nChangedROBs = 0;
352 int newValue = getValueRos();
353 if (newValue > rosValue) {
358 for (map<int, int>::const_iterator robAndValue = robsAndValues.begin(); robAndValue != robsAndValues.end();
360 if (robChanged((*robAndValue).first))
363 return 1. - ((double)nChangedROBs / (
double)robsAndValues.size());
367 meROS = igetter.
get(rosHName);
368 meDDU = igetter.
get(dduHName);
370 rosValue = getValueRos();
371 for (map<int, int>::const_iterator robAndValue = robsAndValues.begin(); robAndValue != robsAndValues.end();
373 robChanged((*robAndValue).first);
380 int wheel = (ddu - 770) % 5 - 2;
383 urosHName =
"DT/00-DataIntegrity/Wheel" + to_string(
wheel) +
"/ROS" + to_string(ros) +
"/W" + to_string(
wheel) +
384 "_ROS" + to_string(ros) +
"_ROSError";
393 linksAndValues[linkBin] = getValueLinkBin(linkBin);
401 value += (
int)meuROS->getBinContent(5, linkBin);
408 if (linksAndValues.find(linkBin) == linksAndValues.end()) {
409 LogWarning(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
410 <<
"[DTLinkBinsMap]***Error: Link: " << linkBin <<
" is not valid" << endl;
414 int newValue = getValueLinkBin(linkBin);
415 if (newValue > linksAndValues[linkBin]) {
416 linksAndValues[linkBin] = newValue;
423 meuROS = igetter.
get(urosHName);
424 int nChangedLinks = 0;
426 for (map<int, int>::const_iterator linkAndValue = linksAndValues.begin(); linkAndValue != linksAndValues.end();
428 if (linkChanged((*linkAndValue).first))
431 return 1. - ((double)nChangedLinks / (
double)linksAndValues.size());
435 meuROS = igetter.
get(urosHName);
437 for (map<int, int>::const_iterator linkAndValue = linksAndValues.begin(); linkAndValue != linksAndValues.end();
439 linkChanged((*linkAndValue).first);
469 if (ros > 6 && tenDDU && ddu < 775)
479 int ros = (
link / 24) + 3 * (slot % 6) - 2;