Skip to content

Commit

Permalink
ReadEDM4hep: allow sio extension
Browse files Browse the repository at this point in the history
  • Loading branch information
andresailer committed Jan 8, 2025
1 parent 1e71124 commit c0d7f63
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions DDG4/python/DDSim/DD4hepSimulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit c0d7f63

Please sign in to comment.