Skip to content
Snippets Groups Projects
Commit f20fb955 authored by Frank Winklmeier's avatar Frank Winklmeier
Browse files

ConfigurableService: copy private tools of services

Fix bug in `ConfigurableService` to make sure private tools are copied
when being added to the service.

Closes issue #208.
parent c813fb76
No related branches found
No related tags found
No related merge requests found
#####################################################################################
# (c) Copyright 1998-2020 CERN for the benefit of the LHCb and ATLAS collaborations #
# (c) Copyright 1998-2021 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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment