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

Class PY8Card

source code

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

Implements the Pythia8 card.

Instance Methods [hide private]
 
add_default_subruns(self, type)
Placeholder function to allow overwriting in the PY8SubRun daughter.
source code
 
default_setup(self)
Sets up the list of available PY8 parameters.
source code
new empty dictionary

__init__(self, *args, **opts)
initialize a new instance.
source code
 
add_param(self, name, value, hidden=False, always_write_to_card=True, comment=None)
add a parameter to the card.
source code
 
add_subrun(self, py8_subrun)
Add a subrun to this PY8 Card.
source code
 
userSet(self, name, value, **opts)
Set an attribute of this card, following a user_request
source code
 
vetoParamWriteOut(self, name)
Forbid the writeout of a specific parameter of this card when the "write" function will be invoked.
source code
 
systemSet(self, name, value, **opts)
Set an attribute of this card, independently of a specific user request and only if not already user_set.
source code
 
MadGraphSet(self, name, value, **opts)
Sets a card attribute, but only if it is absent or not already user_set.
source code
 
defaultSet(self, name, value, **opts) source code
 
write(self, output_file, template, read_subrun=False, print_only_visible=False, direct_pythia_input=False, add_missing=True)
Write the card to output_file using a specific template.
source code
 
read(self, file_input, read_subrun=False, setter='default')
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

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

Inherited from dict: __cmp__, __delitem__, __eq__, __ge__, __getattribute__, __gt__, __le__, __len__, __lt__, __ne__, __new__, __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]
 
pythia8_formatting(value, formatv=None)
format the variable into pythia8 card convention.
source code

Inherited from ConfigFile: format_variable, warn

Class Variables [hide private]

Inherited from dict: __hash__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

add_default_subruns(self, type)

source code 

Placeholder function to allow overwriting in the PY8SubRun daughter. The initialization of the self.subruns attribute should of course not be performed in PY8SubRun.

default_setup(self)

source code 

Sets up the list of available PY8 parameters.

Overrides: ConfigFile.default_setup

__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, hidden=False, always_write_to_card=True, comment=None)

source code 

add a parameter to the card. value is the default value and defines the type (int/float/bool/str) of the input. The option 'hidden' decides whether the parameter should be visible to the user. The option 'always_write_to_card' decides whether it should always be printed or only when it is system_set or user_set. The option 'comment' can be used to specify a comment to write above hidden parameters.

Overrides: ConfigFile.add_param

pythia8_formatting(value, formatv=None)
Static Method

source code 

format the variable into pythia8 card convention. The type is detected by default

write(self, output_file, template, read_subrun=False, print_only_visible=False, direct_pythia_input=False, add_missing=True)

source code 
Write the card to output_file using a specific template.
> 'print_only_visible' specifies whether or not the hidden parameters
    should be written out if they are in the hidden_params_to_always_write
    list and system_set.
> If 'direct_pythia_input' is true, then visible parameters which are not
  in the self.visible_params_to_always_write list and are not user_set
  or system_set are commented.
> If 'add_missing' is False then parameters that should be written_out but are absent
from the template will not be written out.

read(self, file_input, read_subrun=False, setter='default')

source code 
Read the input file, this can be a path to a file, 
a file object, a str with the content of the file.
The setter option choses the authority that sets potential 
modified/new parameters. It can be either: 
  'default' or 'user' or 'system'