diff --git a/DDG4/python/DDSim/DD4hepSimulation.py b/DDG4/python/DDSim/DD4hepSimulation.py index 4fd0f2b51..29b9d5350 100644 --- a/DDG4/python/DDSim/DD4hepSimulation.py +++ b/DDG4/python/DDSim/DD4hepSimulation.py @@ -45,12 +45,18 @@ ".hepmc3", ".hepmc3.gz", ".hepmc3.xz", ".hepmc3.bz2", ".hepmc3.tree.root", ] -POSSIBLEINPUTFILES = [ +EDM4HEP_INPUT_EXTENSIONS = [ + ".root", + ".sio", + ] +POSSIBLEINPUTFILES = ([ ".stdhep", ".slcio", ".HEPEvt", ".hepevt", ".pairs", ".hepmc", - ".root", - ] + HEPMC3_SUPPORTED_EXTENSIONS + ] + + HEPMC3_SUPPORTED_EXTENSIONS + + EDM4HEP_INPUT_EXTENSIONS +) class DD4hepSimulation(object): @@ -446,7 +452,7 @@ def run(self): gen = DDG4.GeneratorAction(kernel, "Geant4InputAction/GuineaPig%d" % index) gen.Input = "Geant4EventReaderGuineaPig|" + inputFile gen.Parameters = self.guineapig.getParameters() - elif inputFile.endswith(".root"): + elif inputFile.endswith(tuple(EDM4HEP_INPUT_EXTENSIONS)): gen = DDG4.GeneratorAction(kernel, "Geant4InputAction/EDM4hep%d" % index) gen.Input = "EDM4hepFileReader|" + inputFile else: