Esempio n. 1
0
###############################################################
#
# Job options file
#
# Based on AthExStoreGateExamples
#
#==============================================================

#--------------------------------------------------------------
# ATLAS default Application Configuration options
#--------------------------------------------------------------

from GaudiHive.GaudiHiveConf import ForwardSchedulerSvc
svcMgr += ForwardSchedulerSvc()
#svcMgr.ForwardSchedulerSvc.CheckDependencies = True

# Use McEventSelector so we can run with AthenaMP
import AthenaCommon.AtlasUnixGeneratorJob

# Full job is a list of algorithms
from AthenaCommon.AlgSequence import AlgSequence
job = AlgSequence()

manualViewName1 = "view1"
manualViewName2 = "view2"

#Retrieve MC event info
#from SGComps.SGCompsConf import SGInputLoader
#job += SGInputLoader(OutputLevel=INFO, ShowEventDump=False)
#job.SGInputLoader.Load = [ ('EventInfo','McEventInfo') ]
def _setupAtlasThreadedJob():
    from AppMgr import theApp
    from AppMgr import ServiceMgr as svcMgr

    import SystemOfUnits as Units
    from Constants import VERBOSE, DEBUG, INFO, ERROR

    from 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
    msgFmt = "% F%40W%S%4W%e%s%7W%R%T %0W%M"
    svcMgr.MessageSvc.Format = msgFmt

    theApp.StatusCodeCheck = False

    from AthenaServices.AthenaServicesConf import AthenaHiveEventLoopMgr

    svcMgr += AthenaHiveEventLoopMgr()
    svcMgr.AthenaHiveEventLoopMgr.WhiteboardSvc = "EventDataSvc"
    #    svcMgr.AthenaHiveEventLoopMgr.OutputLevel = INFO

    theApp.EventLoop = "AthenaHiveEventLoopMgr"

    svcMgr.StatusCodeSvc.AbortOnError = False

    nThreads = jps.ConcurrencyFlags.NumThreads()
    numStores = nThreads
    numAlgsInFlight = nThreads
    numThreads = nThreads

    from StoreGate.StoreGateConf import SG__HiveMgrSvc
    svcMgr += SG__HiveMgrSvc("EventDataSvc")
    svcMgr.EventDataSvc.NSlots = numStores
    #    svcMgr.EventDataSvc.OutputLevel = INFO

    import StoreGate.StoreGateConf as StoreGateConf
    svcMgr += StoreGateConf.StoreGateSvc("ConditionStore")

    from GaudiHive.GaudiHiveConf import AlgResourcePool
    svcMgr += AlgResourcePool(OutputLevel=INFO)

    from GaudiHive.GaudiHiveConf import ForwardSchedulerSvc
    svcMgr += ForwardSchedulerSvc()
    svcMgr.ForwardSchedulerSvc.OutputLevel = INFO
    svcMgr.ForwardSchedulerSvc.MaxEventsInFlight = numStores
    svcMgr.ForwardSchedulerSvc.MaxAlgosInFlight = numAlgsInFlight
    svcMgr.ForwardSchedulerSvc.ThreadPoolSize = numThreads

    # 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()