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