Skip to content

Commit 8a64c7d

Browse files
committed
[roottest] use std::fabs in fascloningeventtree tests
1 parent e522dff commit 8a64c7d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

roottest/root/tree/fastcloningeventtree/dt_RunDrawTest.C

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include "TBranchElement.h"
1010

1111
#include <iostream>
12+
#include <cmath>
1213

1314
#include "dt_DrawTest.C"
1415

@@ -40,9 +41,9 @@ Int_t HistCompare(TH1 *ref, TH1 *comp)
4041

4142
Float_t xrange = ref->GetXaxis()->GetXmax() - ref->GetXaxis()->GetXmin();
4243
if (xrange==0) { fprintf(stderr,"no range for %s\n",ref->GetName()); return -4; }
43-
if (xrange>0.0001 && TMath::Abs((mean1-mean2)/xrange) > 0.001) return -1;
44-
if (mean2> 0.0001 && TMath::Abs((mean1-mean2)/mean2) > 0.01) return -2;
45-
if (rms1 > 0.0001 && TMath::Abs((rms1-rms2)/rms1) > 0.0001) return -3;
44+
if (xrange>0.0001 && std::fabs((mean1-mean2)/xrange) > 0.001) return -1;
45+
if (mean2> 0.0001 && std::fabs((mean1-mean2)/mean2) > 0.01) return -2;
46+
if (rms1 > 0.0001 && std::fabs((rms1-rms2)/rms1) > 0.0001) return -3;
4647
return n1*factor-n2;
4748
}
4849

0 commit comments

Comments
 (0)