10 #include <framework/database/DBImportObjPtr.h>
11 #include <hlt/softwaretrigger/core/SoftwareTriggerDBHandler.h>
13 #include <boost/algorithm/string/predicate.hpp>
20 namespace SoftwareTrigger {
27 dbCut.getPreScaleFactor(),
32 const std::string& cutIdentifier)
34 assert(baseCutIdentifier.find(
"&") == std::string::npos);
35 assert(cutIdentifier.find(
"&") == std::string::npos);
47 assert(baseIdentifier.find(
"&") == std::string::npos);
54 assert(baseIdentifier.find(
"&") == std::string::npos);
55 assert(std::count(cutName.begin(), cutName.end(),
'&') == 2);
57 return boost::starts_with(cutName,
makeFullCutName(baseIdentifier,
""));
63 B2ASSERT(
"The name " <<
s_totalResultIdentifier <<
" is already used for the total result of each trigger stage. "
65 const std::string& fullCutName =
makeFullCutName(baseCutIdentifier, cutIdentifier);
67 cutToUpload.
construct(cut->getPreScaleFactor(), cut->isRejectCut(), cut->decompile());
72 const std::vector<std::string>& cutIdentifiers,
78 menuToUpload.
construct(cutIdentifiers, acceptMode);
83 const std::string& cutIdentifier)
85 const std::string& fullCutName =
makeFullCutName(baseCutIdentifier, cutIdentifier);
94 std::unique_ptr<SoftwareTriggerMenu>
100 return std::make_unique<SoftwareTriggerMenu>(*downloadedMenu);
116 if (databaseCutEntry.hasChanged()) {
117 B2ASSERT(
"The name of the database entry changed! This is not handled properly by the module.",
126 B2ASSERT(
"Could not find a valid trigger name with this "
135 B2DEBUG(20,
"Initializing SoftwareTrigger DB with baseIdentifier " <<
m_baseIdentifier <<
" and " << cutIdentifiers.size() <<
138 for (
const std::string& cutIdentifier : cutIdentifiers) {
139 B2DEBUG(20,
"-> with CutIndentifier " << cutIdentifier);
146 B2FATAL(
"There is no DB object with the name " << fullIdentifier);