ATLAS Offline Software
Loading...
Searching...
No Matches
TriggerTranslatorSimple.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
6#include "boost/algorithm/string/split.hpp"
7#include "boost/algorithm/string/classification.hpp"
8
10 const std::string& name,
11 const IInterface* parent)
12 : AthAlgTool( type, name, parent )
13{
14 declareInterface<ITriggerTranslatorTool>(this);
15 declareProperty("triggerMapping", m_trigmap_property);
16}
17
19
21 std::vector<std::string> junk;
22 //m_trigmap[""] = junk;
23 for(const auto& item : m_trigmap_property) {
24 ATH_MSG_DEBUG( "Key " << item.first << " Value " << item.second );
25 std::vector<std::string> triggers;
26 boost::split(triggers, item.second, boost::is_any_of(","));
27 m_trigmap[item.first] = std::move(triggers);
28 }
29 return StatusCode::SUCCESS;
30}
31
32
33const std::vector<std::string> TriggerTranslatorToolSimple::translate(const std::string& key) const {
34 return m_trigmap.at(key);
35}
#define ATH_MSG_DEBUG(x)
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
virtual StatusCode initialize() override
std::map< std::string, std::string > m_trigmap_property
virtual const std::vector< std::string > translate(const std::string &) const override
std::map< std::string, std::vector< std::string > > m_trigmap
TriggerTranslatorToolSimple(const std::string &type, const std::string &name, const IInterface *parent)