Package madgraph :: Package interface :: Module common_run_interface :: Class CommonRunCmd
[hide private]
[frames] | no frames]

Class CommonRunCmd

source code

                  object --+    
                           |    
                   HelpToCmd --+
                               |
                  object --+   |
                           |   |
            CheckValidForCmd --+
                               |
              object --+       |
                       |       |
   extended_cmd.CheckCmd --+   |
                           |   |
              object --+   |   |
                       |   |   |
    extended_cmd.HelpCmd --+   |
                           |   |
              object --+   |   |
                       |   |   |
extended_cmd.CompleteCmd --+   |
                           |   |
             cmd.Cmd --+   |   |
                       |   |   |
   extended_cmd.BasicCmd --+   |
                           |   |
            extended_cmd.Cmd --+
                               |
                              CommonRunCmd
Known Subclasses:

Nested Classes [hide private]

Inherited from extended_cmd.Cmd: ConfigurationError, InvalidCmd

Instance Methods [hide private]
 
__init__(self, me_dir, options, *args, **opts)
common
source code
 
add_error_log_in_html(self, errortype=None)
If a ME run is currently running add a link in the html output
source code
 
ask_edit_cards(self, cards, mode='fixed', plot=True, first_cmd=None) source code
 
check_param_card(self, path, run=True)
1) Check that no scan parameter are present 2) Check that all the width are define in the param_card.
source code
 
complete_check_events(self, text, line, begidx, endidx) source code
 
complete_compute_widths(self, text, line, begidx, endidx)
Complete the compute_widths command
source code
 
complete_decay_events(self, text, line, begidx, endidx) source code
 
complete_print_results(self, text, line, begidx, endidx)
Complete the print results command
source code
 
complete_reweight(self, text, line, begidx, endidx)
Complete the pythia command
source code
 
configure_run_mode(self, run_mode)
change the way to submit job 0: single core, 1: cluster, 2: multicore
source code
 
copy_lhapdf_set(self, lhaid_list, pdfsets_dir)
copy (if needed) the lhapdf set corresponding to the lhaid in lhaid_list into lib/PDFsets
source code
 
create_plot(self, mode='parton', event_path=None, output=None, tag=None)
create the plot
source code
 
do_EOF(self, line)
Not in help: exit
source code
 
do_check_events(self, line)
Run some sanity check on the generated events.
source code
 
do_compute_widths(self, line)
Require MG5 directory: Compute automatically the widths of a set of particles
source code
 
do_decay_events(self, line)
Require MG5 directory: decay events with spin correlations
source code
 
do_delphes(self, line)
run delphes and make associate root file/plot
source code
 
do_exit(self, line)
Not in help: exit
source code
 
do_open(self, line)
Open a text file/ eps file / html file
source code
 
do_pgs(self, line)
launch pgs
source code
 
do_print_results(self, line)
Not in help:Print the cross-section/ number of events for a given run
source code
 
do_quit(self, line)
Not in help: exit
source code
 
do_reweight(self, line)
syntax is "reweight RUN_NAME" Allow to reweight the events generated with a new choices of model parameter.
source code
 
do_set(self, line, log=True)
Set an option, which will be default for coming generations/outputs
source code
 
do_treatcards(self, line, amcatnlo=False)
Advanced commands: create .inc files from param_card.dat/run_card.dat
source code
 
get_available_tag(self)
create automatically a tag
source code
 
get_characteristics(self, path=None)
reads the proc_characteristics file and initialises the correspondant dictionary
source code
 
get_lhapdf_libdir(self) source code
 
get_lhapdf_pdfsets_list(self, pdfsets_dir)
read the PDFsets.index file, which should be located in the same place as pdfsets_dir, and return a list of dictionaries with the information about each pdf set
source code
 
get_lhapdf_pdfsetsdir(self) source code
 
get_lhapdf_version(self)
returns the lhapdf version number
source code
 
get_pdf_input_filename(self)
return the name of the file which is used by the pdfset
source code
 
get_pid_final_initial_states(self)
Find the pid of all particles in the final and initial states
source code
 
help_print_result(self) source code
 
install_lhapdf_pdfset(self, pdfsets_dir, filename)
idownloads and install the pdfset filename in the pdfsets_dir
source code
 
keep_cards(self, need_card=[], ignore=[])
Ask the question when launching generate_events/multi_run
source code
 
link_lhapdf(self, libdir, extra_dirs=[])
links lhapdf into libdir
source code
 
load_results_db(*args, **opt)
load the current results status
source code
 
post_set(self, stop, line)
Check if we need to save this in the option file
source code
 
run_hep2lhe(self, banner_path=None)
Run hep2lhe on the file Events/pythia_events.hep
source code
 
set_configuration(self, config_path=None, final=True, initdir=None, amcatnlo=False)
assign all configuration variable from file ./Cards/mg5_configuration.txt.
source code
 
split_arg(self, line, error=False)
split argument and remove run_options
source code
 
store_result(self)
Dummy routine, to be overwritten by daughter classes
source code
 
update_make_opts(self)
update the make_opts file writing the environmental variables stored in make_opts_var
source code
 
update_status(self, status, level, makehtml=True, force=True, error=False, starttime=None, update_results=True, print_log=True)
update the index status
source code

Inherited from HelpToCmd: help_compute_widths, help_decay_events, help_delphes, help_pgs, help_plot, help_pythia, help_set, help_treatcards

Inherited from CheckValidForCmd: check_check_events, check_compute_widths, check_decay_events, check_open, check_set, check_treatcards, get_events_path

