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

Class AskforEditCard

source code

              object --+                
                       |                
extended_cmd.OriginalCmd --+            
                           |            
       extended_cmd.BasicCmd --+        
                               |        
      extended_cmd.SmartQuestion --+    
                                   |    
  extended_cmd.OneLinePathCompletion --+
                                       |
                                      AskforEditCard

A class for asking a question where in addition you can have the set command define and modifying the param_card/run_card correctly

special action can be trigger via trigger_XXXX when the user start a line with XXXX. the output of such function should be new line that can be handle. (return False to repeat the question)

Nested Classes [hide private]
  PY8Card_class
Implements the Pythia8 card.
Instance Methods [hide private]
 
load_default(self)
define all default variable.
source code
 
define_paths(self, **opt) source code
 
__init__(self, question, cards=[], from_banner=None, banner=None, mode='auto', *args, **opt)
Instantiate a line-oriented interpreter framework.
source code
 
init_from_banner(self, from_banner, banner)
defined card that need to be initialized from the banner file from_banner should be a list of card to load from the banner object
source code
 
get_path(self, name, cards)
initialise the path if requested
source code
 
init_param(self, cards)
check if we need to load the param_card
source code
 
init_run(self, cards) source code
 
init_madweight(self, cards) source code
 
init_madloop(self, cards) source code
 
init_shower(self, cards) source code
 
init_pythia8(self, cards) source code
 
init_madspin(self, cards) source code
 
init_delphes(self, cards) source code
 
set_CM_velocity(self, line)
compute sqrts from the velocity in the center of mass frame
source code
 
do_help(self, line, conflict_raise=False, banner=True) source code
 
complete_help(self, text, line, begidx, endidx) source code
 
complete_update(self, text, line, begidx, endidx) source code
 
complete_set(self, text, line, begidx, endidx, formatting=True)
Complete the set command
source code
 
do_set(self, line)
edit the value of one parameter in the card
source code
 
setM(self, block, name, value) source code
 
setR(self, name, value) source code
 
setML(self, name, value, default=False) source code
 
setPY8(self, name, value, default=False) source code
 
setP(self, block, lhaid, value) source code
 
check_card_consistency(self)
This is run on quitting the class.
source code
 
reask(self, *args, **opt) source code
 
postcmd(self, stop, line)
Hook method executed just after a command dispatch is finished.
source code
 
do_update(self, line, timer=0)
syntax: update dependent: Change the mass/width of particles which are not free parameter for the model.
source code
 
update_to_full(self, line)
trigger via update to_full LINE
source code
 
write_card(self, name)
proxy on how to write any card
source code
 
write_card_run(self)
write the run_card
source code
 
write_card_param(self)
write the param_card
source code
 
update_missing(self) source code
 
check_answer_consistency(self)
function called if the code reads a file
source code
 
help_set(self)
help message for set
source code
 
trigger(self, line) source code
 
default(self, line)
Default action if line is not recognized
source code
 
do_decay(self, line)
edit the madspin_card to define the decay of the associate particle
source code
 
do_compute_widths(self, line) source code
 
help_compute_widths(self) source code
 
help_decay(self)
help for command decay which modifies MadSpin_card
source code
 
complete_compute_widths(self, text, line, begidx, endidx, **opts) source code
 
help_add(self)
help for add command
source code
 
help_edit(self, prefix=True)
help for edit command
source code
 
complete_add(self, text, line, begidx, endidx, formatting=True)
auto-completion for add command
source code
 
do_add(self, line)
syntax: add filename NAME VALUE syntax: add filename LINE
source code
 
do_edit(self, line)
syntax: add filename NAME VALUE syntax: add filename LINE
source code
 
complete_edit(self, text, line, begidx, endidx, formatting=True)
auto-completion for add command
source code
 
help_asperge(self)
Help associated to the asperge command
source code
 
complete_asperge(self, text, line, begidx, endidx, formatting=True) source code
 
do_asperge(self, line)
Running ASperGe
source code
 
copy_file(self, path, pathname=None)
detect the type of the file and overwritte the current file
source code
 
detect_card_type(self, path)
detect card type
source code
 
open_file(self, answer)
open the file
source code
 
reload_card(self, path)
reload object to have it in sync
source code

Inherited from extended_cmd.OneLinePathCompletion: completedefault, completenames, precmd

Inherited from extended_cmd.SmartQuestion: __call__, cmdloop, emptyline, get_names, onecmd, preloop

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

Inherited from extended_cmd.OriginalCmd: columnize, parseline, postloop, print_topics

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

Static Methods [hide private]
 
update_dependent(mecmd, me_dir, param_card, path, timer=0)
static method which can also be called from outside the class usefull in presence of scan.
source code

Inherited from extended_cmd.BasicCmd: list_completion, path_completion, split_arg

Class Variables [hide private]
  all_card_name = ['param_card', 'run_card', 'pythia_card', 'pyt...
  to_init_card = ['param', 'run', 'madweight', 'madloop', 'showe...
  special_shortcut = {}
  special_shortcut_help = {}
  integer_bias = 1
  fail_due_to_format = 0

Inherited from extended_cmd.OneLinePathCompletion: allowpath, completion_prefix

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

Properties [hide private]

Inherited from extended_cmd.SmartQuestion: answer

Inherited from object: __class__

Method Details [hide private]

load_default(self)

source code 

define all default variable. No load of card here. This allow to subclass this class and just change init and still have all variables defined.

__init__(self, question, cards=[], from_banner=None, banner=None, mode='auto', *args, **opt)
(Constructor)

source code 

Instantiate a line-oriented interpreter framework.

The optional argument 'completekey' is the readline name of a completion key; it defaults to the Tab key. If completekey is not None and the readline module is available, command completion is done automatically. The optional arguments stdin and stdout specify alternate input and output file objects; if not specified, sys.stdin and sys.stdout are used.

Overrides: object.__init__
(inherited documentation)

do_help(self, line, conflict_raise=False, banner=True)

source code 
Overrides: extended_cmd.OriginalCmd.do_help

complete_help(self, text, line, begidx, endidx)

source code 
Overrides: extended_cmd.OriginalCmd.complete_help

check_card_consistency(self)

source code 

This is run on quitting the class. Apply here all the self-consistency rule that you want. Do the modification via the set command.

reask(self, *args, **opt)

source code 
Overrides: extended_cmd.SmartQuestion.reask

postcmd(self, stop, line)

source code 

Hook method executed just after a command dispatch is finished.

Overrides: extended_cmd.OriginalCmd.postcmd
(inherited documentation)

do_update(self, line, timer=0)

source code 

syntax: update dependent: Change the mass/width of particles which are not free parameter for the model. update missing: add to the current param_card missing blocks/parameters. update to_slha1: pass SLHA2 card to SLHA1 convention. (beta) update to_slha2: pass SLHA1 card to SLHA2 convention. (beta) update to_full [run_card] update XXX [where XXX correspond to a hidden block of the run_card]

update_dependent(mecmd, me_dir, param_card, path, timer=0)
Static Method

source code 

static method which can also be called from outside the class usefull in presence of scan. return if the param_card was updated or not

default(self, line)

source code 

Default action if line is not recognized

Overrides: extended_cmd.OriginalCmd.default

Class Variable Details [hide private]

all_card_name

Value:
['param_card',
 'run_card',
 'pythia_card',
 'pythia8_card',
 'madweight_card',
 'MadLoopParams',
 'shower_card']

to_init_card

Value:
['param',
 'run',
 'madweight',
 'madloop',
 'shower',
 'pythia8',
 'delphes',
 'madspin']