from AtlasGeoModel import SetGeometryVersion # For misalignments from IOVDbSvc.CondDB import conddb conddb.setGlobalTag('OFLCOND-SIM-00-00-00') # conddb.addOverride("/Indet/Align", "InDetAlign_R2_Nominal") from AthenaCommon.AppMgr import ServiceMgr # Read material step file import AthenaPoolCnvSvc.ReadAthenaPool ServiceMgr.EventSelector.InputCollections = ["MaterialStepFile.root"] from AthenaCommon.AlgScheduler import AlgScheduler AlgScheduler.OutputLevel( INFO ) AlgScheduler.ShowControlFlow( True ) AlgScheduler.ShowDataDependencies( True ) AlgScheduler.EnableConditions( True ) # AlgScheduler.setDataLoaderAlg( "SGInputLoader" ) from IOVSvc.IOVSvcConf import CondSvc svcMgr += CondSvc( OutputLevel=INFO ) # ServiceMgr += CfgMgr.THistSvc() # ServiceMgr.THistSvc.Output += ["MATTRACKVAL DATAFILE='MaterialTracks.root' OPT='RECREATE'"] # ServiceMgr.ToolSvc.OutputLevel = VERBOSE # Set up ACTS tracking geometry service
from AthenaCommon.AlgScheduler import AlgScheduler AlgScheduler.setDataLoaderAlg( "SGInputLoader" ) AlgScheduler.ShowDataDependencies( True ) AlgScheduler.ShowControlFlow( True ) from AthenaCommon.DetFlags import DetFlags digiExtraInputs = []#[('McEventCollection', 'TruthEvent')] digiExtraOutputs = [] StreamRDOExtraInputs = [('McEventCollection', 'TruthEvent')] if DetFlags.digitize.BCM_on(): StreamRDOExtraInputs += [( 'BCM_RDO_Container' , 'StoreGateSvc+BCM_RDOs' ), ( 'InDetSimDataCollection' , 'StoreGateSvc+BCM_SDO_Map' )] if DetFlags.digitize.pixel_on(): StreamRDOExtraInputs += [( 'PixelRDO_Container' , 'StoreGateSvc+PixelRDOs' ), ( 'InDetSimDataCollection' , 'StoreGateSvc+PixelSDO_Map' )] if DetFlags.digitize.SCT_on(): StreamRDOExtraInputs += [( 'SCT_RDO_Container' , 'StoreGateSvc+SCT_RDOs' ), ( 'InDetSimDataCollection' , 'StoreGateSvc+SCT_SDO_Map' )] if DetFlags.digitize.TRT_on(): StreamRDOExtraInputs += [( 'TRT_RDO_Container' , 'StoreGateSvc+TRT_RDOs' ), ( 'InDetSimDataCollection' , 'StoreGateSvc+TRT_SDO_Map' )] if DetFlags.digitize.LAr_on(): digiExtraOutputs += [('LArDigitContainer', 'LArDigitContainer_MC')] topSequence.LArRawChannelBuilder.ExtraInputs = [('LArDigitContainer', 'LArDigitContainer_MC')] topSequence.LArRawChannelBuilder.ExtraOutputs = [('LArRawChannelContainer', 'LArRawChannels')]
conddb.addFolder ('condtest_rw.db', '/DMTest/TestAttrList <tag>AttrList_noTag</tag>', className='AthenaAttributeList', extensible=True) #-------------------------------------------------------------- # Event related parameters #-------------------------------------------------------------- theApp.EvtMax = 20 #-------------------------------------------------------------- # Set up the algorithm. #-------------------------------------------------------------- from AthenaCommon.ConcurrencyFlags import jobproperties as jp nThreads = jp.ConcurrencyFlags.NumThreads() if nThreads >= 1: from AthenaCommon.AlgScheduler import AlgScheduler AlgScheduler.ShowDataDependencies (True) from DataModelTestDataCommon.DataModelTestDataCommonConf import (DMTest__CondReaderAlg, DMTest__CondWriterExtAlg, DMTest__CondAlg1) ## Setup writer alg that writes new conditions on given LB cmds = { 6 : "dmtest_condwriter.py --rs=0 --ls=8 'sqlite://;schema=condtest_rw.db;dbname=OFLP200' AttrList_noTag 42" } topSequence += DMTest__CondWriterExtAlg( Commands = cmds ) topSequence += DMTest__CondReaderAlg( S2Key = "") from AthenaCommon.AlgSequence import AthSequencer condSequence = AthSequencer("AthCondSeq") condSequence += DMTest__CondAlg1()
############################################################### # # Job options file # # Based on AthExStoreGateExamples # #============================================================== #-------------------------------------------------------------- # ATLAS default Application Configuration options #-------------------------------------------------------------- # Configure the scheduler from AthenaCommon.AlgScheduler import AlgScheduler AlgScheduler.ShowControlFlow( True ) AlgScheduler.ShowDataDependencies( True ) # Control flow from AthenaCommon.AlgSequence import AthSequencer allViewAlgorithms = AthSequencer( "allViewAlgorithms" ) allViewAlgorithms.ModeOR = False allViewAlgorithms.Sequential = False allViewAlgorithms.StopOverride = False makeViewSequence = AthSequencer( "makeViewSequence" ) makeViewSequence.ModeOR = False makeViewSequence.Sequential = True makeViewSequence.StopOverride = False # Event-level algorithm sequence from AthenaCommon.AlgSequence import AlgSequence
conddb.setGlobalTag(globalflags.ConditionsTag()) from AtlasGeoModel.InDetGMJobProperties import InDetGeometryFlags InDetGeometryFlags.useDynamicAlignFolders = True # Just the pixel and SCT DetFlags.ID_setOn() DetFlags.Calo_setOn() # Initialize geometry # THIS ACTUALLY DOES STUFF!! from AtlasGeoModel import GeoModelInit from AtlasGeoModel import SetGeometryVersion from AthenaCommon.AlgScheduler import AlgScheduler AlgScheduler.OutputLevel(INFO) AlgScheduler.ShowControlFlow(True) AlgScheduler.ShowDataDependencies(True) AlgScheduler.EnableConditions(True) AlgScheduler.setDataLoaderAlg("SGInputLoader") ## SET UP ALIGNMENT CONDITIONS ALGORITHM from IOVSvc.IOVSvcConf import CondSvc svcMgr += CondSvc(OutputLevel=INFO) from ActsGeometry import ActsGeometryConf from AthenaCommon.AlgSequence import AthSequencer condSeq = AthSequencer("AthCondSeq") # nominal alignment: all deltas are identity # condSeq += ActsGeometryConf.NominalAlignmentCondAlg("NominalAlignmentCondAlg", # OutputLevel=VERBOSE)
import AthenaCommon.AtlasUnixStandardJob # Setup logger from AthenaCommon.Logging import logging msg = logging.getLogger("testRodVeto") msg.setLevel(logging.INFO) #-------------------------------------------------------------- # Thread-specific setup #-------------------------------------------------------------- from AthenaCommon.ConcurrencyFlags import jobproperties numThreads = jobproperties.ConcurrencyFlags.NumThreads() if numThreads > 0: from AthenaCommon.AlgScheduler import AlgScheduler AlgScheduler.CheckDependencies(True) AlgScheduler.ShowControlFlow(True) AlgScheduler.ShowDataDependencies(True) # use auditors from AthenaCommon.AppMgr import ServiceMgr from GaudiSvc.GaudiSvcConf import AuditorSvc ServiceMgr += AuditorSvc() theAuditorSvc = ServiceMgr.AuditorSvc theAuditorSvc.Auditors += ["ChronoAuditor"] theAuditorSvc.Auditors += ["MemStatAuditor"] theApp.AuditAlgorithms = True #-------------------------------------------------------------- # Load Geometry
def _setupAtlasThreadedJob(): from AthenaCommon.AppMgr import theApp from AthenaCommon.AppMgr import ServiceMgr as svcMgr from AthenaCommon import Constants from AthenaCommon.ConcurrencyFlags import jobproperties as jps if (jps.ConcurrencyFlags.NumProcs() == 0): theApp.MessageSvcType = "InertMessageSvc" else: # InertMessageSvc doesn't play nice with MP theApp.MessageSvcType = "MessageSvc" svcMgr.MessageSvc.defaultLimit = 0 svcMgr.MessageSvc.Format = "% F%40W%S%4W%R%e%s%8W%R%T %0W%M" numStores = jps.ConcurrencyFlags.NumConcurrentEvents() from StoreGate.StoreGateConf import SG__HiveMgrSvc svcMgr += SG__HiveMgrSvc("EventDataSvc") svcMgr.EventDataSvc.NSlots = numStores from GaudiHive.GaudiHiveConf import AlgResourcePool arp = AlgResourcePool(OutputLevel=Constants.INFO) arp.TopAlg = ["AthMasterSeq"] #this should enable control flow svcMgr += arp from AthenaCommon.AlgScheduler import AlgScheduler AlgScheduler.ShowDataDependencies(False) AlgScheduler.ShowControlFlow(False) from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() from SGComps.SGCompsConf import 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. topSequence += SGInputLoader(FailIfNoProxy=False) AlgScheduler.setDataLoaderAlg('SGInputLoader') if theApp._opts.mtes: # Multi-threaded Event Service from AthenaServices.AthenaServicesConf import AthenaMtesEventLoopMgr svcMgr += AthenaMtesEventLoopMgr() svcMgr.AthenaMtesEventLoopMgr.WhiteboardSvc = "EventDataSvc" svcMgr.AthenaMtesEventLoopMgr.SchedulerSvc = AlgScheduler.getScheduler( ).getName() svcMgr.AthenaMtesEventLoopMgr.EventRangeChannel = theApp._opts.mtes_channel theApp.EventLoop = "AthenaMtesEventLoopMgr" else: from AthenaServices.AthenaServicesConf import AthenaHiveEventLoopMgr svcMgr += AthenaHiveEventLoopMgr() svcMgr.AthenaHiveEventLoopMgr.WhiteboardSvc = "EventDataSvc" svcMgr.AthenaHiveEventLoopMgr.SchedulerSvc = AlgScheduler.getScheduler( ).getName() theApp.EventLoop = "AthenaHiveEventLoopMgr" # enable timeline recording from GaudiHive.GaudiHiveConf import TimelineSvc svcMgr += TimelineSvc(RecordTimeline=True, Partial=False) # ## Setup SGCommitAuditor to sweep new DataObjects at end of Alg execute # theAuditorSvc = svcMgr.AuditorSvc theApp.AuditAlgorithms = True from SGComps.SGCompsConf import SGCommitAuditor theAuditorSvc += SGCommitAuditor()
muonStandaloneFlags.patternsOnly = False muonStandaloneFlags.createTrackParticles = False #muonStandaloneFlags.printSummary = True muonCombinedRecFlags.doTrackPerformance = True muonCombinedRecFlags.doMuGirl = True muonCombinedRecFlags.printSummary = True ##### no more flags after this line ##### try: include("MuonRecExample/MuonRec_topOptions.py") from AthenaCommon.AppMgr import ServiceMgr as svcMgr from AthenaCommon.AlgScheduler import AlgScheduler AlgScheduler.CheckDependencies( True ) AlgScheduler.ShowControlFlow( True ) AlgScheduler.ShowDataDependencies( True ) AlgScheduler.setDataLoaderAlg( 'SGInputLoader' ) from SGComps.SGCompsConf import SGInputLoader topSequence += SGInputLoader( OutputLevel=INFO, ShowEventDump=False ) # topSequence.SGInputLoader.Load = [ ('MdtCsmContainer','MDTCSM'), ('RpcPadContainer','RPCPAD'), ('TgcRdoContainer','TGCRDO'), ('CscRawDataContainer','CSCRDO')] ###### put any user finetuning after this line ##### #from MuonTestEDM.MuonTestEDMConf import MuonTestEDM #MyEDMTester = MuonTestEDM(DoDumpPRDs=True, DoDumpTracks=False, DoDumpRDOs=True, DoDumpSegments=False) #topSequence += MyEDMTester #if not 'DumpFileName' in dir(): # DumpFileName="ReadBS"
from AthenaServices.AthenaServicesConf import AthenaHiveEventLoopMgr svcMgr += AthenaHiveEventLoopMgr() # svcMgr.AthenaHiveEventLoopMgr.OutputLevel = DEBUG theApp.EventLoop = "AthenaHiveEventLoopMgr" numStores = 1 from StoreGate.StoreGateConf import SG__HiveMgrSvc svcMgr += SG__HiveMgrSvc("EventDataSvc") svcMgr.EventDataSvc.NSlots = numStores from AthenaCommon.AlgScheduler import AlgScheduler AlgScheduler.OutputLevel(DEBUG) AlgScheduler.ShowControlFlow(True) AlgScheduler.ShowDataDependencies(True) AlgScheduler.setThreadPoolSize(1) svcMgr += AthenaHiveEventLoopMgr() svcMgr.AthenaHiveEventLoopMgr.WhiteboardSvc = "EventDataSvc" svcMgr.AthenaHiveEventLoopMgr.OutputLevel = DEBUG from StoreGate.StoreGateConf import SG__HiveMgrSvc svcMgr += SG__HiveMgrSvc("EventDataSvc") svcMgr.EventDataSvc.NSlots = numStores svcMgr.EventDataSvc.OutputLevel = DEBUG from StoreGate.StoreGateConf import StoreGateSvc svcMgr += StoreGateSvc()
from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() from AthenaCommon.AlgSequence import AthSequencer condSeq = AthSequencer("AthCondSeq") #---------------------------------------------------------------------------------# # MT-specific code # Get number of processes and threads from AthenaCommon.ConcurrencyFlags import jobproperties as jp nThreads = jp.ConcurrencyFlags.NumThreads() nProc = jp.ConcurrencyFlags.NumProcs() if nThreads >= 1: from AthenaCommon.AlgScheduler import AlgScheduler AlgScheduler.OutputLevel(INFO) AlgScheduler.ShowControlFlow(True) AlgScheduler.ShowDataDependencies(True) AlgScheduler.setDataLoaderAlg('SGInputLoader') # Support for the MT-MP hybrid mode if (nProc > 0): from AthenaCommon.Logging import log as msg if (theApp.EvtMax == -1): msg.fatal('EvtMax must be >0 for hybrid configuration') sys.exit(AthenaCommon.ExitCodes.CONFIGURATION_ERROR) if (theApp.EvtMax % nProc != 0): msg.warning( 'EvtMax[%s] is not divisible by nProcs[%s]: MP Workers will not process all requested events',
# # A demonstration of inheriting data from a parent EventView # and the use of ViewDataVerifier to allow DataFlow with # the inherited data # #============================================================== #-------------------------------------------------------------- # ATLAS default Application Configuration options #-------------------------------------------------------------- totalViews = 3 # Configure the scheduler from AthenaCommon.AlgScheduler import AlgScheduler AlgScheduler.ShowControlFlow( True ) AlgScheduler.ShowDataDependencies( True ) AlgScheduler.EnableVerboseViews( True ) # Control flow from AthenaCommon.AlgSequence import AthSequencer view_1 = AthSequencer( "view_1" ) view_1.ModeOR = False view_1.Sequential = False view_1.StopOverride = False view_2 = AthSequencer( "view_2" ) view_2.ModeOR = False view_2.Sequential = False view_2.StopOverride = False viewSequence = AthSequencer( "viewSequence" ) viewSequence.ModeOR = False
############################################################### # # Job options file # # Based on AthExStoreGateExamples # #============================================================== #-------------------------------------------------------------- # ATLAS default Application Configuration options #-------------------------------------------------------------- # Configure the scheduler from AthenaCommon.AlgScheduler import AlgScheduler AlgScheduler.ShowControlFlow(True) AlgScheduler.ShowDataDependencies(True) # Make an extra StoreGate for the pileup events import StoreGate.StoreGateConf as StoreGateConf DigiStore = StoreGateConf.StoreGateSvc("digi_store") DigiStore.OutputLevel = VERBOSE svcMgr += DigiStore # Control flow from AthenaCommon.AlgSequence import AthSequencer allViewAlgorithms = AthSequencer("allViewAlgorithms") allViewAlgorithms.ModeOR = False allViewAlgorithms.Sequential = False allViewAlgorithms.StopOverride = False makeViewSequence = AthSequencer("makeViewSequence")
rec.doTruth = False #------------------------------------------------------------- # Apply modifiers #------------------------------------------------------------- for mod in modifierList: mod.preSetup() from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() #-------------------------------------------------------------- # Increase scheduler checks and verbosity #-------------------------------------------------------------- from AthenaCommon.AlgScheduler import AlgScheduler AlgScheduler.CheckDependencies(True) AlgScheduler.ShowControlFlow(True) AlgScheduler.ShowDataDependencies(True) AlgScheduler.EnableVerboseViews(True) #-------------------------------------------------------------- # Set the FailIfNoProxy property of SGInputLoader #-------------------------------------------------------------- if not hasattr(topSequence, "SGInputLoader"): log.error( 'Cannot set FailIfNoProxy property because SGInputLoader not found in topSequence' ) theApp.exit(1) topSequence.SGInputLoader.FailIfNoProxy = opt.failIfNoProxy #--------------------------------------------------------------