From 2ec4aaf76a1cb6cb26d8d02843d04f787fa116dd Mon Sep 17 00:00:00 2001
From: Andre Sailer <andre.philippe.sailer@cern.ch>
Date: Fri, 25 Sep 2015 15:04:43 +0000
Subject: [PATCH] HepMCReader: error is when the file is not open

---
 DDG4/plugins/Geant4EventReaderHepMC.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/DDG4/plugins/Geant4EventReaderHepMC.cpp b/DDG4/plugins/Geant4EventReaderHepMC.cpp
index 0d8cf4f0e..b76d5705a 100644
--- a/DDG4/plugins/Geant4EventReaderHepMC.cpp
+++ b/DDG4/plugins/Geant4EventReaderHepMC.cpp
@@ -30,7 +30,7 @@ namespace DD4hep {
     /// Class to populate Geant4 primaries from StdHep files.
     /**
      * Class to populate Geant4 primary particles and vertices from a
-     * file in HEPEvt format (ASCII)
+     * file in HepMC format (ASCII)
      *
      *  \author  P.Kostka (main author)
      *  \author  M.Frank  (code reshuffeling into new DDG4 scheme)
@@ -163,7 +163,7 @@ Geant4EventReaderHepMC::Geant4EventReaderHepMC(const string& nam)
 {
   // Now open the input file:
   m_input.open(nam.c_str(),BOOST_IOS::in|BOOST_IOS::binary);
-  if ( m_input.is_open() )   {
+  if ( not m_input.is_open() )   {
     string err = "+++ Geant4EventReaderHepMC: Failed to open input stream:"+nam+
       " Error:"+string(strerror(errno));
     throw runtime_error(err);
-- 
GitLab