From a5fc6430458f6647e1952058da09e6745a75a86c Mon Sep 17 00:00:00 2001
From: luisaleperez <luis_alejanro.perez_perez@iphc.cnrs.fr>
Date: Fri, 20 Jan 2017 11:45:15 +0100
Subject: [PATCH] Adding new guinea-pig event plugin

---
 DDSim/DD4hepSimulation.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/DDSim/DD4hepSimulation.py b/DDSim/DD4hepSimulation.py
index dde0460c3..e35a5881b 100644
--- a/DDSim/DD4hepSimulation.py
+++ b/DDSim/DD4hepSimulation.py
@@ -15,7 +15,7 @@ try:
 except ImportError:
   ARGCOMPLETEENABLED=False
 
-POSSIBLEINPUTFILES = (".stdhep", ".slcio", ".HEPEvt", ".hepevt", ".hepmc")
+POSSIBLEINPUTFILES = (".stdhep", ".slcio", ".HEPEvt", ".hepevt", ".hepmc", ".pairs")
 
 def outputLevel( level ):
   """return INT for outputlevel"""
@@ -362,6 +362,9 @@ class DD4hepSimulation(object):
       elif inputFile.endswith(".hepmc"):
         gen = DDG4.GeneratorAction(kernel,"Geant4InputAction/hepmc%d" % index)
         gen.Input="Geant4EventReaderHepMC|"+inputFile
+      elif inputFile.endswith(".pairs"):
+        gen = DDG4.GeneratorAction(kernel,"Geant4InputAction/HEPEvt%d" % index)
+        gen.Input="Geant4EventReaderGuineaPig|"+inputFile
       else:
         ##this should never happen because we already check at the top, but in case of some LogicError...
         raise RuntimeError( "Unknown input file type: %s" % inputFile )
-- 
GitLab