Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 09:26:48

0001 #!/usr/bin/env @PYTHON_INTERPRETER_BINARY@
0002 """
0003 
0004 DD4hep simulation with some argument parsing
0005 Based on M. Frank and F. Gaede runSim.py
0006    @author  A.Sailer
0007    @version 0.1
0008 
0009 """
0010 from __future__ import absolute_import, unicode_literals
0011 import logging
0012 import sys
0013 
0014 from DDSim.DD4hepSimulation import DD4hepSimulation
0015 
0016 
0017 if __name__ == "__main__":
0018   logging.basicConfig(format='%(name)-16s %(levelname)s %(message)s', level=logging.INFO, stream=sys.stdout)
0019   logger = logging.getLogger('DDSim')
0020 
0021   RUNNER = DD4hepSimulation()
0022   RUNNER.parseOptions()
0023 
0024   try:
0025     sys.exit(RUNNER.run())
0026   except NameError as e:
0027     if "global name" in str(e):
0028       globalToSet = str(e).split("'")[1]
0029       logger.fatal("Unknown global variable, please add\nglobal %s\nto your steeringFile" % globalToSet)