Replaced isnan with TMath::IsNaN and isinf with !TMath::Finite, since
authorcholm <cholm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 20 Sep 2007 07:37:13 +0000 (07:37 +0000)
committercholm <cholm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 20 Sep 2007 07:37:13 +0000 (07:37 +0000)
it seems that GCC 4.0 on MacOSX does not have those functions (sic).
Thanks to Boris Hippolyte.

FMD/flow/AliFMDFlowEventPlane.cxx

index bfdecb6..69a97f0 100644 (file)
@@ -2,6 +2,7 @@
     @brief Implementation of an EventPlane class */
 #include "flow/AliFMDFlowEventPlane.h"
 #include "flow/AliFMDFlowUtil.h"
+#include <TMath.h>
 // #include <cmath>
 #ifndef _GNU_SOURCE
 extern "C" 
@@ -32,7 +33,8 @@ AliFMDFlowEventPlane::Add(Double_t phi, Double_t weight)
   Double_t a = NormalizeAngle(fOrder * phi);
   Double_t s, c;
   sincos(a, &s, &c);
-  if (isnan(s) || isinf(s) || isnan(c) || isinf(s)) return;
+  if (TMath::IsNaN(s) || !TMath::Finite(s) || 
+      TMath::IsNaN(c) || !TMath::Finite(s)) return;
   fSumSinMPhi += weight * s;
   fSumCosMPhi += weight * c;
 }
@@ -50,7 +52,8 @@ AliFMDFlowEventPlane::Psi(Double_t phi, Double_t w) const
   Double_t a = NormalizeAngle(fOrder * phi);
   Double_t s, c;
   sincos(a, &s, &c);
-  if (isnan(s) || isinf(s) || isnan(c) || isinf(s)) return Psi();
+  if (TMath::IsNaN(s) || !TMath::Finite(s) || 
+      TMath::IsNaN(c) || !TMath::Finite(s)) return Psi();
   Double_t psi = DoPsi(fSumSinMPhi - w * s, fSumCosMPhi - w * c);
   return psi;
 }