Skip to content

Commit 0bec003

Browse files
committed
GPU QA: Fix colors when writing histograms to ROOT files
1 parent d71cef8 commit 0bec003

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

GPU/GPUTracking/qa/GPUQA.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2027,11 +2027,11 @@ int32_t GPUQA::DrawQAHistograms(TObjArray* qcout)
20272027
}
20282028

20292029
std::vector<Color_t> colorNums(COLORCOUNT);
2030-
if (!qcout) {
2030+
if (!(qcout || mConfig.writeRootFiles)) {
20312031
[[maybe_unused]] static int32_t initColorsInitialized = initColors();
20322032
}
20332033
for (int32_t i = 0; i < COLORCOUNT; i++) {
2034-
colorNums[i] = qcout ? defaultColorNums[i] : mColors[i]->GetNumber();
2034+
colorNums[i] = (qcout || mConfig.writeRootFiles) ? defaultColorNums[i] : mColors[i]->GetNumber();
20352035
}
20362036

20372037
bool mcAvail = mcPresent();
@@ -2288,7 +2288,7 @@ int32_t GPUQA::DrawQAHistograms(TObjArray* qcout)
22882288
continue;
22892289
}
22902290
e->SetMarkerColor(kBlack);
2291-
e->SetLineColor(colorNums[(l == 2 ? (ConfigNumInputs * 2 + k) : (k * 2 + l)) % COLORCOUNT]);
2291+
e->SetLineColor(colorNums[(k * 3 + l) % COLORCOUNT]);
22922292
e->GetHistogram()->GetYaxis()->SetRangeUser(-0.02, 1.02);
22932293
e->Draw(k || l ? "same P" : "AP");
22942294
if (j == 0) {

0 commit comments

Comments
 (0)