|
ATLAS Offline Software
|
Go to the documentation of this file.
16 #include "GaudiKernel/IToolSvc.h"
31 (
const std::string&
type,
32 const std::string&
name,
35 m_jos (
"JobOptionsSvc",
name),
36 m_toolsvc (
"ToolSvc",
name)
39 "The JobOptionsSvc instance.");
41 "The ToolSvc instance.");
54 return StatusCode::SUCCESS;
66 std::pair<map_t::iterator, bool>
res =
70 "D3PD::CollectionGetterRegistryTool")
71 <<
"Duplicate collection label " <<
label
72 <<
" for tools " <<
res.first->second->name()
73 <<
" and " <<
tool->name();
74 return StatusCode::FAILURE;
76 return StatusCode::SUCCESS;
90 const INamedInterface*
parent,
98 "D3PD::CollectionGetterRegistryTool")
99 <<
"Can't find collection label " <<
label;
100 std::ostringstream
os;
101 os <<
" Known collections:";
103 os <<
" " <<
p.first;
106 "D3PD::CollectionGetterRegistryTool")
108 return StatusCode::SUCCESS;
112 const auto& props =
m_jos->items([&
i](
const auto&
p) {
117 std::string fullname =
parent->name() +
"." +
label;
118 for (
const auto&
p : props) {
119 const std::string&
oldname = std::get<0>(
p);
120 std::string::size_type ipos =
oldname.rfind (
'.');
121 if (ipos != std::string::npos) {
122 std::string pname =
oldname.substr (ipos, std::string::npos);
123 if (pname !=
".Label") {
124 m_jos->set(fullname + pname, std::get<1>(
p));
JetConstituentVector::iterator iterator
bool starts_with(const char *s, const char *prefix)
Test whether one null-terminated byte string starts with another.
Block filler tool for noisy FEB information.
::StatusCode StatusCode
StatusCode definition for legacy code.
std::pair< std::vector< unsigned int >, bool > res
#define CHECK(...)
Evaluate an expression and check for errors.
C++20-like starts_with/ends_with for strings.
#define REPORT_MESSAGE_WITH_CONTEXT(LVL, CONTEXT_NAME)
Report a message, with an explicitly specified context name.
Helpers for checking error return status codes and reporting errors.