def _loadBasicAthenaRoot(): """Loads the basic services for AthenaRoot""" from AthenaCommon import CfgMgr ## make sure we have been -at least- minimally correctly configured import AthenaCommon.AtlasUnixStandardJob from AthenaCommon.Logging import logging from AthenaCommon.AppMgr import ServiceMgr as svcMgr msg = logging.getLogger('loadBasicAthenaRoot') msg.debug("Loading basic services for AthenaRoot...") svcMgr += CfgMgr.Athena__RootSvc("AthenaRootSvc") svcMgr += CfgMgr.Athena__RootCnvSvc("AthenaRootCnvSvc") from AthenaCommon.AppMgr import theApp if not hasattr(svcMgr, 'EventPersistencySvc'): svcMgr += CfgMgr.EvtPersistencySvc("EventPersistencySvc") svcMgr.EventPersistencySvc.CnvServices += ["AthenaRootCnvSvc"] if not hasattr(svcMgr, 'ProxyProviderSvc'): svcMgr += CfgMgr.ProxyProviderSvc() # # Make sure AthenaSealSvc is loaded for dict check svcMgr += CfgMgr.AthenaSealSvc() # # Make sure AthenaPoolServices is loaded for custom streamer try: svcMgr += CfgMgr.AthenaRootStreamerSvc() except TypeError: msg.info("could not load AthenaRootStreamerSvc") pass # Load streamer allowing conversion of old CLHEP classes try: import AtlasSealCLHEP.OldCLHEPStreamers except ImportError: msg.info("could not load AtlasSealCLHEP") pass if not hasattr(svcMgr, 'InputMetaDataStore'): svcMgr += CfgMgr.StoreGateSvc("InputMetaDataStore") pass if not hasattr(svcMgr, 'MetaDataStore'): svcMgr += CfgMgr.StoreGateSvc("MetaDataStore") pass msg.debug("Loading basic services for AthenaRoot... [DONE]") return
# # Joboptions for loading the AthenaSealSvc # # Block multiple includes include.block("AthenaSealSvc/AthenaSealSvc_joboptions.py") # general application configuration options ## get a handle to the Service Manager from AthenaCommon.AppMgr import ServiceMgr as svcMgr from AthenaCommon import CfgMgr if not hasattr(svcMgr, 'AthenaSealSvc'): svcMgr += CfgMgr.AthenaSealSvc() ## put here additional configuration ## from AthenaCommon.Logging import logging msg = logging.getLogger('AthenaSealSvc') msg.info("DictNames: %r", svcMgr.AthenaSealSvc.DictNames) ## backward compat AthenaSealSvc = svcMgr.AthenaSealSvc