Belle II Software development
SummarizeTriggerResults Class Reference
Inheritance diagram for SummarizeTriggerResults:
PickleHarvestingModule HarvestingModule

Public Member Functions

def __init__ (self, root_file_name="save_results.pkl", store_object_name="SoftwareTriggerResult")
 
def peel (self, result)
 

Detailed Description

Read in the trigger results stored in the data store and write them out into a ROOT file after all events have
passed.

Definition at line 63 of file variable_modules.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  root_file_name = "save_results.pkl",
  store_object_name = "SoftwareTriggerResult" 
)
Create a new module to get the stored trigger decisions from the data store and save them to a root file.
:param root_file_name: The file name where to store the results.
:param store_object_name: The store object name where the trigger results an be found in the data store.

Reimplemented from HarvestingModule.

Definition at line 69 of file variable_modules.py.

69 def __init__(self, root_file_name="save_results.pkl", store_object_name="SoftwareTriggerResult"):
70 """
71 Create a new module to get the stored trigger decisions from the data store and save them to a root file.
72 :param root_file_name: The file name where to store the results.
73 :param store_object_name: The store object name where the trigger results an be found in the data store.
74 """
75 super().__init__(foreach=store_object_name, output_file_name=root_file_name)
76

Member Function Documentation

◆ peel()

def peel (   self,
  result 
)
For each result ( = event), get the list of all trigger decisions and also add the total decision.
Write them back into the internal storage ( = pandas.DataFrame) of all events.

Reimplemented from HarvestingModule.

Definition at line 77 of file variable_modules.py.

77 def peel(self, result):
78 """
79 For each result ( = event), get the list of all trigger decisions and also add the total decision.
80 Write them back into the internal storage ( = pandas.DataFrame) of all events.
81 """
82 return_dict = {identifier: result for identifier, result in result.getResults()}
83
84 # Make it easier for the user to get the total result of everything
85 getFinalTriggerDecision = Belle2.SoftwareTrigger.FinalTriggerDecisionCalculator.getFinalTriggerDecision
86 return_dict["final_decision"] = getFinalTriggerDecision(result)
87 yield return_dict
88
89

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