From 32f749683bc3152f71174e9b85a038ffadbbbe44 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck <wdconinc@gmail.com> Date: Tue, 30 Aug 2022 12:00:33 -0500 Subject: [PATCH] feat: support `--runType qt` --- DDG4/python/DDSim/DD4hepSimulation.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/DDG4/python/DDSim/DD4hepSimulation.py b/DDG4/python/DDSim/DD4hepSimulation.py index b42b59b8e..1c7990b7f 100644 --- a/DDG4/python/DDSim/DD4hepSimulation.py +++ b/DDG4/python/DDSim/DD4hepSimulation.py @@ -108,9 +108,6 @@ class DD4hepSimulation(object): self._argv = None - # use TCSH geant UI instead of QT - os.environ['G4UI_USE_TCSH'] = "1" - def readSteeringFile(self): """Reads a steering file and sets the parameters to that of the DD4hepSimulation object present in the steering file. @@ -152,10 +149,11 @@ class DD4hepSimulation(object): default=ConfigHelper.makeList(self.compactFile), type=str, help="The compact XML file, or multiple compact files, if the last one is the closer.") - parser.add_argument("--runType", action="store", choices=("batch", "vis", "run", "shell"), default=self.runType, + parser.add_argument("--runType", action="store", choices=("batch", "vis", "run", "shell", "qt"), default=self.runType, help="The type of action to do in this invocation" # Note: implicit string concatenation "\nbatch: just simulate some events, needs numberOfEvents, and input file or gun" "\nvis: enable visualisation, run the macroFile if it is set" + "\nqt: enable visualisation in Qt shell, run the macroFile if it is set" "\nrun: run the macroFile and exit" "\nshell: enable interactive session") @@ -324,6 +322,8 @@ class DD4hepSimulation(object): if self.runType == "vis": simple.setupUI(typ="csh", vis=True, macro=self.macroFile) + elif self.runType == "qt": + simple.setupUI(typ="qt", vis=True, macro=self.macroFile) elif self.runType == "run": simple.setupUI(typ="csh", vis=False, macro=self.macroFile, ui=False) elif self.runType == "shell": -- GitLab