From 9e01779a665389f328410c5708c649b12bfffc0b Mon Sep 17 00:00:00 2001
From: Markus Frank <markus.frank@cern.ch>
Date: Fri, 9 Oct 2015 08:33:53 +0000
Subject: [PATCH] Fix C++98 problem

---
 DDG4/src/Geant4Plugins.cpp          | 1 +
 DDG4/src/Geant4Random.cpp           | 2 +-
 doc/CompileAllOptionPermutations.sh | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/DDG4/src/Geant4Plugins.cpp b/DDG4/src/Geant4Plugins.cpp
index 7d58fd1a1..9fb288a7b 100644
--- a/DDG4/src/Geant4Plugins.cpp
+++ b/DDG4/src/Geant4Plugins.cpp
@@ -30,6 +30,7 @@
 #include "G4VPhysicsConstructor.hh"
 #include "G4ParticleDefinition.hh"
 #include "G4VUserPhysicsList.hh"
+#include "G4VPrimaryGenerator.hh"
 
 DD4HEP_IMPLEMENT_PLUGIN_REGISTRY(G4VSensitiveDetector*, (std::string,DD4hep::Geometry::LCDD*))
 DD4HEP_IMPLEMENT_PLUGIN_REGISTRY(DD4hep::Simulation::Geant4Sensitive*, (DD4hep::Simulation::Geant4Context*,
diff --git a/DDG4/src/Geant4Random.cpp b/DDG4/src/Geant4Random.cpp
index bdb7aee11..ad663c8bf 100644
--- a/DDG4/src/Geant4Random.cpp
+++ b/DDG4/src/Geant4Random.cpp
@@ -137,7 +137,7 @@ Geant4Random* Geant4Random::instance(bool throw_exception)   {
 /// Initialize the instance. 
 void Geant4Random::initialize()   {
   if ( !m_file.empty() )  {
-    ifstream in(m_file);
+    ifstream in(m_file.c_str(), std::ios::in);
     m_engine = CLHEP::EngineFactory::newEngine(in);
     if ( !m_engine )    {
       except("Failed to create CLHEP random engine from file:%s.",m_file.c_str());
diff --git a/doc/CompileAllOptionPermutations.sh b/doc/CompileAllOptionPermutations.sh
index d062e8d87..cbfd717dd 100755
--- a/doc/CompileAllOptionPermutations.sh
+++ b/doc/CompileAllOptionPermutations.sh
@@ -5,8 +5,8 @@ INSTALL_G4=${SW}/g4_10.01.p02_dbg/lib/Geant4-10.1.2;
 INSTALL_LCIO=${SW}/lcio/v02-04-03;
 INSTALL_XERCESC=${SW}/xercesc;
 CHECKOUT=${dir_name}/../../DD4hep.trunk/checkout;
-export ROOTSYS=${SW}/root_v5.34.25_dbg;
 export ROOTSYS=${SW}/root_v6.04.00_dbg;
+export ROOTSYS=${SW}/root_v5.34.25_dbg;
 . ${ROOTSYS}/bin/thisroot.sh;
 #cat ${ROOTSYS}/bin/thisroot.sh;
 #
-- 
GitLab