Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
athena-main
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Peter Alan Steinberg
athena-main
Commits
6817d4bf
Commit
6817d4bf
authored
5 months ago
by
Frank Winklmeier
Browse files
Options
Downloads
Patches
Plain Diff
AsgServices: use auto-declaring interfaces
parent
e7e74890
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Control/AthToolSupport/AsgServices/AsgServices/AsgService.h
+8
-7
8 additions, 7 deletions
Control/AthToolSupport/AsgServices/AsgServices/AsgService.h
Control/AthToolSupport/AsgServices/Root/AsgService.cxx
+5
-26
5 additions, 26 deletions
Control/AthToolSupport/AsgServices/Root/AsgService.cxx
with
13 additions
and
33 deletions
Control/AthToolSupport/AsgServices/AsgServices/AsgService.h
+
8
−
7
View file @
6817d4bf
/*
/*
Copyright (C) 2002-202
1
CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-202
4
CERN for the benefit of the ATLAS collaboration
*/
*/
/// @author Nils Krumnack
/// @author Nils Krumnack
...
@@ -38,8 +38,12 @@ namespace asg
...
@@ -38,8 +38,12 @@ namespace asg
///
///
/// Loosely based on the \ref AsgTool implementation.
/// Loosely based on the \ref AsgTool implementation.
class
AsgService
:
public
virtual
IAsgService
,
class
AsgService
:
public
AsgServiceBase
#ifndef XAOD_STANDALONE
public
extends
<
AsgServiceBase
,
IAsgService
>
#else
public
AsgServiceBase
,
public
virtual
IAsgService
#endif
{
{
public:
public:
AsgService
(
const
std
::
string
&
name
,
AsgService
(
const
std
::
string
&
name
,
...
@@ -60,11 +64,8 @@ namespace asg
...
@@ -60,11 +64,8 @@ namespace asg
#ifndef XAOD_STANDALONE
#ifndef XAOD_STANDALONE
/// query interface for gaudi
virtual
StatusCode
queryInterface
(
const
InterfaceID
&
riid
,
void
**
ppvi
);
/// list of interfaces we have
private:
private:
/// list of interfaces we have
std
::
vector
<
std
::
pair
<
const
InterfaceID
&
(
*
)(),
void
*
(
*
)(
AsgService
*
)
>>
m_interfaces
;
std
::
vector
<
std
::
pair
<
const
InterfaceID
&
(
*
)(),
void
*
(
*
)(
AsgService
*
)
>>
m_interfaces
;
#endif
#endif
...
...
This diff is collapsed.
Click to expand it.
Control/AthToolSupport/AsgServices/Root/AsgService.cxx
+
5
−
26
View file @
6817d4bf
/*
/*
Copyright (C) 2002-202
1
CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-202
4
CERN for the benefit of the ATLAS collaboration
*/
*/
/// @author Nils Krumnack
/// @author Nils Krumnack
...
@@ -18,13 +18,11 @@ namespace asg
...
@@ -18,13 +18,11 @@ namespace asg
AsgService
::
AsgService
::
AsgService
(
const
std
::
string
&
name
,
AsgService
(
const
std
::
string
&
name
,
ISvcLocator
*
pSvcLocator
)
ISvcLocator
*
pSvcLocator
)
:
AsgServiceBase
(
#ifndef XAOD_STANDALONE
#ifndef XAOD_STANDALONE
name
,
pSvcLocator
:
base_class
(
name
,
pSvcLocator
)
#else // not XAOD_STANDALONE
#else
name
:
AsgServiceBase
(
name
)
#endif // not XAOD_STANDALONE
#endif
)
{
{
(
void
)
pSvcLocator
;
(
void
)
pSvcLocator
;
}
}
...
@@ -51,23 +49,4 @@ namespace asg
...
@@ -51,23 +49,4 @@ namespace asg
return
;
return
;
}
}
#ifndef XAOD_STANDALONE
StatusCode
AsgService
::
queryInterface
(
const
InterfaceID
&
riid
,
void
**
ppvi
)
{
for
(
const
auto
&
interface
:
m_interfaces
)
{
if
(
riid
==
interface
.
first
())
{
*
ppvi
=
interface
.
second
(
this
);
addRef
();
return
StatusCode
::
SUCCESS
;
}
}
return
AsgServiceBase
::
queryInterface
(
riid
,
ppvi
);
}
#endif
}
// namespace asg
}
// namespace asg
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment