ATLAS Offline Software
PoolCommonConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2 
3 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory import CompFactory
5 
6 
7 def PoolSvcCfg(flags, withCatalogs=False, **kwargs):
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 
30 def 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 
43 def 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 
56 def AthenaPoolAddressProviderSvcCfg(flags, **kwargs):
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
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.PoolCommonConfig.AthenaPoolSharedIOCnvSvcCfg
def AthenaPoolSharedIOCnvSvcCfg(flags, **kwargs)
Definition: PoolCommonConfig.py:30
python.PoolCommonConfig.PoolSvcCfg
def PoolSvcCfg(flags, withCatalogs=False, **kwargs)
Definition: PoolCommonConfig.py:7
python.PoolCommonConfig.AthenaPoolCnvSvcCfg
def AthenaPoolCnvSvcCfg(flags, **kwargs)
Definition: PoolCommonConfig.py:43
python.PoolCommonConfig.AthenaPoolAddressProviderSvcCfg
def AthenaPoolAddressProviderSvcCfg(flags, **kwargs)
Definition: PoolCommonConfig.py:56