10 import Configuration.Applications
11 from Configuration.Applications.ConfigBuilder
import ConfigBuilder
16 configBuilder =
ConfigBuilder(options, with_output =
True, with_input =
True)
24 if hasattr( options,
"era" )
and options.era
is not None :
25 from Configuration.StandardSequences.Eras
import eras
26 for eraName
in options.era.split(
',') :
27 getattr( eras, eraName )._setChosen()
29 configBuilder.prepare()
31 config = open(options.python_filename,
"w")
32 config.write(configBuilder.pythonCfgCode)
36 if options.dump_python:
38 exec(open(options.python_filename).
read(), result)
39 process = result[
"process"]
40 expanded = process.dumpPython()
41 expandedFile = open(options.python_filename,
"w")
42 expandedFile.write(expanded)
44 print(
"Expanded config file", options.python_filename,
"created")
47 if options.no_exec_flag:
48 print(
"Config file "+options.python_filename+
" created")
51 commandString = options.prefix+
" cmsRun "+options.suffix
52 print(
"Starting "+commandString+
' '+options.python_filename)
53 commands = commandString.lstrip().
split()
54 os.execvpe(commands[0],commands+[options.python_filename],os.environ)
def OptionsFromCommandLine
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)