Skip to content
Snippets Groups Projects
Verified Commit 99bd28e1 authored by Tadej Novak's avatar Tadej Novak
Browse files

Initialise MetaDataSvc with tools

parent efaff636
No related branches found
No related tags found
No related merge requests found
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
def MetaDataSvcCfg(flags, toolNames=[]): def MetaDataSvcCfg(flags, toolNames=[], tools=[]):
# should cover most use cases (POOL, RAW) when called with appropriate toolNames argument # should cover most use cases (POOL, RAW) when called with appropriate toolNames argument
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from AthenaConfiguration.ComponentFactory import CompFactory from AthenaConfiguration.ComponentFactory import CompFactory
...@@ -16,6 +16,10 @@ def MetaDataSvcCfg(flags, toolNames=[]): ...@@ -16,6 +16,10 @@ def MetaDataSvcCfg(flags, toolNames=[]):
result.addService(svc) result.addService(svc)
result.addService(CompFactory.ProxyProviderSvc(ProviderNames=["MetaDataSvc"])) result.addService(CompFactory.ProxyProviderSvc(ProviderNames=["MetaDataSvc"]))
for tool in tools:
result.addPublicTool(tool)
svc.MetaDataTools += [tool]
for name in toolNames: for name in toolNames:
if not isinstance(name, string_types): if not isinstance(name, string_types):
from AthenaCommon.Logging import logging from AthenaCommon.Logging import logging
...@@ -26,4 +30,4 @@ def MetaDataSvcCfg(flags, toolNames=[]): ...@@ -26,4 +30,4 @@ def MetaDataSvcCfg(flags, toolNames=[]):
result.addPublicTool(thistool) result.addPublicTool(thistool)
svc.MetaDataTools += [thistool] svc.MetaDataTools += [thistool]
return result return result
\ No newline at end of file
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