Пример #1
0
def _setupAtlasUnixGeneratorJob():
    from AthenaCommon import AtlasUnixStandardJob  # noqa: F401
    from AthenaCommon.AppMgr import theApp
    from AthenaCommon.AppMgr import ServiceMgr as svcMgr
    from AthenaCommon.Logging import logging
    log = logging.getLogger('AtlasUnixGeneratorJob')

    # General Application Configuration options
    from McEventSelector.McEventSelectorConf import McCnvSvc
    svcMgr += McCnvSvc()
    if hasattr(svcMgr, 'EventSelector'):
        log.warning(
            'EventSelector of type %s already exists. Will not add McEventSelector.',
            svcMgr.EventSelector.getType())
    else:
        from McEventSelector.McEventSelectorConf import McEventSelector
        svcMgr += McEventSelector("EventSelector")
        theApp.EvtSel = svcMgr.EventSelector.getFullName()

    # Persistency services
    svcMgr.EventPersistencySvc.CnvServices += ["McCnvSvc"]

    # Temporarily inject the xAOD::EventInfo converter here to allow for adiabatic migration of the clients
    from AthenaCommon.AlgSequence import AthSequencer
    topSequence = AthSequencer("AthAlgSeq")
    from xAODEventInfoCnv.xAODEventInfoCnvConf import xAODMaker__EventInfoCnvAlg
    topSequence += xAODMaker__EventInfoCnvAlg(AODKey='McEventInfo')

    return
Пример #2
0
def _setupAtlasUnixGeneratorJob():
    import AtlasUnixStandardJob
    from AppMgr import theApp
    from AppMgr import ServiceMgr as svcMgr

    # General Application Configuration options
    from McEventSelector.McEventSelectorConf import McCnvSvc
    from McEventSelector.McEventSelectorConf import McEventSelector
    svcMgr += McCnvSvc()
    if hasattr(svcMgr, 'EventSelector'): del svcMgr.EventSelector
    svcMgr += McEventSelector("EventSelector")
    theApp.EvtSel = svcMgr.EventSelector.getFullName()

    # Persistency services
    svcMgr.EventPersistencySvc.CnvServices += ["McCnvSvc"]
    return
        outAlgPicked.Run2 = IOVEnd
        pass

from RegistrationServices.RegistrationServicesConf import IOVRegistrationSvc

svcMgr += IOVRegistrationSvc()
#svcMgr.IOVRegistrationSvc.OutputLevel = DEBUG
svcMgr.IOVRegistrationSvc.RecreateFolders = False

###########################################################################
#               Use EventSelector to select IOV                           #
###########################################################################

from McEventSelector.McEventSelectorConf import McEventSelector

svcMgr += McEventSelector("EventSelector")
svcMgr.EventSelector.RunNumber = RunNumber
svcMgr.EventSelector.EventsPerRun = 1
svcMgr.EventSelector.FirstEvent = 1
svcMgr.EventSelector.InitialTimeStamp = 0
svcMgr.EventSelector.TimeStampInterval = 1

##########################################################################
#          don't remove otherwise infinite loop                          #
##########################################################################

theApp.EvtMax = 1

###########################################################################

#svcMgr.MessageSvc.OutputLevel  = WARNING
Пример #4
0
from LArCalibTools.LArCalibToolsConf import LArFillDSPConfig

topSequence += LArFillDSPConfig(Foldername=DSPConfigFolder, isLowMu=LowMu)

from RegistrationServices.OutputConditionsAlg import OutputConditionsAlg
theOutputConditionsAlg = OutputConditionsAlg(
    "OutputConditionsAlg", "dummy.pool.root", [
        "AthenaAttributeList#" + DSPConfigFolder,
    ], [
        "",
    ], True)

svcMgr.IOVDbSvc.dbConnection = "sqlite://;schema=" + OutputSqliteFile + ";dbname=CONDBR2"

from AthenaCommon.AppMgr import ServiceMgr
from RegistrationServices.RegistrationServicesConf import IOVRegistrationSvc
svcMgr += IOVRegistrationSvc()
svcMgr.IOVRegistrationSvc.OutputLevel = DEBUG
svcMgr.IOVRegistrationSvc.RecreateFolders = True
svcMgr.IOVRegistrationSvc.SVFolder = True

theApp.EvtMax = 1

from McEventSelector.McEventSelectorConf import McEventSelector
ServiceMgr += McEventSelector("EventSelector", RunNumber=2147483647)
#svcMgr.EventSelector.
#svcMgr.EventSelector.EventsPerRun      = 1
#svcMgr.EventSelector.FirstEvent = 1
#svcMgr.EventSelector.InitialTimeStamp  = 0
#svcMgr.EventSelector.TimeStampInterval = 1