1 #include <mdst/dataobjects/SoftwareTriggerResult.h>
2 #include <boost/algorithm/string/replace.hpp>
13 m_results[triggerIdentifier] = std::make_pair(
static_cast<int>(result),
static_cast<int>(nonPrescalesResult));
17 const std::string& triggerIdentifier)
const
19 auto pair =
m_results.at(triggerIdentifier);
36 std::map<std::string, int> result;
37 for (
const auto& [key, valuePair] :
m_results) {
38 result[key] = valuePair.first;
45 std::map<std::string, int> result;
46 for (
const auto& [key, valuePair] :
m_results) {
47 result[key] = valuePair.second;
60 std::stringstream out;
63 const std::string colorNeutral = gROOT->GetColor(kWhite)->AsHexString();
64 const std::string colorReject = gROOT->GetColor(kRed)->AsHexString();
65 const std::string colorAccept = gROOT->GetColor(kGreen)->AsHexString();
69 std::string name = result.first;
70 boost::replace_all(name,
"software_trigger_cut&",
"");
71 boost::replace_all(name,
"&",
"/");
72 const int value = result.second.first;
74 auto thisColor = colorNeutral;
76 thisColor = colorAccept;
77 }
else if (value < 0) {
78 thisColor = colorReject;
81 out <<
"<td>" << name <<
"</td>";
82 out <<
"<td bgcolor=\"" << thisColor <<
"\">" << value <<
"</td>";