Example #1
0
def inputFileNames():
    from AthenaCommon.AthenaCommonFlags import athenaCommonFlags

    if athenaCommonFlags.FilesInput() != []:
        return athenaCommonFlags.FilesInput()
    from RecExConfig.RecFlags import rec
    inFiles = None

    # highest flag have precedence
    if rec.readTAG():
        inFiles = athenaCommonFlags.PoolTAGInput()
    elif rec.readAOD():
        inFiles = athenaCommonFlags.PoolAODInput()
    elif rec.readESD():
        inFiles = athenaCommonFlags.PoolESDInput()
    elif rec.readRDO():
        from AthenaCommon.GlobalFlags import globalflags
        if globalflags.InputFormat == 'bytestream':
            inFiles = athenaCommonFlags.BSRDOInput()
        else:
            inFiles = athenaCommonFlags.PoolRDOInput()
    else:
        raise RutimeError("Unable to determine input file")

    return inFiles
Example #2
0
def InputFileNames():
    from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
    if athenaCommonFlags.FilesInput() != []:
        return athenaCommonFlags.FilesInput()
    from RecExConfig.RecFlags import rec
    inFiles = None

    ## FIXME
    ##     if (not athenaCommonFlags.PoolTAGInput.isDefault() or rec.readTAG() ):
    ##         inFiles=athenaCommonFlags.PoolTAGInput()
    ##     elif (not athenaCommonFlags.PoolAODInput.isDefault() or rec.readAOD() ):
    ##         inFiles=athenaCommonFlags.PoolAODInput()
    ##     elif (not athenaCommonFlags.PoolESDInput.isDefault() or rec.readESD() ):
    ##         inFiles=athenaCommonFlags.PoolESDInput()
    ##     elif not athenaCommonFlags.BSRDOInput.isDefault():
    ##         inFiles=athenaCommonFlags.BSRDOInput()
    ##     elif not athenaCommonFlags.PoolRDOInput.isDefault():
    ##         inFiles=athenaCommonFlags.PoolRDOInput()

    if rec.readTAG():
        inFiles = athenaCommonFlags.PoolTAGInput()
    elif rec.readAOD():
        inFiles = athenaCommonFlags.PoolAODInput()
    elif rec.readESD():
        inFiles = athenaCommonFlags.PoolESDInput()

    elif rec.readRDO():
        from AthenaCommon.GlobalFlags import globalflags
        if globalflags.InputFormat == 'bytestream':
            inFiles = athenaCommonFlags.BSRDOInput()
        else:
            inFiles = athenaCommonFlags.PoolRDOInput()
    else:
        raise RuntimeError("Unable to determine input file")

    return inFiles
Example #3
0
#--------------------------------------------------------------
# Template jobOptions: SLHC
#  - Tracking
#--------------------------------------------------------------

from AthenaCommon.AthenaCommonFlags import athenaCommonFlags

if not athenaCommonFlags.PoolRDOInput.isDefault():
    athenaCommonFlags.FilesInput = athenaCommonFlags.PoolRDOInput()
elif not athenaCommonFlags.PoolESDInput.isDefault():
    athenaCommonFlags.FilesInput = athenaCommonFlags.PoolESDInput()

from RecExConfig.RecFlags import rec
# --- Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL )
OutputLevel = INFO
# --- produce an atlantis data file
doJiveXML = False
# --- run the Virtual Point 1 event visualisation
doVP1 = False
# --- controls what is written out. ESD includes AOD, so it's normally enough
doWriteESD = rec.doWriteESD()
doWriteAOD = rec.doWriteAOD()
# --- read BS - please look at the default input file(s) to know the det descr and cond tag
doReadBS = False
# --- do auditors ?
doAuditors = True

if os.environ['CMTCONFIG'].endswith('-dbg'):
    # --- do EDM monitor (debug mode only)
    doEdmMonitor = True
    # --- write out a short message upon entering or leaving each algorithm
Example #4
0
    if type(BSRDOInput) == type(''):
        athenaCommonFlags.BSRDOInput = [BSRDOInput]
    else:
        athenaCommonFlags.BSRDOInput = BSRDOInput
elif PoolRDOInput != None:
    globalflags.InputFormat = 'pool'
    if type(PoolRDOInput) == type(''):
        athenaCommonFlags.PoolRDOInput = [PoolRDOInput]
    else:
        athenaCommonFlags.PoolRDOInput = PoolRDOInput

# Conditions and geometry tag
if globalflags.InputFormat.is_pool() and (setDetDescr == None
                                          or setGlobalTag == None):
    import PyUtils.AthFile as athFile
    af = athFile.fopen(athenaCommonFlags.PoolRDOInput()[0])
    if setDetDescr == None:
        setDetDescr = af.fileinfos.get('geometry', None)
        log.info(
            'Geometry tag not specified. Setting from file meta data: setDetDescr="%s"'
            % setDetDescr)
    if setGlobalTag == None:
        setGlobalTag = af.fileinfos.get('conditions_tag', None)
        log.info(
            'Global conditions tag not specified. Setting from file meta data: setGlobalTag="%s"'
            % setGlobalTag)

