9#include <hlt/softwaretrigger/core/SoftwareTriggerCut.h>
10#include <mdst/dataobjects/SoftwareTriggerResult.h>
11#include <hlt/softwaretrigger/core/utilities.h>
13#include <framework/logging/Logger.h>
20 namespace SoftwareTrigger {
22 unsigned int prescaleFactor,
26 std::unique_ptr<SoftwareTriggerCut> compiledSoftwareTriggerCut(
new SoftwareTriggerCut(std::move(compiledGeneralCut),
27 prescaleFactor, rejectCut));
29 return compiledSoftwareTriggerCut;
36 B2FATAL(
"Software Trigger is not initialized!");
38 const bool cutCondition =
m_cut->check(&prefilledObject);
66 return check(prefilledObject).first;
static std::unique_ptr< GeneralCut > compile(const std::string &cut)
Creates an instance of a cut and returns a unique_ptr to it, if you need a copy-able object instead y...
bool isRejectCut() const
Returns true, if the cut is a reject cut and false otherwise.
unsigned int getPreScaleFactor() const
Return the list of pre scale factors.
Software Trigger Cut to be used in the Software Trigger Modules.
SoftwareTriggerCutResult checkPreScaled(const SoftwareTriggerVariableManager::Object &prefilledObject) const
Main function of the SoftwareTriggerCut: check the cut condition.
std::unique_ptr< GeneralCut< SoftwareTriggerVariableManager > > m_cut
Internal representation of the cut condition as a general cut.
std::pair< SoftwareTriggerCutResult, SoftwareTriggerCutResult > check(const SoftwareTriggerVariableManager::Object &prefilledObject, uint32_t *counter=nullptr) const
Return both the prescaled and the non-prescaled result.
static std::unique_ptr< SoftwareTriggerCut > compile(const std::string &cut_string, const unsigned int prescaleFactor, const bool rejectCut=false)
Compile a new SoftwareTriggerCut from a cut string (by using the GeneralCut::compile function) and an...
SoftwareTriggerObject Object
As an object handed in for every cut to be checked, use a map of variable name -> precompiled value.
SoftwareTriggerCutResult
Enumeration with all possible results of the SoftwareTriggerCut.
@ c_accept
Accept this event.
@ c_reject
Reject this event.
@ c_noResult
There were not enough information to decide on what to do with the event.
Abstract base class for different kinds of events.