ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthToolSupport
AsgServices
Root
ServiceHandle.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3
*/
4
8
9
10
11
// Local include(s):
12
#include "
AsgServices/ServiceHandle.h
"
13
#include "
AsgServices/IAsgService.h
"
14
15
ServiceHandleBase ::
16
ServiceHandleBase(
const
std::string& typeAndName,
17
const
std::string& parentName )
18
: m_typeAndName( typeAndName ), m_type(),
m_name
(), m_parentName(
parentName
)
19
{
20
setTypeAndName(typeAndName);
21
}
22
23
24
25
void
ServiceHandleBase::setTypeAndName(
const
std::string& typeAndName)
26
{
27
m_typeAndName = typeAndName;
28
// Decode the received string:
29
size_t
pos
= 0;
30
if
( ( pos = m_typeAndName.find(
'/'
) ) == std::string::npos )
31
{
32
// The user specified a single string, which is used as both the type
33
// and instance name.
34
m_type = m_typeAndName;
35
m_name
= m_typeAndName;
36
}
else
37
{
38
// The user specified both a type and an instance name.
39
m_type = m_typeAndName.substr( 0, pos );
40
m_name
= m_typeAndName.substr( pos + 1 );
41
}
42
}
43
44
45
46
void
ServiceHandleBase::setName(
const
std::string& name)
47
{
48
m_name
=
name
;
49
}
50
51
52
53
const
std::string& ServiceHandleBase::typeAndName()
const
54
{
55
return
m_typeAndName;
56
}
57
58
59
60
const
std::string& ServiceHandleBase::type()
const
61
{
62
return
m_type;
63
}
64
65
66
67
const
std::string& ServiceHandleBase::name()
const
68
{
69
return
m_name
;
70
}
71
72
73
74
const
std::string& ServiceHandleBase::parentName()
const
75
{
76
return
m_parentName;
77
}
IAsgService.h
ServiceHandle.h
CxxUtils::m_name
std::string m_name
The primary name part of this expression.
Definition
CxxUtils/CxxUtils/ClassName.h:486
TrigCaloRecConfig.parentName
parentName
Definition
TrigCaloRecConfig.py:644
extractSporadic.name
name
Definition
extractSporadic.py:101
python.LumiBlobConversion.pos
pos
Definition
LumiBlobConversion.py:16
Generated on
for ATLAS Offline Software by
1.17.0