|
26 | 26 | #include <TCanvas.h> |
27 | 27 | #include <TList.h> |
28 | 28 | #include <TMath.h> |
29 | | -#include <TPaveText.h> |
30 | 29 | #include <TLine.h> |
31 | 30 | #include <iostream> |
32 | 31 | #include <fstream> |
@@ -199,7 +198,7 @@ Quality DigitsCheck::check(std::map<std::string, std::shared_ptr<MonitorObject>> |
199 | 198 |
|
200 | 199 | if (matchHistName(mo->getName(), mGoodChanFracRatioHistName)) { |
201 | 200 | TH1F* h = getHisto<TH1F>(mo); |
202 | | - if (h) { |
| 201 | + if (h && h->GetEntries() > 0) { |
203 | 202 | auto q = checkBadChannelsRatio(h); |
204 | 203 | mQualityChecker.addCheckResult(q); |
205 | 204 | } |
@@ -265,31 +264,12 @@ void DigitsCheck::beautify(std::shared_ptr<MonitorObject> mo, Quality checkResul |
265 | 264 | h->SetDrawOption("colz"); |
266 | 265 | h->SetMinimum(mRatePlotScaleMin); |
267 | 266 | h->SetMaximum(mRatePlotScaleMax); |
268 | | - TPaveText* msg = new TPaveText(0.1, 0.9, 0.9, 0.95, "NDC"); |
269 | | - h->GetListOfFunctions()->Add(msg); |
270 | | - msg->SetName(Form("%s_msg", mo->GetName())); |
271 | | - msg->SetBorderSize(0); |
272 | 267 |
|
273 | 268 | if (checkResult == Quality::Good) { |
274 | | - msg->Clear(); |
275 | | - msg->AddText("All occupancies within limits: OK!!!"); |
276 | | - msg->SetFillColor(kGreen); |
277 | | - |
278 | 269 | h->SetFillColor(kGreen); |
279 | 270 | } else if (checkResult == Quality::Bad) { |
280 | | - LOG(info) << "Quality::Bad, setting to red"; |
281 | | - // |
282 | | - msg->Clear(); |
283 | | - msg->AddText("Call MCH experts"); |
284 | | - msg->SetFillColor(kRed); |
285 | | - |
286 | 271 | h->SetFillColor(kRed); |
287 | 272 | } else if (checkResult == Quality::Medium) { |
288 | | - LOG(info) << "Quality::medium, setting to orange"; |
289 | | - |
290 | | - msg->Clear(); |
291 | | - msg->AddText("No entries. If MCH in the run, call MCH experts"); |
292 | | - msg->SetFillColor(kYellow); |
293 | 273 | h->SetFillColor(kOrange); |
294 | 274 | } |
295 | 275 | h->SetLineColor(kBlack); |
@@ -362,33 +342,11 @@ void DigitsCheck::beautify(std::shared_ptr<MonitorObject> mo, Quality checkResul |
362 | 342 | h->GetListOfFunctions()->Add(l); |
363 | 343 | } |
364 | 344 |
|
365 | | - h->SetFillColor(kGreen); |
366 | | - |
367 | | - TPaveText* msg = new TPaveText(0.1, 0.903, 0.9, 0.945, "NDC"); |
368 | | - h->GetListOfFunctions()->Add(msg); |
369 | | - msg->SetName(Form("%s_msg", mo->GetName())); |
370 | | - msg->SetBorderSize(0); |
371 | | - |
372 | 345 | if (checkResult == Quality::Good) { |
373 | | - msg->Clear(); |
374 | | - msg->AddText("All occupancies within limits: OK!!!"); |
375 | | - msg->SetFillColor(kGreen); |
376 | | - |
377 | 346 | h->SetFillColor(kGreen); |
378 | 347 | } else if (checkResult == Quality::Bad) { |
379 | | - LOG(info) << "Quality::Bad, setting to red"; |
380 | | - // |
381 | | - msg->Clear(); |
382 | | - msg->AddText("Call MCH experts"); |
383 | | - msg->SetFillColor(kRed); |
384 | | - |
385 | 348 | h->SetFillColor(kRed); |
386 | 349 | } else if (checkResult == Quality::Medium) { |
387 | | - LOG(info) << "Quality::medium, setting to orange"; |
388 | | - |
389 | | - msg->Clear(); |
390 | | - msg->AddText("No entries. If MCH in the run, call MCH experts"); |
391 | | - msg->SetFillColor(kYellow); |
392 | 350 | h->SetFillColor(kOrange); |
393 | 351 | } |
394 | 352 | h->SetLineColor(kBlack); |
@@ -442,33 +400,11 @@ void DigitsCheck::beautify(std::shared_ptr<MonitorObject> mo, Quality checkResul |
442 | 400 | h->GetListOfFunctions()->Add(l); |
443 | 401 | } |
444 | 402 |
|
445 | | - h->SetFillColor(kGreen); |
446 | | - |
447 | | - TPaveText* msg = new TPaveText(0.1, 0.903, 0.9, 0.945, "NDC"); |
448 | | - h->GetListOfFunctions()->Add(msg); |
449 | | - msg->SetName(Form("%s_msg", mo->GetName())); |
450 | | - msg->SetBorderSize(0); |
451 | | - |
452 | 403 | if (checkResult == Quality::Good) { |
453 | | - msg->Clear(); |
454 | | - msg->AddText("All occupancies within limits: OK!!!"); |
455 | | - msg->SetFillColor(kGreen); |
456 | | - |
457 | 404 | h->SetFillColor(kGreen); |
458 | 405 | } else if (checkResult == Quality::Bad) { |
459 | | - LOG(info) << "Quality::Bad, setting to red"; |
460 | | - // |
461 | | - msg->Clear(); |
462 | | - msg->AddText("Call MCH experts"); |
463 | | - msg->SetFillColor(kRed); |
464 | | - |
465 | 406 | h->SetFillColor(kRed); |
466 | 407 | } else if (checkResult == Quality::Medium) { |
467 | | - LOG(info) << "Quality::medium, setting to orange"; |
468 | | - |
469 | | - msg->Clear(); |
470 | | - msg->AddText("No entries. If MCH in the run, call MCH experts"); |
471 | | - msg->SetFillColor(kYellow); |
472 | 408 | h->SetFillColor(kOrange); |
473 | 409 | } |
474 | 410 | h->SetLineColor(kBlack); |
|
0 commit comments