From 018525f69087de3f37f31ad67e923bf52c51fdda Mon Sep 17 00:00:00 2001
From: Andre Sailer <andre.philippe.sailer@cern.ch>
Date: Thu, 7 Jan 2016 16:01:18 +0000
Subject: [PATCH] Fix for event ID in case events are skipped

---
 DDG4/src/Geant4InputAction.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/DDG4/src/Geant4InputAction.cpp b/DDG4/src/Geant4InputAction.cpp
index ea852a26a..ed699f350 100644
--- a/DDG4/src/Geant4InputAction.cpp
+++ b/DDG4/src/Geant4InputAction.cpp
@@ -143,6 +143,9 @@ void Geant4InputAction::operator()(G4Event* event)   {
   Geant4PrimaryEvent*       prim = evt.extension<Geant4PrimaryEvent>();
 
   int result = readParticles(event->GetEventID(),primaries);
+
+  event->SetEventID( m_firstEvent + event->GetEventID() );
+
   if ( result != Geant4EventReader::EVENT_READER_OK )   {    // handle I/O error, but how?
     return;
   }
-- 
GitLab