diff --git a/DDG4/python/DDSim/DD4hepSimulation.py b/DDG4/python/DDSim/DD4hepSimulation.py index ea4895bd26d1b377dd112b471180abc08828f5cd..0e5f584aeafea45b32f6ee1129e058269bc5b420 100644 --- a/DDG4/python/DDSim/DD4hepSimulation.py +++ b/DDG4/python/DDSim/DD4hepSimulation.py @@ -6,7 +6,7 @@ Based on M. Frank and F. Gaede runSim.py @version 0.1 """ -from __future__ import absolute_import, unicode_literals, division +from __future__ import absolute_import, unicode_literals, division, print_function __RCSID__ = "$Id$" import sys import os @@ -635,7 +635,8 @@ SIM = DD4hepSimulation() else: steeringFileBase += "SIM.%s = %s" % (parName, str(parameter)) steeringFileBase += "\n" - logger.info("%s", steeringFileBase) + for line in steeringFileBase.splitlines(): + print(line) def _consistencyChecks(self): """Check if the requested setup makes sense, or if there is something preventing it from working correctly diff --git a/DDG4/python/DDSim/Helper/ConfigHelper.py b/DDG4/python/DDSim/Helper/ConfigHelper.py index 8eb4e62c8b7484e7e5309d68a1f2a3fe45695bbe..d52c3f033793ba9c745d3e789baab5b7fae5346e 100644 --- a/DDG4/python/DDSim/Helper/ConfigHelper.py +++ b/DDG4/python/DDSim/Helper/ConfigHelper.py @@ -53,10 +53,10 @@ class ConfigHelper(object): return self.printOptions() def printOptions(self): - """print all paramters""" + """print all parameters""" options = [] for opt, val in six.iteritems(self.getOptions()): - options.append("\n\t'%s': '%s'" % (opt, val[0])) + options.append("\n\t'%s': '%s'" % (opt, val['default'])) return "".join(options) def setOption(self, name, val): diff --git a/DDG4/python/DDSim/bin/ddsim.py b/DDG4/python/DDSim/bin/ddsim.py index 200ad8d1fa0e2d703a6dc62098f6617962900777..bb525318812f0bbad9aa3bd83625119a0a3518f4 100755 --- a/DDG4/python/DDSim/bin/ddsim.py +++ b/DDG4/python/DDSim/bin/ddsim.py @@ -14,12 +14,12 @@ from DDSim.DD4hepSimulation import DD4hepSimulation if __name__ == "__main__": - RUNNER = DD4hepSimulation() - RUNNER.parseOptions() - logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.INFO) logger = logging.getLogger('DDSim') + RUNNER = DD4hepSimulation() + RUNNER.parseOptions() + try: RUNNER.run() except NameError as e: