8 import Configuration.Applications
9 from Configuration.Applications.ConfigBuilder
import ConfigBuilder
14 configBuilder =
ConfigBuilder(options, with_output =
True, with_input =
True)
22 if hasattr( options,
"era" )
and options.era
is not None :
23 from Configuration.StandardSequences.Eras
import eras
24 for eraName
in options.era.split(
',') :
25 getattr( eras, eraName )._setChosen()
27 configBuilder.prepare()
29 config =
file(options.python_filename,
"w")
30 config.write(configBuilder.pythonCfgCode)
34 if options.dump_python:
36 execfile(options.python_filename, result)
37 process = result[
"process"]
38 expanded = process.dumpPython()
39 expandedFile =
file(options.python_filename,
"w")
40 expandedFile.write(expanded)
42 print "Expanded config file", options.python_filename,
"created" 45 if options.no_exec_flag:
46 print "Config file "+options.python_filename+
" created" 49 commandString = options.prefix+
" cmsRun "+options.suffix
50 print "Starting "+commandString+
' '+options.python_filename
51 commands = commandString.lstrip().
split()
52 os.execvpe(commands[0],commands+[options.python_filename],os.environ)
def OptionsFromCommandLine()