Commit in slic on MAIN
include/LcioMcpManager.hh+9-11.42 -> 1.43
src/LcioMcpManager.cc+7-11.57 -> 1.58
+16-2
2 modified files
Add globally accessible x-platform NaN value from sqrt(-1).

slic/include
LcioMcpManager.hh 1.42 -> 1.43
diff -u -r1.42 -r1.43
--- LcioMcpManager.hh	22 Sep 2005 21:38:58 -0000	1.42
+++ LcioMcpManager.hh	7 Oct 2005 21:05:59 -0000	1.43
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/slic/include/LcioMcpManager.hh,v 1.42 2005/09/22 21:38:58 jeremy Exp $
+// $Header: /cvs/lcd/slic/include/LcioMcpManager.hh,v 1.43 2005/10/07 21:05:59 jeremy Exp $
 #ifndef slic_LcioMcpManager_hh
 #define slic_LcioMcpManager_hh 1
 
@@ -108,6 +108,11 @@
 
     void beginEvent(const G4Event* anEvent);
 
+    double getNoChargeFlag() const
+    {
+      return NO_CHARGE_FLAG;
+    }
+
   private:
 
     // clear the maps
@@ -145,6 +150,9 @@
 
     bool m_enablePrintFinal;
     bool m_enablePrintInitial;
+
+  public:
+    static const double NO_CHARGE_FLAG;
   };
 };
 

slic/src
LcioMcpManager.cc 1.57 -> 1.58
diff -u -r1.57 -r1.58
--- LcioMcpManager.cc	22 Sep 2005 21:39:06 -0000	1.57
+++ LcioMcpManager.cc	7 Oct 2005 21:05:59 -0000	1.58
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/slic/src/LcioMcpManager.cc,v 1.57 2005/09/22 21:39:06 jeremy Exp $
+// $Header: /cvs/lcd/slic/src/LcioMcpManager.cc,v 1.58 2005/10/07 21:05:59 jeremy Exp $
 #include "LcioMcpManager.hh"
 
 // slic
@@ -22,6 +22,7 @@
 
 // std
 #include <sstream>
+#include <cmath>
 
 using IMPL::MCParticleImpl;
 using EVENT::LCCollection;
@@ -38,6 +39,8 @@
 
   LcioMcpManager* LcioMcpManager::m_instance = 0;
 
+  const double LcioMcpManager::NO_CHARGE_FLAG = std::sqrt((double)-1.0);
+
   LcioMcpManager::~LcioMcpManager()
   {}
 
@@ -66,6 +69,9 @@
 
     /* Create the MCParticle data maps object. */
     m_maps = new LcioMcpMaps(this);
+
+    /* Check NO_CHARGE_FLAG == NaN */
+    assert( NO_CHARGE_FLAG != NO_CHARGE_FLAG );
   }
 
   void LcioMcpManager::endEvent(const G4Event* event)
CVSspam 0.2.8