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

Class AskforEditCard

source code

               cmd.Cmd --+            
                         |            
     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

Instance Methods [hide private]
 
__init__(self, question, cards=[], mode='auto', *args, **opt)
Instantiate a line-oriented interpreter framework.
source code
 
complete_set(self, text, line, begidx, endidx)
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
 
setP(self, block, lhaid, value) source code
 
reask(self, *args, **opt) source code
 
help_set(self)
help message for set
source code
 
default(self, line)
Default action if line is not recognized
source code
 
do_compute_widths(self, line) source code
 
help_compute_widths(self) source code
 
complete_compute_widths(self, *args, **opts) source code
 
help_asperge(self)
Help associated to the asperge command
source code
 
complete_asperge(self, text, line, begidx, endidx) source code
 
do_asperge(self, line)
Running ASperGe
source code
 
copy_file(self, path)
detect the type of the file and overwritte the current file
source code
 
open_file(self, answer)
open the file
source code

Inherited from extended_cmd.OneLinePathCompletion: completedefault, completenames, postcmd, 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

Inherited from cmd.Cmd: columnize, complete_help, do_help, parseline, postloop, print_topics

Static Methods [hide private]

Inherited from extended_cmd.BasicCmd: list_completion, path_completion, split_arg

Class Variables [hide private]
  special_shortcut = {'ebeam': ['run_card ebeam1 %(0)s', 'run_ca...

Inherited from extended_cmd.OneLinePathCompletion: completion_prefix

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

Method Details [hide private]

__init__(self, question, cards=[], 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: cmd.Cmd.__init__
(inherited documentation)

reask(self, *args, **opt)

source code 
Overrides: extended_cmd.SmartQuestion.reask

default(self, line)

source code 

Default action if line is not recognized

Overrides: cmd.Cmd.default

Class Variable Details [hide private]

special_shortcut

Value:
{'ebeam': ['run_card ebeam1 %(0)s', 'run_card ebeam2 %(0)s'],
 'fixed_scale': ['run_card fixed_fac_scale T',
                 'run_card fixed_ren_scale T',
                 'run_card scale %(0)s',
                 'run_card dsqrt_q2fact1 %(0)s',
                 'run_card dsqrt_q2fact2 %(0)s'],
 'ilc': ['run_card lpp1 0',
         'run_card lpp2 0',
...