diff --git a/DDG4/python/DDSim/DD4hepSimulation.py b/DDG4/python/DDSim/DD4hepSimulation.py index 50b258792955c4c56bab9f880f05f00c766e1604..b42b59b8e3565a29925817e576e3a820fb9abbff 100644 --- a/DDG4/python/DDSim/DD4hepSimulation.py +++ b/DDG4/python/DDSim/DD4hepSimulation.py @@ -7,9 +7,10 @@ Based on M. Frank and F. Gaede runSim.py """ from __future__ import absolute_import, unicode_literals, division, print_function -__RCSID__ = "$Id$" -import sys + import os +import sys +import traceback from DDSim.Helper.Meta import Meta from DDSim.Helper.LCIO import LCIO from DDSim.Helper.HepMC3 import HepMC3 @@ -250,6 +251,9 @@ class DD4hepSimulation(object): self._consistencyChecks() + if self.printLevel <= 2: # VERBOSE or DEBUG + logger.setLevel(logging.DEBUG) + # self.__treatUnknownArgs( parsed, unknown ) self.__parseAllHelper(parsed) if self._errorMessages and not (self._dumpParameter or self._dumpSteeringFile): @@ -570,6 +574,8 @@ class DD4hepSimulation(object): obj.setOption(var, parsedDict[key]) except RuntimeError as e: self._errorMessages.append("ERROR: %s " % e) + if logger.level <= logging.DEBUG: + self._errorMessages.append(traceback.format_exc()) def __checkOutputLevel(self, level): """return outputlevel as int so we don't have to import anything for faster startup"""