if setDetDescr == None:
    raise RuntimeError(
        'No geometry tag specified. Please use "setDetDescr" to set it.')
if setGlobalTag == None:
Example #5
0
# ----------------------------------------------------------------
svcMgr.AtlasFieldSvc.UseDCS = False  # no DCS
svcMgr.AtlasFieldSvc.LockMapCurrents = True  # no field scaling
svcMgr.AtlasFieldSvc.SoleMinCurrent = 160  # Standby current is 150A
svcMgr.AtlasFieldSvc.ToroMinCurrent = 210  # Standby current is 200A
# Read currents from IS if available
if onlEventLoopMgr:
    onlEventLoopMgr.setMagFieldFromPtree = True

# ----------------------------------------------------------------
# Pool input
# ----------------------------------------------------------------
if globalflags.InputFormat() == 'pool':
    import AthenaPoolCnvSvc.ReadAthenaPool  # noqa: F401 configuration by import, old Run-2 job options
    svcMgr.AthenaPoolCnvSvc.PoolAttributes = ["DEFAULT_BUFFERSIZE = '2048'"]
    svcMgr.EventSelector.InputCollections = athenaCommonFlags.PoolRDOInput()
    svcMgr.PoolSvc.AttemptCatalogPatch = True

# ----------------------------------------------------------------
# ByteStream input
# ----------------------------------------------------------------
from AthenaCommon.AlgSequence import AlgSequence
topSequence = AlgSequence()

if globalflags.InputFormat() == 'bytestream':

    # This is only needed running athena (as opposed to athenaMT/PT)
    if not hasattr(svcMgr, "ByteStreamCnvSvc"):
        from ByteStreamCnvSvc import ReadByteStream  # noqa: F401 configuration by import, old Run-2 job options
        # Define the input
        svcMgr.EventSelector.Input = athenaCommonFlags.BSRDOInput()
Example #6
0
from InDetRecExample.InDetJobProperties import InDetFlags

# --- do tracking D3PD
from InDetRecExample.InDetKeys import InDetKeys
if hasattr(runArgs, "outputDESDM_TRACKFile"):
    InDetFlags.doTrkD3PD.set_Value_and_Lock(True)
    InDetKeys.trkD3PDFileName.set_Value_and_Lock(runArgs.outputDESDM_TRACKFile)

# --- Set output names such that they work with Reco_trf.py
if athenaCommonFlags.PoolESDOutput():
    InDetKeys.OutputESDFileName = athenaCommonFlags.PoolESDOutput()
if athenaCommonFlags.PoolAODOutput():
    InDetKeys.OutputAODFileName = athenaCommonFlags.PoolAODOutput()
#--------------------------------------------------------------
# load master joboptions file
#--------------------------------------------------------------

include("InDetRecExample/InDetRec_all.py")

#--------------------------------------------------------------
# Event related parameters and input files
#--------------------------------------------------------------

# Number of events to be processed
theApp.EvtMax = athenaCommonFlags.EvtMax()

# --- default SLHC test file from digit output
ServiceMgr.EventSelector.InputCollections = athenaCommonFlags.PoolRDOInput()
athenaCommonFlags.FilesInput = athenaCommonFlags.PoolRDOInput()
Example #7
0
if not overlayFlags.isDataOverlay():
    job += CfgGetter.getAlgorithm("CopyTimings")

#-------------------------
# Double event selector
#-------------------------
import AthenaPoolCnvSvc.ReadAthenaPoolDouble
from AthenaCommon.AppMgr import ServiceMgr
from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
if overlayFlags.isDataOverlay():
    ServiceMgr.DoubleEventSelector.InputCollections = athenaCommonFlags.PoolHitsInput(
    )
    ServiceMgr.SecondaryEventSelector.Input = athenaCommonFlags.FilesInput()
    ServiceMgr.SecondaryEventSelector.ProcessBadEvent = True
else:
    ServiceMgr.DoubleEventSelector.InputCollections = athenaCommonFlags.PoolRDOInput(
    )
    ServiceMgr.SecondaryEventSelector.InputCollections = athenaCommonFlags.PoolHitsInput(
    )
if athenaCommonFlags.SkipEvents.statusOn:
    ServiceMgr.DoubleEventSelector.SkipEvents = athenaCommonFlags.SkipEvents()

# Properly generate event context
from AthenaCommon.ConcurrencyFlags import jobproperties as jp
nThreads = jp.ConcurrencyFlags.NumThreads()
if nThreads > 0:
    EventLoop = Service("AthenaHiveEventLoopMgr")
else:
    EventLoop = Service("AthenaEventLoopMgr")
EventLoop.UseSecondaryEventNumber = True
svcMgr += EventLoop