Skip to content

Commit

Permalink
Merge pull request #38317 from pmandrik/patch-7
Browse files Browse the repository at this point in the history
[12_4_X] Fix ThroughputServiceClient.cc unsigned variables overflow
  • Loading branch information
cmsbuild committed Jun 11, 2022
2 parents 667de6e + 2b621f9 commit a27901b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions HLTrigger/Timer/plugins/ThroughputServiceClient.cc
Expand Up @@ -121,12 +121,12 @@ void ThroughputServiceClient::fillSummaryPlots(DQMStore::IBooker &booker, DQMSto
width = avg_max - avg_min;

// define the range for .../average_sourced
uint64_t first = sourced->FindFirstBinAbove(0.);
uint64_t last = sourced->FindLastBinAbove(0.);
int64_t first = sourced->FindFirstBinAbove(0.);
int64_t last = sourced->FindLastBinAbove(0.);
booker.setCurrentFolder(folder);
// (re)book and fill .../average_sourced
average = booker.book1D("average_sourced", "Throughput (sourced events)", (int)width, avg_min, avg_max)->getTH1F();
for (unsigned int i = first; i <= last; ++i)
for (int64_t i = std::max(first, (int64_t)0); i <= last; ++i)
average->Fill(sourced->GetBinContent(i));

// define the range for .../average_retired
Expand All @@ -135,7 +135,7 @@ void ThroughputServiceClient::fillSummaryPlots(DQMStore::IBooker &booker, DQMSto
booker.setCurrentFolder(folder);
// (re)book and fill .../average_retired
average = booker.book1D("average_retired", "Throughput (retired events)", (int)width, avg_min, avg_max)->getTH1F();
for (unsigned int i = first; i <= last; ++i)
for (int64_t i = std::max(first, (int64_t)0); i <= last; ++i)
average->Fill(retired->GetBinContent(i));
}
}
Expand Down

0 comments on commit a27901b

Please sign in to comment.