ATLAS Offline Software
Loading...
Searching...
No Matches
MetadataAlgConfig.py
Go to the documentation of this file.
1# Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2
3from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4from AthenaConfiguration.ComponentFactory import CompFactory
5
6from AthenaServices.MetaDataSvcConfig import MetaDataSvcCfg
7
8
9def MetadataAlgCfg(flags, h5_output=None, json_output=None):
10 acc = ComponentAccumulator()
11 acc.merge(MetaDataSvcCfg(flags))
12 opts = {}
13 if o := h5_output:
14 opts |= dict(h5Output=o)
15 if o := json_output:
16 opts |= dict(jsonOutput=str(o))
17 if not opts:
18 raise ValueError('No outputs given for MetadataAlg')
19 acc.addEventAlgo(
20 CompFactory.ftag.MetadataAlg(
21 'MetadataAlg',
22 **opts
23 )
24 )
25 return acc
MetadataAlgCfg(flags, h5_output=None, json_output=None)