Belle II Software  release-08-01-10
Basf2CalculationProcess Class Reference
Inheritance diagram for Basf2CalculationProcess:
Collaboration diagram for Basf2CalculationProcess:

Public Member Functions

def __init__ (self, result_queue, log_file_name, parameters, path, random_seed=None, max_event=0)
 
def prepare (self)
 
def initialize_output (self)
 
def start_process (self)
 
def save_log (self)
 
def get_log (self)
 
def get (self, name)
 
def get_keys (self)
 

Public Attributes

 random_seed
 Random seed to set. More...
 
 path
 Path to process.
 
 max_event
 The maximum number of events to process. More...
 
 is_valid
 Set is_valid to false to not show this process in any listings.
 
 already_run
 True if already started/run. More...
 
 log_file_name
 Name of the log file to use.
 
 log_file_content
 Saved log file content after the run. More...
 
 result_queue
 Result queue as a reference.
 
 parameters
 Parameters in process_parameter_space.
 
 progress_queue_remote
 Create the queue for the progress python module.
 

Detailed Description

Overload implementation of the HEPProcess with the correct handling of the path calculation.

Definition at line 17 of file calculation_process.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  result_queue,
  log_file_name,
  parameters,
  path,
  random_seed = None,
  max_event = 0 
)
Create a new basf2 calculation process.

Definition at line 23 of file calculation_process.py.

23  def __init__(self, result_queue, log_file_name, parameters, path, random_seed=None, max_event=0):
24  """Create a new basf2 calculation process."""
25 
26  self.random_seed = random_seed
27 
28  self.path = path
29 
30  self.max_event = max_event
31 
32  super().__init__(result_queue=result_queue, log_file_name=log_file_name,
33  parameters=parameters)
34 

Member Function Documentation

◆ get()

def get (   self,
  name 
)
inherited
Return an item from the result queue. Only gives a result if the calculation has finished.
Use the Calculation for a better handling.

Definition at line 76 of file calculation_process.py.

◆ get_keys()

def get_keys (   self)
inherited
Return the names of all item from the result queue. Only gives a result if the calculation has finished.
Use the Calculation for a better handling.

Definition at line 84 of file calculation_process.py.

◆ get_log()

def get_log (   self)
inherited
Return the log file content.
Use the methods of the Calculation for a better handling.

Definition at line 65 of file calculation_process.py.

◆ initialize_output()

def initialize_output (   self)
Make sure all output by python and or C is written to the same output file

Definition at line 50 of file calculation_process.py.

◆ prepare()

def prepare (   self)
A function to prepare a path with the modules given in path.

Reimplemented from CalculationProcess.

Definition at line 35 of file calculation_process.py.

◆ save_log()

def save_log (   self)
inherited
Delete the log file and copy its content to the class.

Definition at line 56 of file calculation_process.py.

◆ start_process()

def start_process (   self)
The function given to the process to start the calculation.
Do not call by yourself.
Resets the logging system, logs onto console and a file and sets the queues
(the result queue and the process queue) correctly.

Reimplemented from CalculationProcess.

Definition at line 70 of file calculation_process.py.

Member Data Documentation

◆ already_run

already_run
inherited

True if already started/run.

Create a new calculation process instance. The parameters here are the absolute standard. You probably have to redefine the
constructor in your own class.

Definition at line 30 of file calculation_process.py.

◆ log_file_content

log_file_content
inherited

Saved log file content after the run.

Delete the log file and copy its content to the class.

Definition at line 36 of file calculation_process.py.

◆ max_event

max_event

The maximum number of events to process.

Leave 0 to process al events

Definition at line 30 of file calculation_process.py.

◆ random_seed

random_seed

Random seed to set.

None will not set it.

Definition at line 26 of file calculation_process.py.


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