Skip to content

Commit

Permalink
fix: DD4hepSimulation expected compactFile be a list (#1324)
Browse files Browse the repository at this point in the history
If you give a single string it iterates over the characters. This might
depend on the DD4hep version.
  • Loading branch information
paulgessinger authored Jul 15, 2022
1 parent c6fb62f commit a7f7b41
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Examples/Python/tests/test_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,10 @@ def generate_input_test_edm4hep_simhit_reader(input, output):
from DDSim.DD4hepSimulation import DD4hepSimulation

ddsim = DD4hepSimulation()
ddsim.compactFile = input
if isinstance(ddsim.compactFile, list):
ddsim.compactFile = [input]
else:
ddsim.compactFile = input
ddsim.enableGun = True
ddsim.gun.direction = (1, 0, 0)
ddsim.gun.distribution = "eta"
Expand Down

0 comments on commit a7f7b41

Please sign in to comment.