3 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory
import CompFactory
5 from AthenaConfiguration.Enums
import ProductionStep
6 from AthenaCommon
import Logging
11 from RDBAccessSvc.RDBAccessSvcConfig
import RDBAccessSvcCfg
14 result.addService(CompFactory.GeoDbTagSvc(name, **kwargs))
17 if not flags.GeoModel.AtlasVersion:
18 raise ValueError(
'No geometry tag specified')
20 from PyUtils.Helpers
import release_metadata
22 relversion = rel_metadata[
'release'].
split(
'.')
23 if len(relversion) < 3:
24 relversion = rel_metadata[
'base release'].
split(
'.')
28 from RDBAccessSvc.RDBAccessSvcConfig
import RDBAccessSvcCfg
31 from DetDescrCnvSvc.DetDescrCnvSvcConfig
import DetDescrCnvSvcCfg
38 from EventInfoMgt.TagInfoMgrConfig
import TagInfoMgrCfg
44 nThreads = flags.Concurrency.NumThreads
47 gms=CompFactory.GeoModelSvc(AtlasVersion=flags.GeoModel.AtlasVersion,
48 SQLiteDB=flags.GeoModel.SQLiteDB,
49 SQLiteDBFullPath=flags.GeoModel.SQLiteDBFullPath,
50 EMECStandard=flags.GeoModel.EMECStandard,
51 IgnoreTagDifference=flags.GeoModel.IgnoreTagDifference,
52 SupportedGeometry=
int(relversion[0]),
54 if flags.Common.ProductionStep == ProductionStep.Simulation:
56 gms.AlignCallbacks =
False
57 result.addService(gms, primary=
True, create=
True)
62 if __name__ ==
"__main__":
63 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
64 from AthenaConfiguration.TestDefaults
import defaultGeometryTags
67 flags.Input.Files = []
68 flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN3
72 with open(
"test.pkl",
"wb")
as f:
75 Logging.log.info(
"All OK")