2from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
3from AthenaConfiguration.ComponentFactory
import CompFactory
6 acc = ComponentAccumulator()
7 from TruthConverters.TruthConvertersCfg
import xAODtoHEPToolCfg
8 from TruthRivetTools.TruthRivetToolsCfg
import HiggsTruthCategoryToolCfg
9 kwargs.setdefault(
"HepMCTool", acc.popToolsAndMerge(xAODtoHEPToolCfg(ConfigFlags)))
10 kwargs.setdefault(
"CategoryTool", acc.popToolsAndMerge(HiggsTruthCategoryToolCfg(ConfigFlags)))
11 the_alg = CompFactory.DerivationFramework.TruthCategoriesDecorator(name, **kwargs)
12 acc.addEventAlgo(the_alg, primary =
True)
15if __name__ ==
"__main__":
16 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
17 flags = initConfigFlags()
18 args = flags.fillFromArgs()
19 flags.Input.Files = args.input
20 flags.Concurrency.NumThreads=args.threads
21 flags.Concurrency.NumConcurrentEvents=args.threads
27 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
28 cfg = MainServicesCfg(flags)
29 msgService = cfg.getService(
'MessageSvc')
30 msgService.Format =
"S:%s E:%e % F%128W%S%7W%R%T %0W%M"
32 from AthenaPoolCnvSvc.PoolReadConfig
import PoolReadCfg
33 cfg.merge(PoolReadCfg(flags))
36 sc = cfg.run(flags.Exec.MaxEvents)
37 if not sc.isSuccess():
TruthCategoriesDecoratorCfg(ConfigFlags, name="TruthCategoriesDecorator", **kwargs)