Commit in slic on MAIN
include/StdHepToLcioConvertor.hh+3-21.13 -> 1.14
src/StdHepToLcioConvertor.cc+10-41.23 -> 1.24
+13-6
2 modified files
Fix compile problem with NaN on Cygwin.

slic/include
StdHepToLcioConvertor.hh 1.13 -> 1.14
diff -u -r1.13 -r1.14
--- StdHepToLcioConvertor.hh	22 Sep 2005 21:39:00 -0000	1.13
+++ StdHepToLcioConvertor.hh	6 Oct 2005 08:49:39 -0000	1.14
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/slic/include/StdHepToLcioConvertor.hh,v 1.13 2005/09/22 21:39:00 jeremy Exp $
+// $Header: /cvs/lcd/slic/include/StdHepToLcioConvertor.hh,v 1.14 2005/10/06 08:49:39 jeremy Exp $
 #ifndef slic_StdHepToLcioConvertor_hh
 #define slic_StdHepToLcioConvertor_hh
 
@@ -57,12 +57,13 @@
     void addMcpDaughter( int dauIdx, IMPL::MCParticleImpl* parMcp, EVENT::LCCollection* );
     void addMcpParent( int parIdx, IMPL::MCParticleImpl* parMcp, EVENT::LCCollection* );
 
-  public:
+  private:
 
     EVENT::LCCollection* m_currentMcpColl;
     lStdHep* m_reader;
 
     static const double c_light_NO_CLHEP;
+    double NO_CHARGE;
   };
 };
 

slic/src
StdHepToLcioConvertor.cc 1.23 -> 1.24
diff -u -r1.23 -r1.24
--- StdHepToLcioConvertor.cc	22 Sep 2005 21:39:08 -0000	1.23
+++ StdHepToLcioConvertor.cc	6 Oct 2005 08:49:39 -0000	1.24
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/slic/src/StdHepToLcioConvertor.cc,v 1.23 2005/09/22 21:39:08 jeremy Exp $
+// $Header: /cvs/lcd/slic/src/StdHepToLcioConvertor.cc,v 1.24 2005/10/06 08:49:39 jeremy Exp $
 #include "StdHepToLcioConvertor.hh"
 
 // lcio
@@ -11,14 +11,14 @@
 
 // stl
 #include <iostream>
-#include <assert.h>
+#include <cassert>
 #include <cmath>
 
 // using
 using std::cerr;
 using std::cout;
 using std::endl;
-
+    
 using EVENT::LCIO;
 using EVENT::LCCollection;
 using IMPL::LCEventImpl;
@@ -34,6 +34,12 @@
     : m_reader(rdr)
   {
     assert( rdr );
+
+    /* Init invalid charge flag to NaN. */
+    NO_CHARGE = sqrt(-1.0);
+
+    /* Check it just in case. */
+    assert( NO_CHARGE != NO_CHARGE );
   }
 
   StdHepToLcioConvertor::StdHepToLcioConvertor()
@@ -161,7 +167,7 @@
       mcp->setCharge( pdef->GetPDGCharge() );
     }
     else {
-      mcp->setCharge( NAN );
+      mcp->setCharge( NO_CHARGE );
     }
 
     // momentum vec
CVSspam 0.2.8