From f8814d7c0c1a8c317979a6c770f9e2ce639e83ec Mon Sep 17 00:00:00 2001 From: Frank Gaede <frank.gaede@desy.de> Date: Mon, 22 May 2017 16:57:10 +0200 Subject: [PATCH] use std::isnan() in Geant4EventReaderGuineaPig --- DDG4/plugins/Geant4EventReaderGuineaPig.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/DDG4/plugins/Geant4EventReaderGuineaPig.cpp b/DDG4/plugins/Geant4EventReaderGuineaPig.cpp index a2be174e5..f01d6d878 100644 --- a/DDG4/plugins/Geant4EventReaderGuineaPig.cpp +++ b/DDG4/plugins/Geant4EventReaderGuineaPig.cpp @@ -187,13 +187,13 @@ Geant4EventReaderGuineaPig::readParticles(int /* event_number */, >> posX >> posY >> posZ ; - if( Energy != Energy || - betaX != betaX || - betaY != betaY || - betaZ != betaZ || - posX != posX || - posY != posY || - posZ != posZ ){ + if( std::isnan( Energy ) || + std::isnan( betaX ) || + std::isnan( betaY ) || + std::isnan( betaZ ) || + std::isnan( posX ) || + std::isnan( posY ) || + std::isnan( posZ ) ){ printout(WARNING,"EventReader","### Read line with 'nan' entries - particle will be ignored ! " ) ; -- GitLab