xboa
Public Member Functions | Public Attributes | List of all members
UserHitFactory Class Reference

Factory class for line by line reads of output files using a user-defined format. More...

Inherits LineFactoryBase.

Public Member Functions

def __init__
 Initialise the factory. More...
 
def make_hit
 Read the next line in the file handle and return a new hit object. More...
 

Public Attributes

 filehandle
 
 format_list
 
 format_units_dict
 
 mass_shell_condition
 

Detailed Description

Factory class for line by line reads of output files using a user-defined format.

Definition at line 27 of file _user_hit_factory.py.

Constructor & Destructor Documentation

def __init__ (   self,
  format_list,
  format_units_dict,
  filehandle,
  mass_shell_condition 
)

Initialise the factory.

  • format_list = ordered list of strings. Each string should be a valid Hit.set_variable()
  • format_units_dict = dict of formats mapping from format_list elements to units. Variables that are dimensionless or in natural units should have an empty string to denote natural units. If a variable is not listed at all, a KeyError will be raised
  • file_handle = file handle made using e.g. open() command
  • mass_shell_condition = string containing from Hit.mass_shell_variables that determines how the mass shell condition will be calculated (or set to '' to ignore) Returns a new factory class

Definition at line 43 of file _user_hit_factory.py.

Member Function Documentation

def make_hit (   self)

Member Data Documentation

filehandle

Definition at line 45 of file _user_hit_factory.py.

Referenced by UserHitFactory.make_hit().

format_list

Definition at line 46 of file _user_hit_factory.py.

Referenced by UserHitFactory.make_hit().

format_units_dict

Definition at line 47 of file _user_hit_factory.py.

Referenced by UserHitFactory.make_hit().

mass_shell_condition

The documentation for this class was generated from the following file: