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
41 gms=CompFactory.GeoModelSvc(AtlasVersion=flags.GeoModel.AtlasVersion,
42 SQLiteDB=flags.GeoModel.SQLiteDB,
43 SQLiteDBFullPath=flags.GeoModel.SQLiteDBFullPath,
44 EMECStandard=flags.GeoModel.EMECStandard,
45 IgnoreTagDifference=flags.GeoModel.IgnoreTagDifference,
46 SupportedGeometry=
int(relversion[0]))
47 if flags.Common.ProductionStep == ProductionStep.Simulation:
49 gms.AlignCallbacks =
False
50 result.addService(gms, primary=
True, create=
True)
55 if __name__ ==
"__main__":
56 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
57 from AthenaConfiguration.TestDefaults
import defaultGeometryTags
60 flags.Input.Files = []
61 flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN3
65 with open(
"test.pkl",
"wb")
as f:
68 Logging.log.info(
"All OK")