Skip to content

Commit 3861373

Browse files
committed
[QC-509] Clear warnings (#576)
1 parent d1af35d commit 3861373

4 files changed

Lines changed: 14 additions & 19 deletions

File tree

Modules/ITS/src/ITSClusterCheck.cxx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,9 @@ void ITSClusterCheck::configure(std::string) {}
3131

3232
Quality ITSClusterCheck::check(std::map<std::string, std::shared_ptr<MonitorObject>>* moMap)
3333
{
34-
auto mo = moMap->begin()->second;
3534
Quality result = Quality::Null;
3635
std::map<std::string, std::shared_ptr<MonitorObject>>::iterator iter;
37-
for (iter = moMap->begin(); iter != moMap->end(); iter++) {
36+
for (iter = moMap->begin(); iter != moMap->end(); ++iter) {
3837
if (iter->second->getName() == "Layer0/AverageClusterSize") {
3938
auto* h = dynamic_cast<TH2D*>(iter->second->getObject());
4039
if (h->GetMaximum() > 30) {
@@ -52,13 +51,13 @@ std::string ITSClusterCheck::getAcceptedType() { return "TH2D"; }
5251
void ITSClusterCheck::beautify(std::shared_ptr<MonitorObject> mo, Quality checkResult)
5352
{
5453
auto* h = dynamic_cast<TH2D*>(mo->getObject());
55-
TText* tInfo;
54+
auto* tInfo = new TText();
5655

5756
if (checkResult == Quality::Good) {
58-
tInfo = new TText(0.1, 0.8, "Quality::GOOD");
57+
tInfo->SetText(0.1, 0.8, "Quality::GOOD");
5958
tInfo->SetTextColor(kGreen);
6059
} else if (checkResult == Quality::Bad) {
61-
tInfo = new TText(0.1, 0.8, "Quality::BAD");
60+
tInfo->SetText(0.1, 0.8, "Quality::BAD");
6261
tInfo->SetTextColor(kRed);
6362
}
6463
tInfo->SetTextSize(17);

Modules/ITS/src/ITSFeeCheck.cxx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,9 @@ void ITSFeeCheck::configure(std::string) {}
3030

3131
Quality ITSFeeCheck::check(std::map<std::string, std::shared_ptr<MonitorObject>>* moMap)
3232
{
33-
auto mo = moMap->begin()->second;
3433
Quality result = Quality::Null;
3534
std::map<std::string, std::shared_ptr<MonitorObject>>::iterator iter;
36-
for (iter = moMap->begin(); iter != moMap->end(); iter++) {
35+
for (iter = moMap->begin(); iter != moMap->end(); ++iter) {
3736
if (iter->second->getName() == "LaneStatus/laneStatusFlagFAULT") {
3837
auto* h = dynamic_cast<TH2I*>(iter->second->getObject());
3938
if (h->GetMaximum() > 0) {
@@ -51,13 +50,13 @@ std::string ITSFeeCheck::getAcceptedType() { return "TH2I"; }
5150
void ITSFeeCheck::beautify(std::shared_ptr<MonitorObject> mo, Quality checkResult)
5251
{
5352
auto* h = dynamic_cast<TH2I*>(mo->getObject());
54-
TText* tInfo;
53+
auto* tInfo = new TText();
5554

5655
if (checkResult == Quality::Good) {
57-
tInfo = new TText(0.1, 0.8, "Quality::GOOD");
56+
tInfo->SetText(0.1, 0.8, "Quality::GOOD");
5857
tInfo->SetTextColor(kGreen);
5958
} else if (checkResult == Quality::Bad) {
60-
tInfo = new TText(0.1, 0.8, "Quality::BAD");
59+
tInfo->SetText(0.1, 0.8, "Quality::BAD");
6160
tInfo->SetTextColor(kRed);
6261
}
6362
tInfo->SetTextSize(17);

Modules/ITS/src/ITSFhrCheck.cxx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,9 @@ void ITSFhrCheck::configure(std::string) {}
3030

3131
Quality ITSFhrCheck::check(std::map<std::string, std::shared_ptr<MonitorObject>>* moMap)
3232
{
33-
auto mo = moMap->begin()->second;
3433
Quality result = Quality::Null;
3534
std::map<std::string, std::shared_ptr<MonitorObject>>::iterator iter;
36-
for (iter = moMap->begin(); iter != moMap->end(); iter++) {
35+
for (iter = moMap->begin(); iter != moMap->end(); ++iter) {
3736
if (iter->second->getName() == "General/ErrorPlots") {
3837
auto* h = dynamic_cast<TH1D*>(iter->second->getObject());
3938
if (h->GetMaximum() > 0) {
@@ -51,7 +50,7 @@ std::string ITSFhrCheck::getAcceptedType() { return "TH1"; }
5150
void ITSFhrCheck::beautify(std::shared_ptr<MonitorObject> mo, Quality checkResult)
5251
{
5352
auto* h = dynamic_cast<TH1D*>(mo->getObject());
54-
TPaveText* msg = new TPaveText(0.5, 0.5, 0.9, 0.75, "NDC");
53+
auto* msg = new TPaveText(0.5, 0.5, 0.9, 0.75, "NDC");
5554
msg->SetName(Form("%s_msg", mo->GetName()));
5655
if (checkResult == Quality::Good) {
5756
msg->Clear();

Modules/ITS/src/ITSTrackCheck.cxx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#include "QualityControl/MonitorObject.h"
1919
#include "QualityControl/Quality.h"
2020

21-
#include <fairlogger/Logger.h>
2221
#include <TList.h>
2322
#include <TH1.h>
2423
#include <TText.h>
@@ -30,10 +29,9 @@ void ITSTrackCheck::configure(std::string) {}
3029

3130
Quality ITSTrackCheck::check(std::map<std::string, std::shared_ptr<MonitorObject>>* moMap)
3231
{
33-
auto mo = moMap->begin()->second;
3432
Quality result = Quality::Null;
3533
std::map<std::string, std::shared_ptr<MonitorObject>>::iterator iter;
36-
for (iter = moMap->begin(); iter != moMap->end(); iter++) {
34+
for (iter = moMap->begin(); iter != moMap->end(); ++iter) {
3735
if (iter->second->getName() == "NClusters") {
3836
auto* h = dynamic_cast<TH1D*>(iter->second->getObject());
3937
if (h->GetMean() > 8) {
@@ -51,13 +49,13 @@ std::string ITSTrackCheck::getAcceptedType() { return "TH1D"; }
5149
void ITSTrackCheck::beautify(std::shared_ptr<MonitorObject> mo, Quality checkResult)
5250
{
5351
auto* h = dynamic_cast<TH1D*>(mo->getObject());
54-
TText* tInfo;
52+
auto* tInfo = new TText();
5553

5654
if (checkResult == Quality::Good) {
57-
tInfo = new TText(0.1, 0.8, "Quality::GOOD");
55+
tInfo->SetText(0.1, 0.8, "Quality::GOOD");
5856
tInfo->SetTextColor(kGreen);
5957
} else if (checkResult == Quality::Bad) {
60-
tInfo = new TText(0.1, 0.8, "Quality::BAD");
58+
tInfo->SetText(0.1, 0.8, "Quality::BAD");
6159
tInfo->SetTextColor(kRed);
6260
}
6361
tInfo->SetTextSize(17);

0 commit comments

Comments
 (0)