ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthToolSupport
AsgTools
Root
ToolHandle.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
// Local include(s):
6
#include "
AsgTools/ToolHandle.h
"
7
#include "
AsgTools/IAsgTool.h
"
8
9
ToolHandleBase::ToolHandleBase(
const
std::string& typeAndName, INamedInterface* parent )
10
: m_typeAndName( typeAndName ), m_type(),
m_name
(), m_parent(
parent
) {
11
12
setTypeAndName(typeAndName);
13
}
14
15
void
ToolHandleBase::setTypeAndName(
const
std::string& typeAndName) {
16
m_typeAndName = typeAndName;
17
// Decode the received string:
18
size_t
pos
= 0;
19
if
( ( pos = m_typeAndName.find(
'/'
) ) == std::string::npos ) {
20
// The user specified a single string, which is used as both the type
21
// and instance name.
22
m_type = m_typeAndName;
23
m_name
= m_typeAndName;
24
}
else
{
25
// The user specified both a type and an instance name.
26
m_type = m_typeAndName.substr( 0, pos );
27
m_name
= m_typeAndName.substr( pos + 1 );
28
}
29
}
30
31
void
ToolHandleBase::setName(
const
std::string& name) {
32
m_name
=
name
;
33
}
34
35
const
std::string& ToolHandleBase::typeAndName()
const
{
36
37
return
m_typeAndName;
38
}
39
40
const
std::string& ToolHandleBase::type()
const
{
41
42
return
m_type;
43
}
44
45
const
std::string& ToolHandleBase::name()
const
{
46
47
return
m_name
;
48
}
49
50
const
std::string& ToolHandleBase::parentName()
const
{
51
52
if
(m_parent)
53
return
m_parent->name();
54
static
const
std::string toolSvcName =
"ToolSvc"
;
55
return
toolSvcName;
56
}
57
58
INamedInterface *ToolHandleBase ::parent()
const
noexcept {
59
return
m_parent;
60
}
IAsgTool.h
ToolHandle.h
const
CxxUtils::m_name
std::string m_name
The primary name part of this expression.
Definition
CxxUtils/CxxUtils/ClassName.h:486
extractSporadic.name
name
Definition
extractSporadic.py:101
python.LumiBlobConversion.pos
pos
Definition
LumiBlobConversion.py:16
test_pyathena.parent
parent
Definition
test_pyathena.py:15
Generated on
for ATLAS Offline Software by
1.17.0