5 from __future__
import print_function
9 import Configuration.Applications
10 from Configuration.Applications.ConfigBuilder
import ConfigBuilder
15 configBuilder =
ConfigBuilder(options, with_output =
True, with_input =
True)
23 if hasattr( options,
"era" )
and options.era
is not None :
24 from Configuration.StandardSequences.Eras
import eras
25 for eraName
in options.era.split(
',') :
26 getattr( eras, eraName )._setChosen()
28 configBuilder.prepare()
30 config =
file(options.python_filename,
"w")
31 config.write(configBuilder.pythonCfgCode)
35 if options.dump_python:
37 execfile(options.python_filename, result)
38 process = result[
"process"]
39 expanded = process.dumpPython()
40 expandedFile =
file(options.python_filename,
"w")
41 expandedFile.write(expanded)
43 print(
"Expanded config file", options.python_filename,
"created")
46 if options.no_exec_flag:
47 print(
"Config file "+options.python_filename+
" created")
50 commandString = options.prefix+
" cmsRun "+options.suffix
51 print(
"Starting "+commandString+
' '+options.python_filename)
52 commands = commandString.lstrip().
split()
53 os.execvpe(commands[0],commands+[options.python_filename],os.environ)
def OptionsFromCommandLine()
S & print(S &os, JobReport::InputFile const &f)