 |
Belle II Software
release-05-02-19
|
13 #include <framework/core/Module.h>
15 #include <hlt/softwaretrigger/calculations/SoftwareTriggerCalculation.h>
16 #include <mdst/dataobjects/SoftwareTriggerResult.h>
17 #include <hlt/softwaretrigger/core/SoftwareTriggerDBHandler.h>
28 namespace SoftwareTrigger {
61 class SoftwareTriggerModule :
public Module {
73 void event()
override;
127 void makeCut(
const SoftwareTriggerObject& prefilledObject);
void beginRun() override
Check if the cut representations in the database have changed and download newer ones if needed.
void initialize() override
Initialize/Require the DB object pointers and any needed store arrays.
void terminate() override
Store and delete the ttree if it was created.
std::unique_ptr< TTree > m_debugTTree
TTree to store the debug output (or a nullptr if we do not save the debug output).
virtual ~SoftwareTriggerModule()=default
default virtaual constructor because this is a derived class using virtual methods
StoreObjPtr< SoftwareTriggerResult > m_resultStoreObjectPointer
Store Object for storing the trigger decision.
unsigned int m_param_preScaleStoreDebugOutputToDataStore
Prescale with which to save the results of the calculations into the DataStore.
std::string m_param_resultStoreArrayName
Store Object Pointer name for storing the trigger decision.
void event() override
Run over all cuts and check them. If one of the cuts yields true, give a positive return value of the...
Abstract base class for different kinds of events.
Type-safe access to single objects in the data store.
void initializeCalculation()
Helper function to initialize the calculation by creating a new calculation object and requiring all ...
SoftwareTriggerModule()
Create a new module instance and set the parameters.
void initializeCounters()
Helper function to initialize the internal counters used for each cut identifier.
bool m_param_storeDebugOutputToROOTFile
Flag to also store the result of the calculations into a root file.
std::string m_param_debugOutputFileName
Output file name for the debug output. Is only used if debug is turned on.
void initializeDebugOutput()
Helper function to initliaze debug output creation by creating a TTree and an object in the data stor...
std::unique_ptr< TFile > m_debugOutputFile
TFile to store the debug TTree (or a nullptr if we do not save the debug output).
std::string m_param_baseIdentifier
Base identifier for all cuts downloaded from database.
StoreObjPtr< SoftwareTriggerVariables > m_debugOutputStoreObject
TTree living in the datastore for debug reasons.
std::unique_ptr< SoftwareTriggerDBHandler > m_dbHandler
Internal handler object for the DB interface.
std::unique_ptr< SoftwareTriggerCalculation > m_calculation
Internal handler for the Calculations (will be set in initialize to the correct one).
void makeDebugOutput()
Helper function to store the calculated variables from the calculation either in the TTree or in the ...
std::string m_param_debugOutputStoreObjName
Output store object name for the debug output. Is only used if debug is turned on.
bool m_param_useRandomNumbersForPreScale
Flag to use random numbers or a counter for applying a prescale.
std::vector< uint32_t > m_counters
Vector of the internal counters used to apply a prescale.
void makeCut(const SoftwareTriggerObject &prefilledObject)
Helper function to perform the actual cut on the prefilled object and set the return value of the mod...