 |
Belle II Software
release-05-02-19
|
12 #include <mdst/dbobjects/SoftwareTriggerCutBase.h>
13 #include <framework/utilities/GeneralCut.h>
14 #include <hlt/softwaretrigger/core/SoftwareTriggerVariableManager.h>
15 #include <mdst/dataobjects/SoftwareTriggerResult.h>
24 namespace SoftwareTrigger {
32 class SoftwareTriggerCut :
public SoftwareTriggerCutBase {
81 static std::unique_ptr<SoftwareTriggerCut>
compile(
const std::string& cut_string,
82 const unsigned int prescaleFactor,
83 const bool rejectCut =
false);
91 return m_cut->decompile();
106 uint32_t* counter =
nullptr)
111 std::unique_ptr<GeneralCut<SoftwareTriggerVariableManager>>
m_cut =
nullptr;
117 unsigned int prescaleFactor,
SoftwareTriggerCutBase(unsigned int preScaleFactor=1, const bool &isRejectCut=false)
Create a new base instance. This should rarely be called by yourself.
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.
std::string decompile() const
Decompile the internal General Cut back into a string.
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.
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.