 |
Belle II Software
release-05-02-19
|
11 #include <hlt/softwaretrigger/core/SoftwareTriggerCut.h>
12 #include <mdst/dataobjects/SoftwareTriggerResult.h>
13 #include <hlt/softwaretrigger/core/utilities.h>
15 #include <framework/logging/Logger.h>
22 namespace SoftwareTrigger {
24 unsigned int prescaleFactor,
28 std::unique_ptr<SoftwareTriggerCut> compiledSoftwareTriggerCut(
new SoftwareTriggerCut(std::move(compiledGeneralCut),
29 prescaleFactor, rejectCut));
31 return compiledSoftwareTriggerCut;
38 B2FATAL(
"Software Trigger is not initialized!");
40 const bool cutCondition =
m_cut->check(&prefilledObject);
68 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.
SoftwareTriggerCutResult checkPreScaled(const SoftwareTriggerVariableManager::Object &prefilledObject) const
Main function of the SoftwareTriggerCut: check the cut condition.
std::pair< SoftwareTriggerCutResult, SoftwareTriggerCutResult > check(const SoftwareTriggerVariableManager::Object &prefilledObject, uint32_t *counter=nullptr) const
Return both the prescaled and the non-prescaled result.
@ c_accept
Accept this event.
unsigned int getPreScaleFactor() const
Return the list of pre scale factors.
Abstract base class for different kinds of events.
SoftwareTriggerObject Object
As an object handed in for every cut to be checked, use a map of variable name -> precompiled value.
std::unique_ptr< GeneralCut< SoftwareTriggerVariableManager > > m_cut
Internal representation of the cut condition as a general cut.
SoftwareTriggerCut(std::unique_ptr< GeneralCut< SoftwareTriggerVariableManager >> &&cut, unsigned int prescaleFactor, const bool rejectCut)
Make constructor private.
@ c_reject
Reject this event.
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...
SoftwareTriggerCutResult
Enumeration with all possible results of the SoftwareTriggerCut.
@ c_noResult
There were not enough information to decide on what to do with the event.