Skip to content
Snippets Groups Projects
Commit e32c86ad authored by Savannah Rose Shively's avatar Savannah Rose Shively
Browse files
parents c8c4c519 a67bc80d
No related branches found
No related tags found
1 merge request!94SimHitAlg
This commit is part of merge request !94. Comments created here will be created in the context of that merge request.
Showing
with 173 additions and 19 deletions
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
from __future__ import print_function
from AthenaConfiguration.ComponentFactory import CompFactory
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
AthSequencer=CompFactory.AthSequencer
def MainServicesMiniCfg(loopMgr='AthenaEventLoopMgr', masterSequence='AthAlgSeq'):
#Mininmal basic config, just good enough for HelloWorld and alike
cfg=ComponentAccumulator(masterSequence)
cfg.setAsTopLevel()
cfg.setAppProperty('TopAlg',['AthSequencer/'+masterSequence])
cfg.setAppProperty('MessageSvcType', 'MessageSvc')
cfg.setAppProperty('EventLoop', loopMgr)
cfg.setAppProperty('ExtSvcCreates', 'False')
cfg.setAppProperty('JobOptionsSvcType', 'JobOptionsSvc')
cfg.setAppProperty('JobOptionsType', 'NONE')
cfg.setAppProperty('JobOptionsPostAction', '')
cfg.setAppProperty('JobOptionsPreAction', '')
cfg.setAppProperty('PrintAlgsSequence', True)
return cfg
def MainServicesCfg(cfgFlags):
# Run a serial job for threads=0
LoopMgr = 'AthenaEventLoopMgr'
if cfgFlags.Concurrency.NumThreads>0:
if cfgFlags.Concurrency.NumConcurrentEvents==0:
# In a threaded job this will mess you up because no events will be processed
raise Exception("Requested Concurrency.NumThreads>0 and Concurrency.NumConcurrentEvents==0, which will not process events!")
LoopMgr = "AthenaHiveEventLoopMgr"
########################################################################
# Core components needed for serial and threaded jobs
cfg=MainServicesMiniCfg(loopMgr=LoopMgr, masterSequence='AthMasterSeq')
cfg.setAppProperty('OutStreamType', 'AthenaOutputStream')
#Build standard sequences:
cfg.addSequence(AthSequencer('AthAlgEvtSeq',Sequential=True, StopOverride=True),parentName="AthMasterSeq")
cfg.addSequence(AthSequencer('AthOutSeq',StopOverride=True),parentName="AthMasterSeq")
cfg.addSequence(AthSequencer('AthBeginSeq',Sequential=True),parentName='AthAlgEvtSeq')
cfg.addSequence(AthSequencer('AthAllAlgSeq',StopOverride=True),parentName='AthAlgEvtSeq')
if cfgFlags.Concurrency.NumThreads==0:
# For serial execution, we need the CondAlgs to execute first.
cfg.addSequence(AthSequencer('AthCondSeq',StopOverride=True),parentName='AthAllAlgSeq')
cfg.addSequence(AthSequencer('AthAlgSeq',IgnoreFilterPassed=True,StopOverride=True),parentName='AthAllAlgSeq')
else:
# In MT, the order of execution is irrelevant (determined by data deps).
# We add the conditions sequence later such that the CondInputLoader gets
# initialized after all other user Algorithms for MT, so the base classes
# of data deps can be correctly determined.
cfg.addSequence(AthSequencer('AthAlgSeq',IgnoreFilterPassed=True,StopOverride=True),parentName='AthAllAlgSeq')
cfg.addSequence(AthSequencer('AthCondSeq',StopOverride=True),parentName='AthAllAlgSeq')
cfg.addSequence(AthSequencer('AthEndSeq',Sequential=True),parentName='AthAlgEvtSeq')
cfg.setAppProperty('PrintAlgsSequence', True)
#Set up incident firing:
AthIncFirerAlg=CompFactory.AthIncFirerAlg
IncidentProcAlg=CompFactory.IncidentProcAlg
cfg.addEventAlgo(AthIncFirerAlg("BeginIncFiringAlg",FireSerial=False,Incidents=['BeginEvent']),sequenceName='AthBeginSeq')
cfg.addEventAlgo(IncidentProcAlg('IncidentProcAlg1'),sequenceName='AthBeginSeq')
cfg.addEventAlgo(AthIncFirerAlg('EndIncFiringAlg',FireSerial=False,Incidents=['EndEvent']), sequenceName="AthEndSeq")
cfg.addEventAlgo(IncidentProcAlg('IncidentProcAlg2'),sequenceName="AthEndSeq")
#Basic services:
ClassIDSvc=CompFactory.ClassIDSvc
cfg.addService(ClassIDSvc(CLIDDBFiles= ['clid.db',"Gaudi_clid.db" ]))
StoreGateSvc=CompFactory.StoreGateSvc
cfg.addService(StoreGateSvc())
cfg.addService(StoreGateSvc("DetectorStore"))
cfg.addService(StoreGateSvc("HistoryStore"))
cfg.addService(StoreGateSvc("ConditionStore"))
from FaserGeoModel.GeoModelConfig import GeoModelCfg
cfg.merge( GeoModelCfg(cfgFlags) )
cfg.addService(CompFactory.DetDescrCnvSvc(), create=True)
cfg.addService(CompFactory.CoreDumpSvc(), create=True)
cfg.setAppProperty('InitializationLoopCheck',False)
cfg.setAppProperty('EvtMax',cfgFlags.Exec.MaxEvents)
msgsvc=CompFactory.MessageSvc()
msgsvc.OutputLevel=cfgFlags.Exec.OutputLevel
cfg.addService(msgsvc)
if cfgFlags.Exec.DebugStage != "":
cfg.setDebugStage(cfgFlags.Exec.DebugStage)
########################################################################
# Additional components needed for threaded jobs only
if cfgFlags.Concurrency.NumThreads>0:
# Migrated code from AtlasThreadedJob.py
AuditorSvc=CompFactory.AuditorSvc
msgsvc.defaultLimit = 0
msgsvc.Format = "% F%40W%S%4W%R%e%s%8W%R%T %0W%M"
SG__HiveMgrSvc=CompFactory.SG.HiveMgrSvc
hivesvc = SG__HiveMgrSvc("EventDataSvc")
hivesvc.NSlots = cfgFlags.Concurrency.NumConcurrentEvents
cfg.addService( hivesvc )
AlgResourcePool=CompFactory.AlgResourcePool
from AthenaCommon.Constants import INFO
arp=AlgResourcePool( OutputLevel = INFO )
arp.TopAlg=["AthMasterSeq"] #this should enable control flow
cfg.addService( arp )
AvalancheSchedulerSvc=CompFactory.AvalancheSchedulerSvc
scheduler = AvalancheSchedulerSvc()
scheduler.CheckDependencies = cfgFlags.Scheduler.CheckDependencies
scheduler.ShowDataDependencies = cfgFlags.Scheduler.ShowDataDeps
scheduler.ShowDataFlow = cfgFlags.Scheduler.ShowDataFlow
scheduler.ShowControlFlow = cfgFlags.Scheduler.ShowControlFlow
scheduler.ThreadPoolSize = cfgFlags.Concurrency.NumThreads
cfg.addService(scheduler)
SGInputLoader=CompFactory.SGInputLoader
# FailIfNoProxy=False makes it a warning, not an error, if unmet data
# dependencies are not found in the store. It should probably be changed
# to True eventually.
inputloader = SGInputLoader (FailIfNoProxy = False)
cfg.addEventAlgo( inputloader, "AthAlgSeq" )
scheduler.DataLoaderAlg = inputloader.getName()
AthenaHiveEventLoopMgr=CompFactory.AthenaHiveEventLoopMgr
elmgr = AthenaHiveEventLoopMgr()
elmgr.WhiteboardSvc = "EventDataSvc"
elmgr.SchedulerSvc = scheduler.getName()
cfg.addService( elmgr )
# enable timeline recording
TimelineSvc=CompFactory.TimelineSvc
cfg.addService( TimelineSvc( RecordTimeline = True, Partial = False ) )
#
## Setup SGCommitAuditor to sweep new DataObjects at end of Alg execute
#
SGCommitAuditor=CompFactory.SGCommitAuditor
cfg.addService( AuditorSvc(Auditors=[SGCommitAuditor().getFullJobOptName(),]))
cfg.setAppProperty("AuditAlgorithms", True)
return cfg
......@@ -66,7 +66,7 @@ if __name__ == "__main__":
ConfigFlags.lock()
# Configure components
from AthenaConfiguration.MainServicesConfig import MainServicesCfg
from CalypsoConfiguration.MainServicesConfig import MainServicesCfg
acc = MainServicesCfg(ConfigFlags)
# Set things up to create a conditions DB with neutral Tracker alignment transforms
......
......@@ -33,7 +33,7 @@ if __name__ == "__main__":
ConfigFlags.lock()
# Configure components
from AthenaConfiguration.MainServicesConfig import MainServicesCfg
from CalypsoConfiguration.MainServicesConfig import MainServicesCfg
from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
acc = MainServicesCfg(ConfigFlags)
acc.merge(PoolReadCfg(ConfigFlags))
......
......@@ -41,7 +41,7 @@ if __name__ == "__main__":
ConfigFlags.lock()
# Configure components
from AthenaConfiguration.MainServicesConfig import MainServicesCfg
from CalypsoConfiguration.MainServicesConfig import MainServicesCfg
from AthenaPoolCnvSvc.PoolWriteConfig import PoolWriteCfg
acc = MainServicesCfg(ConfigFlags)
......
......@@ -41,7 +41,7 @@ if __name__ == "__main__":
ConfigFlags.lock()
# Configure components
from AthenaConfiguration.MainServicesConfig import MainServicesCfg
from CalypsoConfiguration.MainServicesConfig import MainServicesCfg
from AthenaPoolCnvSvc.PoolWriteConfig import PoolWriteCfg
acc = MainServicesCfg(ConfigFlags)
......
......@@ -41,7 +41,7 @@ if __name__ == "__main__":
ConfigFlags.lock()
# Configure components
from AthenaConfiguration.MainServicesConfig import MainServicesCfg
from CalypsoConfiguration.MainServicesConfig import MainServicesCfg
from AthenaPoolCnvSvc.PoolWriteConfig import PoolWriteCfg
acc = MainServicesCfg(ConfigFlags)
......
......@@ -58,7 +58,7 @@ if __name__ == "__main__":
ConfigFlags.lock()
# Configure components
from AthenaConfiguration.MainServicesConfig import MainServicesCfg
from CalypsoConfiguration.MainServicesConfig import MainServicesCfg
acc = MainServicesCfg(ConfigFlags)
# Set things up to create a conditions DB with neutral Tracker alignment transforms
......
......@@ -17,7 +17,7 @@ if __name__ == "__main__":
from AthenaCommon.Constants import DEBUG
from AthenaCommon.Configurable import Configurable
from CalypsoConfiguration.AllConfigFlags import ConfigFlags
from AthenaConfiguration.MainServicesConfig import MainServicesCfg
from CalypsoConfiguration.MainServicesConfig import MainServicesCfg
from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
# Set up logging and new style config
log.setLevel(DEBUG)
......
......@@ -26,7 +26,7 @@ def GeoModelCfg(configFlags):
if configFlags.Detector.Simulate:
## Protects GeoModelSvc in the simulation from the AlignCallbacks
gms.AlignCallbacks = False
result.addService(gms,primary=True)
result.addService(gms,primary=True,create=True)
#Get DetDescrCnvSvc (for identifier dictionaries (identifier helpers)
......
......@@ -16,7 +16,7 @@ if __name__ == "__main__":
from AthenaCommon.Constants import DEBUG
from AthenaCommon.Configurable import Configurable
from CalypsoConfiguration.AllConfigFlags import ConfigFlags
from AthenaConfiguration.MainServicesConfig import MainServicesCfg
from CalypsoConfiguration.MainServicesConfig import MainServicesCfg
from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
# Set up logging and new style config
log.setLevel(DEBUG)
......
......@@ -25,7 +25,7 @@ if __name__ == "__main__":
from AthenaCommon.Constants import DEBUG
from AthenaCommon.Configurable import Configurable
from AthenaConfiguration.AllConfigFlags import ConfigFlags
from AthenaConfiguration.MainServicesConfig import MainServicesCfg
from CalypsoConfiguration.MainServicesConfig import MainServicesCfg
from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
# Set up logging and new style config
log.setLevel(DEBUG)
......
......@@ -10,7 +10,7 @@ if __name__ == "__main__":
from AthenaCommon.Constants import VERBOSE, INFO
from AthenaCommon.Configurable import Configurable
from CalypsoConfiguration.AllConfigFlags import ConfigFlags
from AthenaConfiguration.MainServicesConfig import MainServicesCfg
from CalypsoConfiguration.MainServicesConfig import MainServicesCfg
from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
# Set up logging and new style config
from FaserGeoModel.FaserGeoModelConfig import FaserGeometryCfg
......
......@@ -10,7 +10,7 @@ git clone --recursive https://:@gitlab.cern.ch:8443/$USERNAME/calypso.git
#The next three lines are used to setup the ATLAS release environment
export ATLAS_LOCAL_ROOT_BASE=/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase
source ${ATLAS_LOCAL_ROOT_BASE}/user/atlasLocalSetup.sh
asetup --input=calypso/asetup.faser master,latest,Athena
asetup --input=calypso/asetup.faser Athena,22.0.18
#create build directory
mkdir build
......
......@@ -13,7 +13,7 @@ if __name__ == "__main__":
from AthenaCommon.Constants import VERBOSE, INFO
from AthenaCommon.Configurable import Configurable
from CalypsoConfiguration.AllConfigFlags import ConfigFlags
from AthenaConfiguration.MainServicesConfig import MainServicesCfg
from CalypsoConfiguration.MainServicesConfig import MainServicesCfg
from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
from McEventSelector.McEventSelectorConfig import McEventSelectorCfg
from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
......
......@@ -4,7 +4,7 @@
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
"""
if __name__ == '__main__':
from AthenaConfiguration.MainServicesConfig import MainServicesCfg
from CalypsoConfiguration.MainServicesConfig import MainServicesCfg
import os
# Set up logging and config behaviour
......
......@@ -9,7 +9,7 @@ from AthenaCommon.Constants import DEBUG, VERBOSE, INFO
from AthenaCommon.Configurable import Configurable
from CalypsoConfiguration.AllConfigFlags import ConfigFlags
from AthenaConfiguration.TestDefaults import defaultTestFiles
from AthenaConfiguration.MainServicesConfig import MainServicesCfg
from CalypsoConfiguration.MainServicesConfig import MainServicesCfg
from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
from AthenaPoolCnvSvc.PoolWriteConfig import PoolWriteCfg
from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
......
......@@ -8,7 +8,7 @@ from AthenaCommon.Constants import DEBUG
from AthenaCommon.Configurable import Configurable
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from AthenaConfiguration.AllConfigFlags import ConfigFlags
from AthenaConfiguration.MainServicesConfig import MainServicesCfg
from CalypsoConfiguration.MainServicesConfig import MainServicesCfg
from AthenaConfiguration.TestDefaults import defaultTestFiles
from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
from AtlasGeoModel.InDetGMConfig import InDetGeometryCfg
......
......@@ -9,7 +9,7 @@ from AthenaCommon.Constants import DEBUG, VERBOSE, INFO
from AthenaCommon.Configurable import Configurable
from CalypsoConfiguration.AllConfigFlags import ConfigFlags
from AthenaConfiguration.TestDefaults import defaultTestFiles
from AthenaConfiguration.MainServicesConfig import MainServicesCfg
from CalypsoConfiguration.MainServicesConfig import MainServicesCfg
from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
from AthenaPoolCnvSvc.PoolWriteConfig import PoolWriteCfg
from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
......
......@@ -9,7 +9,7 @@ from AthenaCommon.Constants import DEBUG, VERBOSE, INFO
from AthenaCommon.Configurable import Configurable
from CalypsoConfiguration.AllConfigFlags import ConfigFlags
from AthenaConfiguration.TestDefaults import defaultTestFiles
from AthenaConfiguration.MainServicesConfig import MainServicesCfg
from CalypsoConfiguration.MainServicesConfig import MainServicesCfg
from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
from AthenaPoolCnvSvc.PoolWriteConfig import PoolWriteCfg
from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
......
......@@ -9,7 +9,7 @@ from AthenaCommon.Constants import DEBUG, VERBOSE, INFO
from AthenaCommon.Configurable import Configurable
from CalypsoConfiguration.AllConfigFlags import ConfigFlags
from AthenaConfiguration.TestDefaults import defaultTestFiles
from AthenaConfiguration.MainServicesConfig import MainServicesCfg
from CalypsoConfiguration.MainServicesConfig import MainServicesCfg
from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
from AthenaPoolCnvSvc.PoolWriteConfig import PoolWriteCfg
from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
......
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