Go to the documentation of this file.00001
00002
00003
00004
00005 def run():
00006 import sys
00007 import os
00008 import Configuration.PyReleaseValidation
00009 from Configuration.PyReleaseValidation.ConfigBuilder import ConfigBuilder
00010 from Configuration.PyReleaseValidation.cmsDriverOptions import OptionsFromCommandLine
00011 options = OptionsFromCommandLine()
00012
00013
00014 configBuilder = ConfigBuilder(options, with_output = True, with_input = True)
00015 configBuilder.prepare()
00016
00017 config = file(options.python_filename,"w")
00018 config.write(configBuilder.pythonCfgCode)
00019 config.close()
00020
00021
00022 if options.dump_python:
00023 result = {}
00024 execfile(options.python_filename, result)
00025 process = result["process"]
00026 expanded = process.dumpPython()
00027 expandedFile = file(options.python_filename,"w")
00028 expandedFile.write(expanded)
00029 expandedFile.close()
00030 print "Expanded config file", options.python_filename, "created"
00031 sys.exit(0)
00032
00033 if options.no_exec_flag:
00034 print "Config file "+options.python_filename+ " created"
00035 sys.exit(0)
00036 else:
00037 commandString = options.prefix+" cmsRun "+options.suffix
00038 print "Starting "+commandString+' '+options.python_filename
00039 commands = commandString.lstrip().split()
00040 os.execvpe(commands[0],commands+[options.python_filename],os.environ)
00041 sys.exit()
00042
00043 run()
00044
00045
00046