Skip to content
Snippets Groups Projects
Commit eb0aed7c authored by Duc Ta's avatar Duc Ta
Browse files

Merge branch 'recexcond' into '24.0'

RecExCond: delete legacy config package

See merge request atlas/athena!69410
parents 5eb07b1d a935a973
No related branches found
No related tags found
No related merge requests found
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# Declare the package name:
atlas_subdir( RecExCond )
# Install files from the package:
atlas_install_joboptions( share/*.py )
# include so that alldet_detdescr can be used directly from somewhere else
# (there is an include.block so that it is only loaded once)
include.block("RecExCond/AllDet_detDescr.py")
include ("RecExCond/RecExCommon_DetFlags.py")
from AthenaCommon.Logging import logging
from AthenaCommon.Resilience import treatException,protectedInclude
from RecExConfig.RecFlags import rec
logAllDet_detDescr = logging.getLogger( 'AllDet_detDescr' )
if DetFlags.detdescr.any_on():
# if an detdescr flag is on, then configure appropriately the
# StoreGateSvc/DetectorStore and the DetDescrCnvSvc
import DetDescrCnvSvc.DetStoreConfig
# guess geometry version from globalflags
# see AtlasGeomodel/SetGeometryVersion.py for the possibilities
# e.g. DetDescrVersion="Rome-Initial"
from AtlasGeoModel import SetGeometryVersion
from AtlasGeoModel import GeoModelInit
from AtlasGeoModel import SetupRecoGeometry
if DetFlags.detdescr.Tile_on() and not rec.doAODMerging():
protectedInclude( "TileConditions/TileConditions_jobOptions.py" )
if DetFlags.detdescr.Calo_on() and not rec.doAODMerging():
protectedInclude( "CaloIdCnv/CaloIdCnv_joboptions.py" )
#FIXME tile and lar not independent
protectedInclude( "TileIdCnv/TileIdCnv_jobOptions.py" )
if DetFlags.detdescr.LAr_on() and not rec.doAODMerging():
try:
include( "LArDetDescr/LArDetDescr_joboptions.py" )
except Exception:
DetFlags.Calo_setOff()
treatException("could not load LArDetDescr_jobOptions. Calo switched off")
from AthenaCommon.AppMgr import ServiceMgr
import DetDescrCnvSvc.DetStoreConfig
ServiceMgr.DetDescrCnvSvc.DecodeIdDict = TRUE
# Beam Spot service (only if ID requested)
from AthenaCommon.GlobalFlags import globalflags
# use even if commisisoning and not globalflags.DetGeo=='commis' :
if DetFlags.detdescr.ID_on() and not rec.doAODMerging():
protectedInclude("BeamSpotConditions/BeamCondAlgSetup.py" )
if DetFlags.detdescr.Muon_on() and not rec.doAODMerging():
protectedInclude ("AmdcAth/AmdcAth_jobOptions.py")
# MagneticField Service
if DetFlags.detdescr.BField_on() and not rec.doAODMerging():
#protectedInclude( "BFieldAth/BFieldAth_jobOptions.py" )
import MagFieldServices.SetupField
include.block("RecExCond/RecExCommon_DetFlags.py")
from AthenaCommon.Logging import logging
logRecExCommon_DetFlags = logging.getLogger( 'RecExCommon_DetFlags' )
from AthenaCommon.Resilience import treatException
if 'DetFlags' in dir():
logRecExCommon_DetFlags.info("DetFlags already defined.by user : user should have fully configured it already! ")
else:
from AthenaCommon.GlobalFlags import globalflags
# include DetFlags
# by default everything is off
from AthenaCommon.DetFlags import DetFlags
# switch on tasks for all detectors
DetFlags.detdescr.all_setOn()
# switch on dcs for all detectors
try:
# need AthenaCommon
DetFlags.dcs.all_setOn()
except Exception:
logRecExCommon_DetFlags.warning("could not set DetFlags.dcs")
pass
from RecExConfig.RecFlags import rec
if not rec.readESD() and not rec.readAOD() and not rec.doWriteRDO() :
DetFlags.makeRIO.all_setOn()
else:
DetFlags.makeRIO.all_setOff()
#calo cells are there on ESD
if rec.readESD() :
DetFlags.readRIOPool.Calo_setOn()
# savannah 73686
from RecExConfig.AutoConfiguration import IsInInputFile
from InDetRecExample.InDetKeys import InDetKeys
if IsInInputFile('InDet::PixelClusterContainer',InDetKeys.PixelClusters()):
DetFlags.readRIOPool.pixel_setOn()
if IsInInputFile('InDet::SCT_ClusterContainer',InDetKeys.SCT_Clusters()):
DetFlags.readRIOPool.SCT_setOn()
if IsInInputFile('InDet::TRT_DriftCircleContainer',InDetKeys.TRT_DriftCircles()):
DetFlags.readRIOPool.TRT_setOn()
if rec.doESD():
if IsInInputFile('PixelRDO_Container',InDetKeys.PixelRDOs()):
DetFlags.makeRIO.pixel_setOn()
if IsInInputFile('SCT_RDO_Container',InDetKeys.SCT_RDOs()):
DetFlags.makeRIO.SCT_setOn()
if IsInInputFile('TRT_RDO_Container',InDetKeys.TRT_RDOs()):
DetFlags.makeRIO.TRT_setOn()
DetFlags.readRIOPool.Muon_setOn()
if rec.readRDO:
if globalflags.InputFormat=='pool':
DetFlags.readRDOPool.all_setOn()
DetFlags.readRDOBS.all_setOff()
DetFlags.readRIOBS.all_setOff()
from RecExConfig.AutoConfiguration import IsInInputFile
from InDetRecExample.InDetKeys import InDetKeys
if IsInInputFile('InDet::PixelClusterContainer',InDetKeys.PixelClusters()):
DetFlags.readRIOPool.pixel_setOn()
DetFlags.makeRIO.pixel_setOff()
if IsInInputFile('InDet::SCT_ClusterContainer',InDetKeys.SCT_Clusters()):
DetFlags.readRIOPool.SCT_setOn()
DetFlags.makeRIO.SCT_setOff()
if IsInInputFile('InDet::TRT_DriftCircleContainer',InDetKeys.TRT_DriftCircles()):
DetFlags.readRIOPool.TRT_setOn()
DetFlags.makeRIO.TRT_setOff()
elif globalflags.InputFormat=='bytestream':
DetFlags.readRDOPool.all_setOff()
DetFlags.readRDOBS.all_setOn()
else:
DetFlags.readRDOPool.all_setOff()
DetFlags.readRDOBS.all_setOff()
#synch muon flags to detflags
try:
from MuonRecExample.MuonRecFlags import muonRecFlags
muonRecFlags.sync_DetFlags()
except Exception:
treatException ("Could not synch DetFlags to muonRecFlags")
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