Esempio n. 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
Esempio n. 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
Esempio n. 3
0
globalflags.DetDescrVersion = setDetDescr
globalflags.Luminosity = 'zero'
globalflags.ConditionsTag = setGlobalTag

from AthenaCommon.BeamFlags import jobproperties
if ('Cosmic' in setMenu) or ('LS1_v1' in setMenu):
    jobproperties.Beam.beamType = 'cosmics'
else:
    jobproperties.Beam.beamType = 'collisions'

if globalflags.InputFormat == 'bytestream':
    if '_run_number' not in dir():
        import PyUtils.AthFile as athFile
        from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
        af = athFile.fopen(athenaCommonFlags.BSRDOInput()[0])
        _run_number = af.run_number[0]

    from RecExConfig.RecFlags import rec
    rec.RunNumber = _run_number

    if _run_number >= 276073:  #start of periodD1, 25ns bunch spacing
        jobproperties.Beam.bunchSpacing = 25
        log.info(
            'Bunch spacing set to %dns for a bytestream input. It can be overriden by BunchSpacing50ns=True'
            % jobproperties.Beam.bunchSpacing())

# RecEx flags
from RecExConfig.RecFlags import rec
rec.doWriteESD = False
rec.doWriteAOD = False
Esempio n. 4
0
################################################################################
# config
################################################################################

EvtMax = 2500
SkipEvents = 0
doLAr = True
doTile = False

from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
athenaCommonFlags.BSRDOInput = [
    '/afs/cern.ch/work/j/juraj/public/2015/LAr/264948/data15_calib.00264948.calibration_L1CaloEnergyScan.daq.RAW._lb0000._SFO-1._0003.data'
]
FilesInput = athenaCommonFlags.BSRDOInput()

################################################################################
# actual job options
################################################################################

# initial setup
from AthenaCommon.AlgSequence import AlgSequence
from AthenaCommon.AppMgr import ToolSvc, theApp, ServiceMgr
topSequence = AlgSequence()

# setup athenaCommonFlags
from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
athenaCommonFlags.EvtMax = EvtMax
athenaCommonFlags.SkipEvents = SkipEvents
athenaCommonFlags.FilesInput = FilesInput
del SkipEvents
del EvtMax
Esempio n. 5
0
# compose the tree
from InDetD3PDMaker.InDetD3PDMakerSCTFlags    import InDetD3PDSCTFlags

# uncomment the necessary one
InDetD3PDSCTFlags.doSCTNtuple = True # default
#InDetD3PDSCTFlags.doSCTNtupleLight = True
#InDetD3PDSCTFlags.doSCTNtupleExtended = True

#if not hasattr(runArgs,"inputRDOFile") and not hasattr(runArgs,"inputBSFile"):
#    include('InDetD3PDMaker/SCTNtuple.py')

include('InDetD3PDMaker/SCTNtuple.py')


#if globalflags.InputFormat() == 'bytestream':
#    from AnalysisTools.AthAnalysisToolsConf import AANTupleStream
#    AANTupleStream('D3PD').ExistDataHeader = False


#################################################################
if hasattr(runArgs,"maxEvents"):
   theApp.EvtMax=runArgs.maxEvents

#theApp.SkipEvents=1870
#ServiceMgr.EventSelector.SkipEvents=1870

if globalflags.InputFormat() == 'bytestream':
    ServiceMgr.EventSelector.Input = athenaCommonFlags.BSRDOInput()
else:
    ServiceMgr.EventSelector.InputCollections = InDetD3PDSCTFlags.inputFiles()
Esempio n. 6
0
reDoPrimaryVertexing = True
# --- redo particle creation (recommended after revertexing on ESD, otherwise trackparticles are inconsistent)
reDoParticleCreation = True
# --- redo conversion finding
reDoConversions = False
# --- redo V0 finding
reDoV0Finder = False
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
from AthenaCommon.GlobalFlags import globalflags

import AthenaPython.ConfigLib as apcl

if globalflags.InputFormat() == 'bytestream':
    cfg = apcl.AutoCfg(name='MyAutoConfig',
                       input_files=athenaCommonFlags.BSRDOInput())
    cfg.configure_job()
else:
    cfg = apcl.AutoCfg(name='MyAutoConfig',
                       input_files=athenaCommonFlags.FilesInput())
    cfg.configure_job()

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
from InDetRecExample.InDetJobProperties import InDetFlags

InDetFlags.doTruth = (globalflags.DataSource == 'geant4'
                      and globalflags.InputFormat == "pool")
InDetFlags.preProcessing = redoPatternRecoAndTracking

InDetFlags.doPRDFormation = False  # For SCT_Clusters
if globalflags.InputFormat() == 'bytestream':
#TrackD3PDSCTFlags.doSCTNtupleExtended = True

