Skip to content

Commit f2f41e2

Browse files
committed
round
1 parent 197ebdb commit f2f41e2

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

TimingAnalyzer/macros/Common.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1093,7 +1093,7 @@ namespace Common
10931093
{
10941094
TString output = "";
10951095

1096-
if (err >= 5.0) output = Form("$%i \\pm %i$",Int_t(val),Int_t(err));
1096+
if (err >= 5.0) output = Form("$%i \\pm %i$",Int_t(std::round(val)),Int_t(std::round(err)));
10971097
else if (err < 5.0 && err >= 1.0) output = Form("$%.1f \\pm %.1f$",val,err);
10981098
else
10991099
{

TimingAnalyzer/macros/Common.hh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include "TText.h"
2121

2222
// STL includes
23+
#include <cmath>
2324
#include <map>
2425
#include <vector>
2526
#include <string>

TimingAnalyzer/macros/test_macros/betterDiagnostics.C

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ TString PrintValueAndError(const Double_t val, const Double_t err)
5151
{
5252
TString output = "";
5353

54-
if (err >= 5.0) output = Form("$%i \\pm %i$",Int_t(val),Int_t(err));
54+
if (err >= 5.0) output = Form("$%i \\pm %i$",Int_t(std::round(val)),Int_t(std::round(err)));
5555
else if (err < 5.0 && err >= 1.0) output = Form("$%.1f \\pm %.1f$",val,err);
5656
else
5757
{

0 commit comments

Comments
 (0)