29 hSystFractionVsLS(nullptr) {
30 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest") <<
"[DTBlockedROChannelsTest]: Constructor";
41 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
42 <<
"DataIntegrityTest: analyzed " <<
nupdates <<
" updates";
54 bool tenDDU = !
mapping->
readOutToGeometry(779, 7, 1, 1, 1,
dummy,
dummy,
dummy,
dummy,
dummy,
dummy);
58 for (
int mapSlot = 1; mapSlot != 13; ++mapSlot) {
63 if (crate == 1370 && mapSlot > 5)
65 if ((mapSlot == 5 || mapSlot == 11) &&
link > 11)
72 int dduId =
theDDU(crate, mapSlot,
link, tenDDU);
87 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
88 <<
"[DTLinkBinsMap] FED: " << crate <<
"mapSlot: " << mapSlot <<
" Link: " <<
link
89 <<
" not in the mapping!" << endl;
99 for (
int ros = 1; ros != 13; ++ros) {
100 for (
int rob = 1; rob != 26; ++rob) {
104 if (!
mapping->
readOutToGeometry(dduId, ros, rob - 1, 0, 2,
wheel,
station, sector,
dummy,
dummy,
dummy) ||
105 !
mapping->
readOutToGeometry(dduId, ros, rob - 1, 0, 16,
wheel,
station, sector,
dummy,
dummy,
dummy)) {
113 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
114 <<
"[DTRobBinsMap] FED: " << dduId <<
" ROS " << ros <<
" ROB: " << rob - 1 <<
" not in the mapping!"
121 for (map<DTChamberId, DTRobBinsMap>::iterator chAndRobs =
chamberMap.begin(); chAndRobs !=
chamberMap.end();
123 chAndRobs->second.init(
false);
139 summaryHisto = ibooker.
book2D(
"ROChannelSummary",
"Summary Blocked RO Channels", 12, 1, 13, 5, -2, 3);
144 stringstream namestream;
145 namestream <<
"ROChannelSummary_W" <<
wheel;
146 stringstream titlestream;
147 titlestream <<
"Blocked RO Channels (Wh " <<
wheel <<
")";
148 wheelHistos[
wheel] = ibooker.
book2D(namestream.str().c_str(), titlestream.str().c_str(), 12, 1, 13, 4, 1, 5);
182 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
183 <<
"[DTBlockedROChannelsTest]: End of LS " <<
nLumiSegs
184 <<
". Client called in online mode, performing client operations";
194 LogTrace(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
195 <<
"[DTBlockedROChannelsTest] endRun called. Client called in offline mode, performing operations.";
207 if (procEvt !=
nullptr) {
228 for (map<DTChamberId, DTLinkBinsMap>::iterator chAndLinks =
chamberMapUros.begin();
233 int sectorForPlot = chId.
sector();
234 if (sectorForPlot == 13 || (sectorForPlot == 4 && chId.
station() == 4)) {
237 }
else if (sectorForPlot == 14 || (sectorForPlot == 10 && chId.
station() == 4)) {
243 double chPercent = (*chAndLinks).second.getChamberPercentage(igetter);
245 totalPerc += chPercent *
scale * 1. /
254 for (map<DTChamberId, DTRobBinsMap>::iterator chAndRobs =
chamberMap.begin(); chAndRobs !=
chamberMap.end();
258 int sectorForPlot = chId.
sector();
259 if (sectorForPlot == 13 || (sectorForPlot == 4 && chId.
station() == 4)) {
262 }
else if (sectorForPlot == 14 || (sectorForPlot == 10 && chId.
station() == 4)) {
268 double chPercent = (*chAndRobs).second.getChamberPercentage(igetter);
270 totalPerc += chPercent *
scale * 1. /
288 return mapping->
readOutToGeometry(dduId, ros, rob, 2, 2,
wheel,
station, sector,
dummy,
dummy,
dummy);
292 : rosBin(ros), init_(
true), rosValue(0) {
296 mename <<
"DT/00-DataIntegrity/FED" << fed <<
"/ROS" << ros <<
"/FED" << fed <<
"_ROS" << ros <<
"_ROSError";
300 whname <<
"DT/00-DataIntegrity/FED" << fed <<
"/FED" << fed <<
"_ROSStatus";
319 value += (
int)meROS->getBinContent(9, robBin);
320 value += (
int)meROS->getBinContent(11, robBin);
328 value += (
int)meDDU->getBinContent(2, rosBin);
329 value += (
int)meDDU->getBinContent(10, rosBin);
336 if (robsAndValues.find(robBin) == robsAndValues.end()) {
337 LogWarning(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
338 <<
"[DTRobBinsMap]***Error: ROB: " << robBin <<
" is not valid" << endl;
342 int newValue = getValueRobBin(robBin);
343 if (newValue > robsAndValues[robBin]) {
344 robsAndValues[robBin] = newValue;
351 meROS = igetter.
get(rosHName);
352 meDDU = igetter.
get(dduHName);
353 int nChangedROBs = 0;
356 int newValue = getValueRos();
357 if (newValue > rosValue) {
362 for (map<int, int>::const_iterator robAndValue = robsAndValues.begin(); robAndValue != robsAndValues.end();
364 if (robChanged((*robAndValue).first))
367 return 1. - ((double)nChangedROBs / (
double)robsAndValues.size());
371 meROS = igetter.
get(rosHName);
372 meDDU = igetter.
get(dduHName);
374 rosValue = getValueRos();
375 for (map<int, int>::const_iterator robAndValue = robsAndValues.begin(); robAndValue != robsAndValues.end();
377 robChanged((*robAndValue).first);
384 int wheel = (ddu - 770) % 5 - 2;
387 urosHName =
"DT/00-DataIntegrity/Wheel" + to_string(
wheel) +
"/ROS" + to_string(ros) +
"/W" + to_string(
wheel) +
388 "_ROS" + to_string(ros) +
"_ROSError";
397 linksAndValues[linkBin] = getValueLinkBin(linkBin);
405 value += (
int)meuROS->getBinContent(5, linkBin);
412 if (linksAndValues.find(linkBin) == linksAndValues.end()) {
413 LogWarning(
"DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
414 <<
"[DTLinkBinsMap]***Error: Link: " << linkBin <<
" is not valid" << endl;
418 int newValue = getValueLinkBin(linkBin);
419 if (newValue > linksAndValues[linkBin]) {
420 linksAndValues[linkBin] = newValue;
427 meuROS = igetter.
get(urosHName);
428 int nChangedLinks = 0;
430 for (map<int, int>::const_iterator linkAndValue = linksAndValues.begin(); linkAndValue != linksAndValues.end();
432 if (linkChanged((*linkAndValue).first))
435 return 1. - ((double)nChangedLinks / (
double)linksAndValues.size());
439 meuROS = igetter.
get(urosHName);
441 for (map<int, int>::const_iterator linkAndValue = linksAndValues.begin(); linkAndValue != linksAndValues.end();
443 linkChanged((*linkAndValue).first);
473 if (ros > 6 && tenDDU && ddu < 775)
483 int ros = (
link / 24) + 3 * (slot % 6) - 2;