Skip to content

Commit

Permalink
DDSim: add signalhandler by default, add disableSignalHandler flag to…
Browse files Browse the repository at this point in the history
… turn it off
  • Loading branch information
andresailer committed Oct 24, 2024
1 parent 2cd6f85 commit 1e432d5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions DDG4/python/DDSim/DD4hepSimulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ def __init__(self):
self.vertexSigma = [0.0, 0.0, 0.0, 0.0]
self.vertexOffset = [0.0, 0.0, 0.0, 0.0]
self.enableDetailedShowerMode = False
self.disableSignalHandler = False

self._errorMessages = []
self._dumpParameter = False
Expand Down Expand Up @@ -208,6 +209,10 @@ def parseOptions(self, argv=None):
default=self.enableDetailedShowerMode,
help="use detailed shower mode")

parser.add_argument("--disableSignalHandler", action="store_true", dest="disableSignalHandler",
default=self.disableSignalHandler,
help="disable the Signal Handler of DD4hep")

parser.add_argument("--dumpSteeringFile", action="store_true", dest="dumpSteeringFile",
default=self._dumpSteeringFile, help="print an example steering file to stdout")

Expand Down Expand Up @@ -317,6 +322,8 @@ def run(self):
# simple = DDG4.Geant4( kernel, tracker='Geant4TrackerAction',calo='Geant4CalorimeterAction')
# geant4 = DDG4.Geant4( kernel, tracker='Geant4TrackerCombineAction',calo='Geant4ScintillatorCalorimeterAction')
geant4 = DDG4.Geant4(kernel, tracker=self.action.tracker, calo=self.action.calo)
if not self.disableSignalHandler:
geant4.registerInterruptHandler()

geant4.printDetectors()

Expand Down

0 comments on commit 1e432d5

Please sign in to comment.