Belle II Software development
|
Base class for all calculation algorithms to be used when calculating the variables needed in the SoftwareTrigger modules for the cuts. More...
#include <SoftwareTriggerCalculation.h>
Public Member Functions | |
virtual void | requireStoreArrays ()=0 |
Function to be called in the initialize phase of the module, in which all later needed StoreArrays can be made a requirement. | |
void | writeDebugOutput (const std::unique_ptr< TTree > &debugOutputTTree) |
Function to write out debug output into the given TTree. | |
void | addDebugOutput (const StoreObjPtr< SoftwareTriggerVariables > &storeObject, const std::string &prefix) |
Function to write out debug output into the given StoreObject. | |
const SoftwareTriggerObject & | fillInCalculations () |
Main function of this class: calculate the needed variables using the overwritten doCalculation function and write out the values into the results object (with their names). | |
virtual void | doCalculation (SoftwareTriggerObject &m_calculationResult)=0 |
Override this function to implement your calculation. | |
virtual | ~SoftwareTriggerCalculation ()=default |
Default but virtual desctructor. | |
Private Attributes | |
SoftwareTriggerObject | m_calculationResult |
Internal storage of the result of the calculation. | |
bool | m_debugPrepared = false |
Flag to not add the branches twice to the TTree. | |
Base class for all calculation algorithms to be used when calculating the variables needed in the SoftwareTrigger modules for the cuts.
Override in your own calculation. Your override class must have a function requireStoreArray (which can be empty) and a function doCalculation getting the SoftwareTriggerObject as a reference.
Definition at line 29 of file SoftwareTriggerCalculation.h.
void addDebugOutput | ( | const StoreObjPtr< SoftwareTriggerVariables > & | storeObject, |
const std::string & | prefix | ||
) |
Function to write out debug output into the given StoreObject.
Needs an already prefilled calculationResult for this (probably using the fillInCalculations function). All added variables are prefixed with the given prefix string.
Definition at line 34 of file SoftwareTriggerCalculation.cc.
|
pure virtual |
Override this function to implement your calculation.
Implemented in FilterCalculator, and SkimSampleCalculator.
const SoftwareTriggerObject & fillInCalculations | ( | ) |
Main function of this class: calculate the needed variables using the overwritten doCalculation function and write out the values into the results object (with their names).
Please make sure to override (or clear) the variables! Otherwise it can happen that their old values are still in the object.
What variables exactly are added to the result depends on the implementation details of the class.
Definition at line 44 of file SoftwareTriggerCalculation.cc.
|
pure virtual |
Function to be called in the initialize phase of the module, in which all later needed StoreArrays can be made a requirement.
Override it in your class if you need special store arrays.
Implemented in FilterCalculator, and SkimSampleCalculator.
void writeDebugOutput | ( | const std::unique_ptr< TTree > & | debugOutputTTree | ) |
Function to write out debug output into the given TTree.
Needs an already prefilled calculationResult for this (probably using the fillInCalculations function).
Definition at line 19 of file SoftwareTriggerCalculation.cc.
|
private |
Internal storage of the result of the calculation.
Definition at line 74 of file SoftwareTriggerCalculation.h.
|
private |
Flag to not add the branches twice to the TTree.
Definition at line 76 of file SoftwareTriggerCalculation.h.