예제 #1
0
def createStepRecoNode(name, seq_list, dump=False):
    """ elementary HLT reco step, contianing all sequences of the step """

    log.debug("Create reco step %s with %d sequences", name, len(seq_list))
    stepCF = parOR(name + CFNaming.RECO_POSTFIX)
    for seq in seq_list:
        stepCF += createCFTree(seq)

    if dump:
        dumpSequence(stepCF, indent=0)
    return stepCF
예제 #2
0
def createStepFilterNode(name, seq_list, dump=False):
    """ elementary HLT filter step: OR node containing all Filters of the sequences. The node gates execution of next reco step """

    log.debug("Create filter step %s with %d filters", name, len(seq_list))
    filter_list = []
    for seq in seq_list:
        filterAlg = seq.filter.Alg
        log.info("createStepFilterNode: Add  %s to filter node %s",
                 filterAlg.name(), name)
        if filterAlg not in filter_list:
            filter_list.append(filterAlg)

    stepCF = parOR(name + CFNaming.FILTER_POSTFIX, subs=filter_list)

    if dump:
        dumpSequence(stepCF, indent=0)
    return stepCF
예제 #3
0
def testHLTTree(inputSequence):
    """ Run all config tests """

    viewMakers = collectViewMakers(inputSequence)

    # List all CF nodes to be used with EventViews (and whether they are found)
    viewNodes = {}
    for viewMaker in viewMakers:
        viewNodes[viewMaker.ViewNodeName] = False
    originalLength = len(viewNodes)

    # Identify the algorithms that will run in EventViews
    wholeEventAlgs, viewAlgs = findViewAlgs(inputSequence.getChildren(),
                                            viewNodes)

    # Check that all view nodes are found
    if len(viewNodes) != originalLength:
        raise RuntimeError("Something went wrong with view config inspection")
    for viewNode in viewNodes.keys():
        if not viewNodes[viewNode]:
            raise RuntimeError("EventView CF node " + viewNode +
                               " was not found attached to the test sequence")

    # Look for view algs in the whole event context
    for viewAlgName in viewAlgs:
        if viewAlgName in wholeEventAlgs:
            from AthenaCommon.AlgSequence import dumpSequence
            dumpSequence(inputSequence)
            raise RuntimeError(
                viewAlgName +
                " is attached to an EventView node, but also runs in the whole event context"
            )

    # Make sure that VDVs are configured correctly
    allEVCAs = {}
    checkVDV(inputSequence.getChildren(), [inputSequence.name()], allEVCAs)

    # Check for inconsistent view maker search results
    if len(allEVCAs) != originalLength:
        raise RuntimeError(
            "EventView creator alg search found different results in structured search ("
            + str(originalLength) + ") versus naive search (" +
            str(len(allEVCAs)) + "). Implies menu structure error")
예제 #4
0
for tool in hypo_tools:
    # 100% accept rate, no ROB requests, sleeps for up to 1.4 seconds
    tool.RandomAcceptRate = 1.0
    tool.ROBAccessDict = []
    tool.BurnTimePerCycleMillisec = 200
    tool.NumBurnCycles = 7

hypo = Conf.make_hypo_alg('HypoAlg1')
hypo.HypoTools = hypo_tools
Conf.configure_hlt_result([hypo])
summary_algs = Conf.make_summary_algs([hypo])

# Create the L1 sequence and add to topSequence
from AthenaCommon.AlgSequence import AlgSequence
topSequence = AlgSequence()
topSequence += Conf.make_l1_seq()

# Create the HLT sequence and add to topSequence
from AthenaCommon.CFElements import seqOR
all_algs = [hypo]
all_algs.extend(summary_algs)
topSequence += seqOR('hltTop', all_algs)

# Print configuration for debugging
log.info('Dump of topSequence')
from AthenaCommon.AlgSequence import dumpSequence
dumpSequence(topSequence)
log.info('Dump of ServiceMgr')
from AthenaCommon.AppMgr import ServiceMgr
dumpSequence(ServiceMgr)
예제 #5
0
# Define streams and override StreamInfo
myAllStreams = [
    # [name, type, obeysLumiBlock, forceFullEventBuilding]
    StreamInfo.StreamInfo('Main', 'physics', True, True),
    StreamInfo.StreamInfo('TestPEBOne', 'physics', True, False),
    StreamInfo.StreamInfo('TestPEBTwo', 'calibration', True, False),
    StreamInfo.StreamInfo('TestPEBThree', 'physics', True, False),
    StreamInfo.StreamInfo('TestPEBFour', 'calibration', True, False),
    StreamInfo.StreamInfo('ElectronDSTest', 'physics', True, False),
    StreamInfo.StreamInfo('ElectronDSPEBTest', 'physics', True, False),
]

StreamInfo._all_streams = myAllStreams

# Set trigger flags
ConfigFlags.Trigger.triggerMenuSetup = TriggerFlags.triggerMenuSetup = 'LS2_v1'
TriggerFlags.Slices_all_setOff()
TriggerFlags.EgammaSlice.setAll()
TriggerFlags.MuonSlice.setAll()

# Set up everything to run HLT
include('TriggerJobOpts/runHLT_standalone.py')  # noqa: F821

# Generate the menu
menu = GenerateMenuMT()
allChainConfigs = menu.generateMT()

# Dump top sequence for debug information
dumpSequence(topSequence)  # noqa: F821
예제 #6
0
### commands here:

from AthenaCommon.Logging import logging
__log = logging.getLogger('full_menu')

from TriggerJobOpts.TriggerFlags import TriggerFlags
createHLTMenuExternally = True  # menu will be build up explicitly here
doWriteRDOTrigger = False
doWriteBS = False
forceEnableAllChains = True
TriggerFlags.triggerMenuSetup = "LS2_v1"

include("TriggerJobOpts/runHLT_standalone.py")

# make menu manually here:
from TriggerMenuMT.HLTMenuConfig.Menu.HLTCFConfig import makeHLTTree
from TriggerMenuMT.HLTMenuConfig.Menu.TriggerConfigHLT import TriggerConfigHLT

generateChains()
makeHLTTree(triggerConfigHLT=TriggerConfigHLT)

from TriggerMenuMT.HLTMenuConfig.Menu.HLTMenuJSON import generateJSON
generateJSON()

from TriggerMenuMT.HLTMenuConfig.Menu.HLTPrescaleJSON import generateJSON as generatePrescaleJSON
generatePrescaleJSON()

from AthenaCommon.AlgSequence import dumpSequence, AthSequencer
dumpSequence(topSequence)