CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
cmsDriver Namespace Reference

Functions

def run
 

Function Documentation

def cmsDriver.run ( )

Definition at line 5 of file cmsDriver.py.

References mergeVDriftHistosByStation.file, cmsDriverOptions.OptionsFromCommandLine(), and split.

5 
6 def run():
7  import sys
8  import os
9  import Configuration.Applications
10  from Configuration.Applications.ConfigBuilder import ConfigBuilder
11  from Configuration.Applications.cmsDriverOptions import OptionsFromCommandLine
12  options = OptionsFromCommandLine()
13 
14  # after cleanup of all config parameters pass it to the ConfigBuilder
15  configBuilder = ConfigBuilder(options, with_output = True, with_input = True)
16  configBuilder.prepare()
17  # fetch the results and write it to file
18  config = file(options.python_filename,"w")
19  config.write(configBuilder.pythonCfgCode)
20  config.close()
21 
22  # handle different dump options
23  if options.dump_python:
24  result = {}
25  execfile(options.python_filename, result)
26  process = result["process"]
27  expanded = process.dumpPython()
28  expandedFile = file(options.python_filename,"w")
29  expandedFile.write(expanded)
30  expandedFile.close()
31  print "Expanded config file", options.python_filename, "created"
32  sys.exit(0)
33 
34  if options.no_exec_flag:
35  print "Config file "+options.python_filename+ " created"
36  sys.exit(0)
37  else:
38  commandString = options.prefix+" cmsRun "+options.suffix
39  print "Starting "+commandString+' '+options.python_filename
40  commands = commandString.lstrip().split()
41  os.execvpe(commands[0],commands+[options.python_filename],os.environ)
42  sys.exit()
43 
44 run()
45 
46 
47 
def run
Definition: cmsDriver.py:5
double split
Definition: MVATrainer.cc:139