Skip to content

Commit

Permalink
DDSim: allow EDM4hep File reader
Browse files Browse the repository at this point in the history
  • Loading branch information
andresailer committed Dec 13, 2024
1 parent cb5cf31 commit 0969e1f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions DDG4/python/DDSim/DD4hepSimulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
".stdhep", ".slcio", ".HEPEvt", ".hepevt",
".pairs",
".hepmc",
".root",
] + HEPMC3_SUPPORTED_EXTENSIONS


Expand Down Expand Up @@ -445,6 +446,9 @@ def run(self):
gen = DDG4.GeneratorAction(kernel, "Geant4InputAction/GuineaPig%d" % index)
gen.Input = "Geant4EventReaderGuineaPig|" + inputFile
gen.Parameters = self.guineapig.getParameters()
elif inputFile.endswith(".root"):
gen = DDG4.GeneratorAction(kernel, "Geant4InputAction/EDM4hep%d" % index)
gen.Input = "EDM4hepFileReader|" + 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)
Expand Down

0 comments on commit 0969e1f

Please sign in to comment.