ATLAS Offline Software
Loading...
Searching...
No Matches
PoolCommonConfig.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
6
7def PoolSvcCfg(flags, withCatalogs=False, **kwargs):
8 acc = ComponentAccumulator()
9
10 kwargs.setdefault("MaxFilesOpen", flags.PoolSvc.MaxFilesOpen)
11
12 if withCatalogs:
13 catalogs = [
14 "apcfile:poolcond/PoolFileCatalog.xml",
15 "apcfile:poolcond/PoolCat_oflcond.xml",
16 ]
17
18 if not flags.Input.isMC:
19 catalogs += [
20 "apcfile:poolcond/PoolCat_comcond.xml",
21 ]
22
23 kwargs.setdefault("ReadCatalog", catalogs)
24
25 acc.addService(CompFactory.PoolSvc(**kwargs))
26 return acc
27
28
29def AthenaPoolSharedIOCnvSvcCfg(flags, **kwargs):
30 acc = PoolSvcCfg(flags)
31
32 if flags.PoolSvc.PersSvcPerInputType:
33 kwargs.setdefault("PersSvcPerInputType", "CollectionTree")
34
35 if flags.Output.DefaultContainerType:
36 kwargs.setdefault("DefaultContainerType", flags.Output.DefaultContainerType)
37
38 service = CompFactory.AthenaPoolSharedIOCnvSvc(**kwargs)
39 acc.addService(service)
40 acc.addService(CompFactory.EvtPersistencySvc("EventPersistencySvc",
41 CnvServices=[service.getFullJobOptName()]))
42 return acc
43
44
45def AthenaPoolCnvSvcCfg(flags, **kwargs):
46 acc = PoolSvcCfg(flags)
47
48 if flags.PoolSvc.PersSvcPerInputType:
49 kwargs.setdefault("PersSvcPerInputType", "CollectionTree")
50
51 if flags.Output.DefaultContainerType:
52 kwargs.setdefault("DefaultContainerType", flags.Output.DefaultContainerType)
53
54 service = CompFactory.AthenaPoolCnvSvc(**kwargs)
55 acc.addService(service)
56 acc.addService(CompFactory.EvtPersistencySvc("EventPersistencySvc",
57 CnvServices=[service.getFullJobOptName()]))
58 return acc
59
60
62 acc = ComponentAccumulator()
63 acc.addService(CompFactory.StoreGateSvc("MetaDataStore"))
64
65 service = CompFactory.AthenaPoolAddressProviderSvc(**kwargs)
66 acc.addService(service)
67 acc.addService(CompFactory.ProxyProviderSvc(ProviderNames=[service.getFullJobOptName()]))
68 return acc
AthenaPoolAddressProviderSvcCfg(flags, **kwargs)
AthenaPoolCnvSvcCfg(flags, **kwargs)
PoolSvcCfg(flags, withCatalogs=False, **kwargs)
AthenaPoolSharedIOCnvSvcCfg(flags, **kwargs)