ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthenaMonitoring
src
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
5
#include "
TriggerTranslatorSimple.h
"
6
#include <
CxxUtils/StringUtils.h
>
7
8
TriggerTranslatorToolSimple::TriggerTranslatorToolSimple
(
const
std::string&
type
,
9
const
std::string& name,
10
const
IInterface* parent)
11
:
AthAlgTool
(
type
, name, parent )
12
{
13
declareInterface<ITriggerTranslatorTool>(
this
);
14
declareProperty
(
"triggerMapping"
,
m_trigmap_property
);
15
}
16
17
TriggerTranslatorToolSimple::~TriggerTranslatorToolSimple
() {}
18
19
StatusCode
TriggerTranslatorToolSimple::initialize
() {
20
std::vector<std::string> junk;
21
//m_trigmap[""] = junk;
22
for
(
const
auto
& item :
m_trigmap_property
) {
23
ATH_MSG_DEBUG
(
"Key "
<< item.first <<
" Value "
<< item.second );
24
std::vector<std::string> triggers =
CxxUtils::tokenize
(item.second,
","
);
25
m_trigmap
[item.first] = std::move(triggers);
26
}
27
return
StatusCode::SUCCESS;
28
}
29
30
31
const
std::vector<std::string>
TriggerTranslatorToolSimple::translate
(
const
std::string& key)
const
{
32
return
m_trigmap
.at(key);
33
}
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
StringUtils.h
TriggerTranslatorSimple.h
AthAlgTool::AthAlgTool
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Definition
AthAlgTool.cxx:16
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition
AthCommonDataStore.h:145
TriggerTranslatorToolSimple::~TriggerTranslatorToolSimple
virtual ~TriggerTranslatorToolSimple()
Definition
TriggerTranslatorSimple.cxx:17
TriggerTranslatorToolSimple::initialize
virtual StatusCode initialize() override
Definition
TriggerTranslatorSimple.cxx:19
TriggerTranslatorToolSimple::m_trigmap_property
std::map< std::string, std::string > m_trigmap_property
Definition
TriggerTranslatorSimple.h:49
TriggerTranslatorToolSimple::translate
virtual const std::vector< std::string > translate(const std::string &) const override
Definition
TriggerTranslatorSimple.cxx:31
TriggerTranslatorToolSimple::m_trigmap
std::map< std::string, std::vector< std::string > > m_trigmap
Definition
TriggerTranslatorSimple.h:50
TriggerTranslatorToolSimple::TriggerTranslatorToolSimple
TriggerTranslatorToolSimple(const std::string &type, const std::string &name, const IInterface *parent)
Definition
TriggerTranslatorSimple.cxx:8
CxxUtils::tokenize
std::vector< std::string > tokenize(std::string_view the_str, std::string_view delimiters)
Splits the string into smaller substrings.
Definition
Control/CxxUtils/Root/StringUtils.cxx:12
type
Generated on
for ATLAS Offline Software by
1.17.0