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)
|
|
|
|
|
__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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
set_CM_velocity(self,
line)
compute sqrts from the velocity in the center of mass frame |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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_param(self)
write the param_card |
source code
|
|
|
|
|
check_answer_consistency(self)
function called if the code reads a file |
source code
|
|
|
|
|
|
|
|
|
do_decay(self,
line)
edit the madspin_card to define the decay of the associate particle |
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_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
|
|
|
|
|
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
|
|
|
|
|
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__
|