10 h5_output_hists=None, enable_systematics=True):
11 acc = ComponentAccumulator()
12 acc.merge(MetaDataSvcCfg(flags))
13 opts = {}
14 if o := h5_output:
15 opts |= dict(h5Output=o)
16 if o := json_output:
17 opts |= dict(jsonOutput=str(o))
18 if o := h5_output_hists:
19 opts |= dict(h5OutputHists=o)
20 opts |= dict(enableSystematics=enable_systematics)
21 if not (h5_output or json_output or h5_output_hists):
22 raise ValueError('No outputs given for MetadataAlg')
23 acc.addEventAlgo(
24 CompFactory.ftag.MetadataAlg('MetadataAlg', **opts)
25 )
26 return acc