Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Gaudi
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue 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
Gaudi
Gaudi
Commits
9bc6c9b3
Commit
9bc6c9b3
authored
3 years ago
by
Marco Clemencic
Browse files
Options
Downloads
Plain Diff
ConfigurableService: copy private tools of services
Closes
#208
See merge request
!1277
parents
0c4c1f8c
f20fb955
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1277
ConfigurableService: copy private tools of services
Pipeline
#3331081
passed
3 years ago
Stage: pre-build-checks
Stage: build
Stage: test
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
GaudiExamples/src/AlgTools/MyServiceWithTool.cpp
+2
-1
2 additions, 1 deletion
GaudiExamples/src/AlgTools/MyServiceWithTool.cpp
GaudiKernel/python/GaudiKernel/Configurable.py
+6
-2
6 additions, 2 deletions
GaudiKernel/python/GaudiKernel/Configurable.py
with
8 additions
and
3 deletions
GaudiExamples/src/AlgTools/MyServiceWithTool.cpp
+
2
−
1
View file @
9bc6c9b3
/***********************************************************************************\
* (c) Copyright 1998-201
9
CERN for the benefit of the LHCb and ATLAS collaborations *
* (c) Copyright 1998-20
2
1 CERN for the benefit of the LHCb and ATLAS collaborations *
* *
* This software is distributed under the terms of the Apache version 2 licence, *
* copied verbatim in the file "LICENSE". *
...
...
@@ -22,6 +22,7 @@ namespace GaudiTesting {
private:
PublicToolHandle
<
IMyTool
>
m_tool
{
this
,
"MyTool"
,
"MyTool"
};
ToolHandle
<
IMyTool
>
m_privTool
{
this
,
"MyPrivateTool"
,
""
};
};
DECLARE_COMPONENT
(
SvcWithTool
)
...
...
This diff is collapsed.
Click to expand it.
GaudiKernel/python/GaudiKernel/Configurable.py
+
6
−
2
View file @
9bc6c9b3
#####################################################################################
# (c) Copyright 1998-202
0
CERN for the benefit of the LHCb and ATLAS collaborations #
# (c) Copyright 1998-202
1
CERN for the benefit of the LHCb and ATLAS collaborations #
# #
# This software is distributed under the terms of the Apache version 2 licence, #
# copied verbatim in the file "LICENSE". #
...
...
@@ -1161,7 +1161,11 @@ class ConfigurableService(Configurable):
return
self
# services are always shared
def
copyChild
(
self
,
child
):
return
child
# full sharing
# Copy private tools but all else is shared
if
isinstance
(
child
,
ConfigurableAlgTool
)
and
not
child
.
isPublic
():
return
copy
.
deepcopy
(
child
)
else
:
return
child
def
getHandle
(
self
):
return
iService
(
self
.
_name
)
...
...
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