8#include <hlt/softwaretrigger/core/FinalTriggerDecisionCalculator.h>
9#include <hlt/softwaretrigger/core/SoftwareTriggerDBHandler.h>
12using namespace SoftwareTrigger;
17 const auto& results = result.getResults();
23 auto allTotalResultIterator = results.find(allTotalResultName);
24 if (allTotalResultIterator != results.end() and not forgetTotalResult) {
33 auto filterTotalResultIterator = results.find(filterTotalResultName);
35 if (filterTotalResultIterator != results.end()) {
47 auto fastRecoTotalResultIterator = results.find(fastRecoTotalResultName);
48 auto hltTotalResultIterator = results.find(hltTotalResultName);
50 if (fastRecoTotalResultIterator != results.end()) {
51 B2WARNING(
"You are using an old trigger result with a newer version of the software. Make sure this is what you want.");
57 if (hltTotalResultIterator != results.end()) {
58 B2WARNING(
"You are using an old trigger result with a newer version of the software. Make sure this is what you want.");
71 const std::string& baseIdentifier,
72 bool acceptOverridesReject)
74 bool hasOneAcceptCut =
false;
75 bool hasOneRejectCut =
false;
77 for (
const auto& resultWithName : result.getResults()) {
78 const std::string& cutName = resultWithName.first;
85 B2WARNING(
"The store object already includes a result for this module. Will overwrite it.");
92 hasOneAcceptCut =
true;
94 hasOneRejectCut =
true;
98 if (acceptOverridesReject) {
99 if (hasOneAcceptCut or (not hasOneRejectCut)) {
105 if (hasOneAcceptCut and (not hasOneRejectCut)) {
Dataobject to store the results of the cut calculations performed by the SoftwareTriggerModule.
static SoftwareTriggerCutResult getModuleResult(const SoftwareTriggerResult &result, const std::string &baseIdentifier, bool acceptOverridesReject)
Calculate the "total_result" for a given base identifier by looping through all results with the give...
static bool getFinalTriggerDecision(const SoftwareTriggerResult &result, bool forgetTotalResult=false)
Calculate the final cut decision using all "total_results" of all sub triggers in the software trigge...
static bool hasBaseIdentifier(const std::string &cutName, const std::string &baseIdentifier)
Check if a given cut name in the form <package_identifier>&<base_name>&<cut_name> has the given base ...
static std::string makeTotalResultName(const std::string &baseIdentifier="all")
Handy function to create the name related to the total result of a specific trigger stage (either fil...
SoftwareTriggerCutResult
Enumeration with all possible results of the SoftwareTriggerCut.
@ c_accept
Accept this event.
@ c_reject
Reject this event.
Abstract base class for different kinds of events.