Inherited from extended_cmd.Cmd: ask, avoid_history_duplicate, check_answer_in_input_file, check_import, cmdloop, compile, default, define_child_cmd_interface, do_display, do_help, do_history, do_import, do_save, emptyline, error_handling, exec_cmd, get_history_header, get_stored_line, import_command_file, nice_config_error, nice_error_handling, nice_user_error, no_notification, onecmd, onecmd_orig, postcmd, postloop, precmd, preloop, run_cmd, stop_on_keyboard_stop, store_line, write_configuration

Inherited from extended_cmd.CheckCmd: check_history, check_save

Inherited from extended_cmd.HelpCmd: help_EOF, help_display, help_help, help_history, help_quit, help_save

Inherited from extended_cmd.CompleteCmd: complete_display, complete_history, complete_save

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Inherited from extended_cmd.BasicCmd: complete, deal_multiple_categories, getTerminalSize, print_suggestions

Inherited from cmd.Cmd: columnize, complete_help, completedefault, completenames, get_names, parseline, print_topics

Static Methods [hide private]
 
ask_edit_card_static(cards, mode='fixed', plot=True, timeout=0, ask=None, **opt) source code
 
detect_card_type(path)
detect the type of the card.
source code
 
find_available_run_name(me_dir)
find a valid run_name for the current job
source code
 
get_lhapdf_pdfsets_list_static(pdfsets_dir, lhapdf_version) source code
 
install_lhapdf_pdfset_static(lhapdf_config, pdfsets_dir, filename, lhapdf_version=None, alternate_path=None)
idownloads and install the pdfset filename in the pdfsets_dir.
source code
 
update_make_opts_full(path, def_variables, keep_old=True)
update the make_opts file writing the environmental variables of def_variables.
source code

Inherited from extended_cmd.Cmd: timed_input

Inherited from extended_cmd.BasicCmd: list_completion, path_completion

Class Variables [hide private]
  debug_output = 'ME5_debug'
  helporder = ['Main Commands', 'Documented commands', 'Require ...
  options_configuration = {'auto_update': 7, 'cluster_local_path...
  options_madevent = {'automatic_html_opening': True, 'cluster_m...
  options_madgraph = {'stdout_level': None}

Inherited from extended_cmd.Cmd: allow_notification_center, config_debug, error_debug, history_header, keyboard_stop_msg, next_possibility

Inherited from extended_cmd.Cmd (private): _display_opts

Inherited from cmd.Cmd: doc_header, doc_leader, identchars, intro, lastcmd, misc_header, nohelp, prompt, ruler, undoc_header, use_rawinput

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, me_dir, options, *args, **opts)
(Constructor)

source code 

common

Overrides: cmd.Cmd.__init__

check_param_card(self, path, run=True)

source code 

1) Check that no scan parameter are present
2) Check that all the width are define in the param_card.
- If a scan parameter is define. create the iterator and recall this fonction 
  on the first element.
- If some width are set on 'Auto', call the computation tools.

detect_card_type(path)
Static Method

source code 

detect the type of the card. Return value are banner param_card.dat run_card.dat pythia_card.dat plot_card.dat pgs_card.dat delphes_card.dat delphes_trigger.dat shower_card.dat [aMCatNLO] FO_analyse_card.dat [aMCatNLO] madspin_card.dat [MS] transfer_card.dat [MW] madweight_card.dat [MW]

do_EOF(self, line)

source code 

Not in help: exit

Overrides: extended_cmd.Cmd.do_quit

do_exit(self, line)

source code 

Not in help: exit

Overrides: extended_cmd.Cmd.do_quit

do_quit(self, line)

source code 

Not in help: exit

Overrides: extended_cmd.Cmd.do_quit

do_reweight(self, line)

source code 

syntax is "reweight RUN_NAME" Allow to reweight the events generated with a new choices of model parameter. Description of the methods are available here cp3.irmp.ucl.ac.be/projects/madgraph/wiki/Reweight

install_lhapdf_pdfset_static(lhapdf_config, pdfsets_dir, filename, lhapdf_version=None, alternate_path=None)
Static Method

source code 

idownloads and install the pdfset filename in the pdfsets_dir. Version which can be used independently of the class. local path is used if the global installation fails.

load_results_db(*args, **opt)

source code 

load the current results status

Decorators:
  • @misc.multiple_try(nb_try= 5, sleep= 2)

set_configuration(self, config_path=None, final=True, initdir=None, amcatnlo=False)

source code 

assign all configuration variable from file ./Cards/mg5_configuration.txt. assign to default if not define

split_arg(self, line, error=False)

source code 

split argument and remove run_options

Overrides: extended_cmd.BasicCmd.split_arg

update_make_opts_full(path, def_variables, keep_old=True)
Static Method

source code 

update the make_opts file writing the environmental variables of def_variables. if a value of the dictionary is None then it is not written.


Class Variable Details [hide private]

helporder

Value:
['Main Commands',
 'Documented commands',
 'Require MG5 directory',
 'Advanced commands']

options_configuration

Value:
{'auto_update': 7,
 'cluster_local_path': '/cvmfs/cp3.uclouvain.be/madgraph/',
 'cluster_nb_retry': 1,
 'cluster_retry_wait': 300,
 'cluster_status_update': (600, 30),
 'cluster_type': 'condor',
 'cpp_compiler': None,
 'delphes_path': './Delphes',
...

options_madevent

Value:
{'automatic_html_opening': True,
 'cluster_memory': None,
 'cluster_queue': 'madgraph',
 'cluster_size': 100,
 'cluster_temp_path': None,
 'cluster_time': None,
 'nb_core': None,
 'notification_center': True,
...