#if not hasattr(runArgs,"inputRDOFile") and not hasattr(runArgs,"inputBSFile"):
#    include('TrackD3PDMaker/SCTNtuple.py')

include('TrackD3PDMaker/SCTNtuple.py')


#if globalflags.InputFormat() == 'bytestream':
#    from AnalysisTools.AthAnalysisToolsConf import AANTupleStream
#    AANTupleStream('D3PD').ExistDataHeader = False


#################################################################
if hasattr(runArgs,"maxEvents"):
   theApp.EvtMax=runArgs.maxEvents

#theApp.SkipEvents=1870
#ServiceMgr.EventSelector.SkipEvents=1870

if globalflags.InputFormat() == 'bytestream':
    ServiceMgr.FullFileName=athenaCommonFlags.BSRDOInput()
else:
    ServiceMgr.EventSelector.InputCollections = TrackD3PDSCTFlags.inputFiles()






Esempio n. 8
0
from InDetRecExample.InDetJobProperties import InDetFlags
include("InDetRecExample/InDetRecConditionsAccess.py")

#-------------------------------------------------------------------------------

#-------------------------------------------------------------------------------
# BS conf.
#-------------------------------------------------------------------------------
# Store Gate
svcMgr += StoreGateSvc("BSMetaDataStore")
svcMgr += StoreGateSvc("BSStoreGate")

svcMgr += ByteStreamEventStorageInputSvc("ByteStreamInputSvc")
svcMgr.ByteStreamInputSvc.EventStore = svcMgr.BSStoreGate
svcMgr.ByteStreamInputSvc.MetaDataStore = svcMgr.BSMetaDataStore
svcMgr.ByteStreamInputSvc.FullFileName = athenaCommonFlags.BSRDOInput()

svcMgr += EventSelectorByteStream("BSEventSelector")
svcMgr.BSEventSelector.ByteStreamInputSvc = "ByteStreamInputSvc"
svcMgr.BSEventSelector.SkipEvents = SKIPEVENTS

svcMgr += ByteStreamCnvSvc()
svcMgr.ByteStreamCnvSvc.IsSimulation = True

svcMgr += ROBDataProviderSvc()

svcMgr.EventPersistencySvc.CnvServices += ["ByteStreamCnvSvc"]

svcMgr += ByteStreamAddressProviderSvc()

svcMgr.ByteStreamAddressProviderSvc.StoreID = 6
Esempio n. 9
0
include.block("TriggerTier0/TriggerConfigCheckHLTpsk.py")

from AthenaCommon.Logging import logging
mlog = logging.getLogger('TriggerConfigCheckHLTpsk')  ## get the logger

runNumbers = []
from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
if len(athenaCommonFlags.BSRDOInput()) > 0:
    from RecExConfig.InputFilePeeker import inputFileSummary
    if inputFileSummary.has_key(
            'run_number'
    ):  # online monitoring does not provide a run_number in the inputFileSummary (hence the rest of this program will be skipped)
        runNumbers = inputFileSummary['run_number']

if len(runNumbers) > 0:

    #from RecExConfig.RecAlgsFlags import recAlgs
    #from RecExConfig.RecFlags import rec
    from TriggerJobOpts.TriggerFlags import TriggerFlags

    ### Loop over the input files and find if a problematic one is there.
    ### If so, turn off the trigger.
    from PyCool import cool
    from CoolConvUtilities.AtlCoolLib import indirectOpen
    import PyUtils.AthFile as AthFile

    # get connection to COOL and find the HLT ps key

    from IOVDbSvc.CondDB import conddb
    coolDbConn = indirectOpen("COOLONL_TRIGGER/%s" % conddb.dbdata,
                              oracle=True)
Esempio n. 10
0
#acf.FilesInput=acf.BSRDOInput()

# specifying conditions by hand until auto configure is fixed
# this will break every time the default file changes
#log.warning("setting geometry and coniditions by hand, will break if default RDO file changes")

from AthenaCommon.GlobalFlags import globalflags
#globalflags.ConditionsTag.set_Value_and_Lock('OFLCOND-RUN12-SDR-22')
globalflags.InputFormat = 'bytestream'

#globalflags.ConditionsTag.set_Value_and_Lock("OFLCOND-RUN12-SDR-17")
#globalflags.DetDescrVersion.set_Value_and_Lock("ATLAS-GEO-21-02-02")

# check if file exists
import os
if not os.path.exists(acf.BSRDOInput()[0]):
    log.fatal(" ERROR FATAL Input file acf.BSRDOInput()[0] does not exist: " +
              acf.BSRDOInput()[0])
    exit(-2)

exit

#if not 'doWriteESD' in dir():

rec.doWriteESD = True
rec.doWriteRDO = False
rec.doWriteAOD = False
rec.doAOD = False
rec.doDPD = False
rec.doESD = True
rec.doWriteTAG = False