Skip to content

Commit

Permalink
DD4hepSimulation: ah, check for not self is desirable
Browse files Browse the repository at this point in the history
Should help in case when steering is defined with a name other than "SIM", then, without this, depending on the dict ordering it may be overtaken by "SIM". We don't want that.
  • Loading branch information
veprbl authored Jan 4, 2025
1 parent 59bdf35 commit da9f99b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion DDG4/python/DDSim/DD4hepSimulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def readSteeringFile(self):
sFileTemp = self.steeringFile
exec(compile(io.open(self.steeringFile).read(), self.steeringFile, 'exec'), globs, locs)
for _name, obj in locs.items():
if isinstance(obj, DD4hepSimulation):
if isinstance(obj, DD4hepSimulation) and obj is not self:
self.__dict__ = obj.__dict__
self.steeringFile = os.path.abspath(sFileTemp)

Expand Down

0 comments on commit da9f99b

Please sign in to comment.