Skip to content
Snippets Groups Projects
Commit e0e79d0b authored by Walter Lampl's avatar Walter Lampl
Browse files

CA-basd config: Update GeoModelSvcCfg to return only a CA, not a tuple + update clients

parent 71396335
No related branches found
No related tags found
No related merge requests found
Showing
with 23 additions and 23 deletions
......@@ -3,8 +3,7 @@ from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from AtlasGeoModel.GeoModelConfig import GeoModelCfg
def BeamPipeGeometryCfg(flags):
result,gms=GeoModelCfg(flags)
result=GeoModelCfg(flags)
from BeamPipeGeoModel.BeamPipeGeoModelConf import BeamPipeDetectorTool
gms.DetectorTools += [ BeamPipeDetectorTool() ]
result.addService(gms)
result.getPrimary().DetectorTools += [ BeamPipeDetectorTool() ]
return result
......@@ -5,7 +5,8 @@ from IOVDbSvc.IOVDbSvcConfig import addFoldersSplitOnline
def ForDetGeometryCfg( ConfigFlags ):
from AtlasGeoModel.GeoModelConfig import GeoModelCfg
acc,geoModelSvc = GeoModelCfg( ConfigFlags )
acc = GeoModelCfg( ConfigFlags )
geoModelSvc=acc.getPrimary()
from GeometryDBSvc.GeometryDBSvcConf import GeometryDBSvc
acc.addService(GeometryDBSvc("InDetGeometryDBSvc"))
# LUCID
......
......@@ -19,7 +19,7 @@ def GeoModelCfg(configFlags):
if configFlags.Detector.Simulate:
## Protects GeoModelSvc in the simulation from the AlignCallbacks
gms.AlignCallbacks = False
result.addService(gms)
result.addService(gms,primary=True)
from DetDescrCnvSvc.DetDescrCnvSvcConf import DetDescrCnvSvc
from GaudiSvc.GaudiSvcConf import EvtPersistencySvc
......@@ -35,7 +35,7 @@ def GeoModelCfg(configFlags):
result.merge(tim_ca)
#TagInfoMgr used by GeoModelSvc but no ServiceHandle. Relies on string-name
return result,gms
return result
......@@ -47,6 +47,6 @@ if __name__ == "__main__":
ConfigFlags.Input.Files = defaultTestFiles.RAW
acc, gms = GeoModelCfg( ConfigFlags )
acc = GeoModelCfg( ConfigFlags )
acc.store( file( "test.pkl", "w" ) )
print "All OK"
......@@ -8,7 +8,8 @@ from IOVDbSvc.IOVDbSvcConfig import addFoldersSplitOnline
def InDetServiceMaterialCfg (flags):
from AtlasGeoModel.GeoModelConfig import GeoModelCfg
acc,geoModelSvc = GeoModelCfg( flags )
acc = GeoModelCfg( flags )
geoModelSvc=acc.getPrimary()
from GeometryDBSvc.GeometryDBSvcConf import GeometryDBSvc
acc.addService(GeometryDBSvc("InDetGeometryDBSvc"))
from InDetServMatGeoModel.InDetServMatGeoModelConf import InDetServMatTool
......
......@@ -19,7 +19,8 @@ from IOVDbSvc.IOVDbSvcConfig import addFoldersSplitOnline
def PixelGeometryCfg( flags ):
from AtlasGeoModel.GeoModelConfig import GeoModelCfg
acc,geoModelSvc = GeoModelCfg( flags )
acc = GeoModelCfg( flags )
geoModelSvc=acc.getPrimary()
from GeometryDBSvc.GeometryDBSvcConf import GeometryDBSvc
acc.addService(GeometryDBSvc("InDetGeometryDBSvc"))
from PixelGeoModel.PixelGeoModelConf import PixelDetectorTool
......
......@@ -12,7 +12,8 @@ def SCT_TestCablingAlgCfg(configFlags):
cfg.merge(SCT_CablingCondAlgCfg(configFlags))
from AtlasGeoModel.GeoModelConfig import GeoModelCfg
geoCfg,gms=GeoModelCfg(configFlags)
geoCfg=GeoModelCfg(configFlags)
gms=geoCfg.getPrimary()
cfg.merge(geoCfg)
from AthenaCommon.Constants import INFO
......
......@@ -20,7 +20,8 @@ from IOVDbSvc.IOVDbSvcConfig import addFoldersSplitOnline
def SCT_GeometryCfg( flags ):
from AtlasGeoModel.GeoModelConfig import GeoModelCfg
acc,geoModelSvc = GeoModelCfg( flags )
acc = GeoModelCfg( flags )
geoModelSvc=acc.getPrimary()
from GeometryDBSvc.GeometryDBSvcConf import GeometryDBSvc
acc.addService(GeometryDBSvc("InDetGeometryDBSvc"))
if flags.GeoModel.Run=="RUN4":
......@@ -39,7 +40,6 @@ def SCT_GeometryCfg( flags ):
sctDetectorTool = SCT_DetectorTool()
sctDetectorTool.useDynamicAlignFolders = flags.GeoModel.Align.Dynamic
geoModelSvc.DetectorTools += [ sctDetectorTool ]
acc.addService(geoModelSvc)
if flags.GeoModel.Align.Dynamic:
acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/AlignL1/ID","/Indet/AlignL1/ID",className="CondAttrListCollection"))
acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/AlignL2/SCT","/Indet/AlignL2/SCT",className="CondAttrListCollection"))
......
......@@ -8,7 +8,8 @@ from IOVDbSvc.IOVDbSvcConfig import addFoldersSplitOnline
def TRT_GeometryCfg( flags ):
from AtlasGeoModel.GeoModelConfig import GeoModelCfg
acc,geoModelSvc = GeoModelCfg( flags )
acc = GeoModelCfg( flags )
geoModelSvc=acc.getPrimary()
from GeometryDBSvc.GeometryDBSvcConf import GeometryDBSvc
acc.addService(GeometryDBSvc("InDetGeometryDBSvc"))
from TRT_GeoModel.TRT_GeoModelConf import TRT_DetectorTool
......
......@@ -4,14 +4,12 @@ from IOVDbSvc.IOVDbSvcConfig import addFolders
def LArGMCfg(configFlags):
result,gms=GeoModelCfg(configFlags)
result=GeoModelCfg(configFlags)
doAlignment=configFlags.LAr.doAlign
from LArGeoAlgsNV.LArGeoAlgsNVConf import LArDetectorToolNV
gms.DetectorTools += [ LArDetectorToolNV(ApplyAlignments=doAlignment) ]
result.addService(gms)
result.getPrimary().DetectorTools += [ LArDetectorToolNV(ApplyAlignments=doAlignment) ]
if doAlignment:
if configFlags.Input.isMC:
......
......@@ -12,7 +12,8 @@ def MuonGeoModelCfg(flags):
acc = ComponentAccumulator()
# get the GeoModelSvc and add MuonDetectorTool
gmsAcc,gms=GeoModelCfg(flags )
gmsAcc=GeoModelCfg(flags )
gms=gmsAcc.getPrimary()
acc.merge(gmsAcc)
detTool = MuonDetectorTool()
......@@ -46,7 +47,6 @@ def MuonGeoModelCfg(flags):
acc.addService(AGDD2Geo)
gms.DetectorTools += [ detTool ]
acc.addService(gms)
# Temporary, until we move to services/private tools
acc.addPublicTool( Muon__MuonIdHelperTool() )
......
......@@ -4,12 +4,10 @@ from AthenaCommon.Configurable import Configurable
Configurable.configurableRun3Behavior=1
def TileGMCfg(configFlags):
result,gms=GeoModelCfg(configFlags)
result=GeoModelCfg(configFlags)
from TileGeoModel.TileGeoModelConf import TileDetectorTool
gms.DetectorTools += [ TileDetectorTool() ]
result.addService(gms)
result.getPrimary().DetectorTools += [ TileDetectorTool() ]
return result
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment