9 using TV = boost::property_tree::ptree::value_type;
24 if(! isInitialized() ||
empty() ) {
27 m_name = getAttribute(
"name");
31 for(
const auto & [monGroupName,
monGroup] :
data().get_child(
"signatures" ) ) {
32 std::map<std::string, std::vector<std::string>> monGroupChainMap;
34 std::vector<std::string> monTarget{};
35 for(
const auto &
x: targetList) {
36 monTarget.push_back(
x.second.get_value<std::string>());
37 m_targets.insert(monTarget.back());
39 monGroupChainMap.emplace(
chainName, monTarget);
41 m_signatures.emplace( monGroupName, monGroupChainMap);
45 std::cerr <<
"ERROR: problem when building the HLT monitoring. " << ex.what() << std::endl;
50 const std::set<std::string> &
55 const std::map<std::string, std::map<std::string, std::vector<std::string>>> &
60 std::vector<std::string>
62 std::vector<std::string>
keys;
63 keys.reserve(m_signatures.size());
64 for(
const auto& [
key,
value] : m_signatures) {
70 std::vector<std::string>
72 std::vector<std::string>
chains{};
73 for(
const auto & [
chain, targets] : m_signatures.at(signature)) {
83 return data().get_child(
"signatures").size();
105 cout <<
"HLT monitoring '" <<
name() <<
"'" << endl;
106 cout <<
"Signatures: " <<
size() << endl;
107 cout <<
"Targets: " << targets().size() << endl;
109 cout <<
"Signatures: ";
111 size_t sigNameWidth(0);
112 for(
auto & sigName : signatureNames() ) {
119 sigNameWidth =
max(sigNameWidth,sigName.size());
121 cout << endl <<
"Targets: ";
123 std::vector<size_t> tnwidth{};
124 for(
auto &
target : targets() ) {
131 tnwidth.push_back(
target.size());
135 cout <<
"Count of monitored chains by target:" << endl;
137 for(
auto &
target : targets() ) {
140 cout << setw(sigNameWidth+2) <<
"";
147 for(
auto & sigName : signatureNames() ) {
148 cout << setw(sigNameWidth) << left << sigName <<
": " << right;
151 for(
auto &
target : targets() ) {
157 cout << setw(tnwidth[
col++]) << chainsBySignatureAndTarget(sigName,
target).size();