diff --git a/Control/AthenaCommon/python/AppMgr.py b/Control/AthenaCommon/python/AppMgr.py index 4e2d4fa271b8426f75c015d27ee0cdc940cbdee8..f757a27fc63bcaaae508af29ef4a993ec354df4d 100755 --- a/Control/AthenaCommon/python/AppMgr.py +++ b/Control/AthenaCommon/python/AppMgr.py @@ -75,6 +75,14 @@ def iadd( self, tool ): tool = (tool,) # only add once (allow silently) + if self.configurableRun3Behavior: + # But if duplicates may not be the same Configurable instances, + # need to force the owner to prevent errors about public tools + # not in ToolSvc when old configuration fragments are imported + # in new configurations. + dups = [t for t in tool if t in self.getChildren()] + for t in dups: + t.setParent (self.name()) tool = [t for t in tool if t not in self.getChildren()] if len(tool)==0: return self