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