Package madgraph :: Package various :: Module banner :: Class RunCard
[hide private]
[frames] | no frames]

Class RunCard

source code

object --+        
         |        
      dict --+    
             |    
    ConfigFile --+
                 |
                RunCard
Known Subclasses:

Instance Methods [hide private]
new empty dictionary

__init__(self, *args, **opts)
initialize a new instance.
source code
 
add_param(self, name, value, fortran_name=None, include=True, hidden=False, legacy=False, cut=False, system=False, sys_default=None, **opts)
add a parameter to the card.
source code
 
read(self, finput, consistency=True)
Read the input file, this can be a path to a file, a file object, a str with the content of the file.
source code
 
write(self, output_file, template=None, python_template=False, write_hidden=False)
Write the run_card in output_file according to template (a path to a valid run_card)
source code
 
get_default(self, name, default=None, log_level=None)
return self[name] if exist otherwise default.
source code
 
check_validity(self, log_level=30)
check that parameter missing in the card are set to the expected value
source code
 
update_system_parameter_for_include(self)
update hidden system only parameter for the correct writtin in the include
source code
 
write_include_file(self, output_dir)
Write the various include file in output_dir.
source code
 
get_banner_init_information(self)
return a dictionary with the information needed to write the first line of the <init> block of the lhe file.
source code
 
get_pdf_id(self, pdf) source code
 
get_lhapdf_id(self) source code
 
remove_all_cut(self)
remove all the cut
source code

Inherited from ConfigFile: __add__, __contains__, __copy__, __getitem__, __iter__, __radd__, __setitem__, default_setup, do_help, items, keys, post_set, set

Inherited from dict: __cmp__, __delitem__, __eq__, __ge__, __getattribute__, __gt__, __le__, __len__, __lt__, __ne__, __repr__, __sizeof__, clear, copy, fromkeys, get, has_key, iteritems, iterkeys, itervalues, pop, popitem, setdefault, update, values, viewitems, viewkeys, viewvalues

Inherited from object: __delattr__, __format__, __reduce__, __reduce_ex__, __setattr__, __str__, __subclasshook__

Static Methods [hide private]
a new object with type S, a subtype of T
__new__(cls, finput=None, **opt) source code
 
f77_formatting(value, formatv=None)
format the variable into fortran.
source code
 
get_idbmup(lpp)
return the particle colliding pdg code
source code

Inherited from ConfigFile: format_variable, warn

Class Variables [hide private]
  filename = 'run_card'
  blocks = []
  default_include_file = 'run_card.inc'

Inherited from dict: __hash__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__new__(cls, finput=None, **opt)
Static Method

source code 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__
(inherited documentation)

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

source code 

initialize a new instance. input can be an instance of MadLoopParam, a file, a path to a file, or simply Nothing

Returns:
new empty dictionary

Overrides: object.__init__
(inherited documentation)

add_param(self, name, value, fortran_name=None, include=True, hidden=False, legacy=False, cut=False, system=False, sys_default=None, **opts)

source code 
add a parameter to the card. value is the default value and 
defines the type (int/float/bool/str) of the input.
fortran_name defines what is the associate name in the f77 code
include defines if we have to put the value in the include file
hidden defines if the parameter is expected to be define by the user.
legacy:Parameter which is not used anymore (raise a warning if not default)
cut: defines the list of cut parameter to allow to set them all to off.
sys_default: default used if the parameter is not in the card

options of **opts:
- allowed: list of valid options. '*' means anything else should be allowed.
         empty list means anything possible as well. 
- comment: add comment for writing/help
- typelist: type of the list if default is empty

Overrides: ConfigFile.add_param

get_default(self, name, default=None, log_level=None)

source code 

return self[name] if exist otherwise default. log control if we put a warning or not if we use the default value

f77_formatting(value, formatv=None)
Static Method

source code 

format the variable into fortran. The type is detected by default

write_include_file(self, output_dir)

source code 

Write the various include file in output_dir. The entry True of self.includepath will be written in run_card.inc The entry False will not be written anywhere