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

Public Member Functions

def __init__ (self, generator)
 
def event (self)
 
def terminate (self)
 

Public Attributes

 generator
 The generator: alignment.Constraints.
 
 consts
 Generated constraints (key is constraint checksum)
 

Detailed Description

basf2 python module to generate a file with a single set of constraints

(Needed especially for time-dependent constraints)

Definition at line 19 of file constraints_generator.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  generator 
)
Constructor

Parameters
----------
generator : alignment.Constraints
  Set of constraints to be generated (defines also filename)

Definition at line 26 of file constraints_generator.py.

26  def __init__(self, generator):
27  """
28  Constructor
29 
30  Parameters
31  ----------
32  generator : alignment.Constraints
33  Set of constraints to be generated (defines also filename)
34 
35  """
36 
37  super().__init__()
38 
39  self.generator = generator
40 
41  self.consts = dict()
42  super().set_name(super().name() + ":" + generator.filename)
43 

Member Function Documentation

◆ event()

def event (   self)
 Event: attempt to add constraints
At each event, attempt to generate the constraints and add them
to the dict (same cheksum - using only labels - means it gets overriden!)
Thus is only works if the time-dependence is set (otherwise you always get the same labels and
only the last constraint coefficients will be stored)

Definition at line 44 of file constraints_generator.py.

◆ terminate()

def terminate (   self)
 Terminate: write-down collect constraint data to file

Definition at line 55 of file constraints_generator.py.


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