Example #1
0
def default_check_steps_OHMon(test, hist_path):
    steps = []
    # Extract expert-monitoring.root file from OH server output
    extract_hist = ExtractExpertMonitoring()
    hist_path_split = hist_path.split(':')
    if len(hist_path_split) > 1:
        extract_hist.input_file = hist_path_split[0]
        extract_hist.path_prefix = hist_path_split[1]
    else:
        extract_hist.input_file = hist_path
    steps.append(extract_hist)
    # Default check steps
    steps.extend(CheckSteps.default_check_steps(test))
    # Remove histogram merging step
    matches = [step for step in steps if step.name == 'HistMerge']
    for hm_step in matches:
        steps.remove(hm_step)
    return steps
Example #2
0
# Run RuleBook and create prescales

ps = ExecStep.ExecStep('RunRulebook')
ps.type = 'other'
ps.executable = '(cd TrigMenuRulebook/scripts && ./runRuleBook.py "PhysicsP1_pp_run3_v1_rules:runOptions.ignoreErrors=True" 20000 output_RB_ART && cd ../..)'
ps.input = ''

#====================================================================================================
# The full test

test = Test.Test()
test.art_type = 'build'
test.exec_steps = [menu, rbsetup, ps]
# Only keep relevant checks from the defaults
test.check_steps = [
    chk for chk in CheckSteps.default_check_steps(test)
    if type(chk) in (CheckSteps.LogMergeStep, CheckSteps.CheckLogStep)
]

# Ignore expected errors from the rulebook due to mismatch of chains in menu and rules
checklog = test.get_step("CheckLog")
checklog.config_file = 'checklogTrigP1Rulebook.conf'

# Collect error message but do not make the test fail
checkRBerr = CheckSteps.CheckLogStep('CheckRBErrors')
checkRBerr.output_stream = Step.Step.OutputStream.FILE_ONLY
checkRBerr.required = False
test.check_steps.append(checkRBerr)

import sys
sys.exit(test.run())
Example #3
0
ex.input = 'data'
ex.threads = 1
precommand = ''.join([
    "setMenu='LS2_v1';",  # LS2_v1 soon to be renamed to Dev_pp_run3_v1
    "doWriteBS=False;",
    "doWriteRDOTrigger=True;",
    "forceEnableAllChains=True;",
    "fpeAuditor=True;",
    "failIfNoProxy=True;"
])
ex.args = '-c "{:s}"'.format(precommand)

test = Test.Test()
test.art_type = 'build'
test.exec_steps = [ex]
test.check_steps = CheckSteps.default_check_steps(test)

# Overwrite default MessageCount settings
# We are trying to lower the limits step by step
# Ultimately there should be no per-event messages
msgcount = test.get_step("MessageCount")
msgcount.thresholds = {'WARNING': 500, 'INFO': 1200, 'other': 80}
msgcount.required = True  # make the test exit code depend on this step

# Add a step comparing counts in the log against reference
refcomp = CheckSteps.RegTestStep("CountRefComp")
refcomp.regex = r'TrigSignatureMoniMT\s*INFO\sHLT_.*|TrigSignatureMoniMT\s*INFO\s-- #[0-9]+ (Events|Features).*'
refcomp.reference = 'TriggerTest/ref_data_v1Dev_build.ref'
refcomp.required = True  # Final exit code depends on this step
CheckSteps.add_step_after_type(test.check_steps, CheckSteps.LogMergeStep,
                               refcomp)
Example #4
0
rdo2aod.threads = 4
rdo2aod.concurrent_events = 4
rdo2aod.perfmon = False
rdo2aod.timeout = 18 * 3600
if local:
    rdo2aod.input = 'Jpsiee_pu40'  # defined in TrigValTools/share/TrigValInputs.json
else:
    rdo2aod.input = ''
    rdo2aod.args += '--inputRDOFile=$ArtInFile '

test = Test.Test()
test.art_type = 'grid'
if (not exclude):
    test.exec_steps = [rdo2aod]
    test.exec_steps.append(TrigInDetAna())  # Run analysis to produce TrkNtuple
    test.check_steps = CheckSteps.default_check_steps(test)

# Run Tidardict
if ((not exclude) or postproc):
    rdict = TrigInDetdictStep()
    rdict.args = 'TIDAdata-run3.dat -f data-hists.root -p 11 -b Test_bin.dat '
    test.check_steps.append(rdict)
    rdict2 = TrigInDetdictStep('TrigInDetDict2')
    rdict2.args = 'TIDAdata-run3.dat -r Offline  -f data-hists-offline.root -b Test_bin.dat '
    test.check_steps.append(rdict2)

# Now the comparitor steps
comp = TrigInDetCompStep('Comp_L2ele', 'L2', 'electron')
test.check_steps.append(comp)

comp2 = TrigInDetCompStep('Comp_EFele', 'EF', 'electron')
Example #5
0
# art-output: *.root
# art-output: *.pmon.gz
# art-output: *perfmon*
# art-output: prmon*
# art-output: *.check*

from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps, Step

ex = ExecStep.ExecStep()
ex.type = 'athena'
ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
ex.input = 'data'
ex.threads = 1
# LS2_v1 soon to be renamed to Dev_pp_run3_v1
ex.args = '-c "setMenu=\'LS2_v1\';doWriteBS=True;doWriteRDOTrigger=False;"'

checkBS = Step.Step("CheckBS")
checkBS.executable = 'trigbs_dumpHLTContentInBS_run3.py'
checkBS.args = ' --l1 --hlt --hltres --stag --sizeSummary'
checkBS.args += ' `find . -name \'*Single_Stream.daq.RAW.*Athena.*.data\' | tail -n 1`'
checkBS.required = True
checkBS.auto_report_result = True

test = Test.Test()
test.art_type = 'grid'
test.exec_steps = [ex]
test.check_steps = [checkBS] + CheckSteps.default_check_steps(test)

import sys
sys.exit(test.run())
Example #6
0
#!/usr/bin/env python
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration

# art-description: athenaHLT test of the Dev_pp_run3_v1 menu only dumping options for SMK generation
# art-type: build
# art-include: master/Athena

from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps

ex = ExecStep.ExecStep()
ex.type = 'athenaHLT'
ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
ex.input = 'data'
ex.args = '-c "setMenu=\'LS2_v1\';"'  # LS2_v1 to be renamed to Dev_pp_run3_v1
ex.args += ' -M --dump-config-exit'
ex.perfmon = False  # Cannot use PerfMon with -M

test = Test.Test()
test.art_type = 'build'
test.exec_steps = [ex]
# Only keep relevant checks from the defaults
test.check_steps = [chk for chk in CheckSteps.default_check_steps(test)
                    if type(chk) in (CheckSteps.LogMergeStep, CheckSteps.CheckLogStep)]

import sys
sys.exit(test.run())
Example #7
0
rdo2aod.input = 'ttbar'
rdo2aod.threads = 1
rdo2aod.max_events = 500
rdo2aod.args = '--outputAODFile=AOD.pool.root --steering="doRDO_TRIG" --valid=True'
rdo2aod.args += ' --preExec="all:from TriggerJobOpts.TriggerFlags import TriggerFlags; TriggerFlags.AODEDMSet.set_Value_and_Lock(\\\"AODFULL\\\");"'

physval = ExecStep.ExecStep('PhysVal')
physval.type = 'Reco_tf'
physval.input = ''
physval.explicit_input = True
physval.args = '--inputAODFile=AOD.pool.root --outputNTUP_PHYSVALFile=NTUP_PHYSVAL.pool.root --valid=True'

validationFlags = 'doTrigEgamma,doTrigBphys,doTrigMET,doTrigJet,doTrigMuon,doTrigHLTResult,doTrigCalo,doTrigMinBias,doTrigTau,doTrigIDtrk,doTrigBjet'
physval.args += ' --validationFlags="{:s}"'.format(validationFlags)

test = Test.Test()
test.art_type = 'grid'
test.exec_steps = [rdo2aod, physval]
test.check_steps = CheckSteps.default_check_steps(test)

# Add web display steps
slice_names = [
    'JetMon', 'TauMon', 'MuonMon', 'IDMon', 'BphysMon', 'HLTCaloESD',
    'ResultMon', 'BjetMon', 'METMon', 'MinBiasMon', 'Egamma'
]
download = CheckSteps.DownloadRefStep()
add_physvalweb_steps(test, slice_names, download)

import sys
sys.exit(test.run())
Example #8
0
ex = ExecStep.ExecStep()
ex.type = 'athenaHLT'
ex.job_options = 'AthExHelloWorld/HelloWorldOptions.py'
ex.input = 'data'
ex.args = '-i -M -ul'
ex.perfmon = False # perfmon currently not fully supported with athenaHLT -M

# Pass the transitions file into athenaHLT -i
ex.cmd_suffix = ' < `find_data.py run-stop-run-saveHist.trans`'

test = Test.Test()
test.art_type = 'build'
test.exec_steps = [ex]
test.check_steps = TrigP1TestSteps.default_check_steps_OHMon(test, 'run_2.root')

# Extra merging pattern for logs produced with -ul option
logmerge = test.get_step("LogMerge")
logmerge.extra_log_regex = 'athenaHLT-.*-.*(.out|.err)'

# Extra step comparing histograms between the two runs
rc = CheckSteps.RootCompStep("RootComp_runStopRun")
rc.input_file = 'run_2.root'
rc.reference = 'run_1.root'
rc.args += ' --output=rootcomp_runStopRun'
rc.explicit_reference = True  # Don't check if reference exists at configuration time
rc.required = True  # Final exit code depends on this step
test.check_steps.append(rc)

import sys
sys.exit(test.run())
Example #9
0
#!/usr/bin/env python
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration

# art-description: Trigger athenaHLT test for ROS rates estimate with the Physics_pp_run3_v1 menu
# art-type: build
# art-include: master/Athena

from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps, Step

ex = ExecStep.ExecStep()
ex.type = 'athenaHLT'
ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
ex.input = 'data'
ex.max_events = 200
ex.args = '-c "setMenu=\'Physics_pp_run3_v1\';"'
ex.args += ' --ros2rob /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/ATLASros2rob2018-r22format.py'

ros2json = CheckSteps.InputDependentStep("RosRateToJson")
ros2json.executable = 'ros-hitstats-to-json.py'
ros2json.input_file = 'ros_hitstats_reject.txt'
ros2json.output_stream = Step.Step.OutputStream.STDOUT_ONLY

test = Test.Test()
test.art_type = 'build'
test.exec_steps = [ex]
test.check_steps = CheckSteps.default_check_steps(test)
test.check_steps.append(ros2json)

import sys
sys.exit(test.run())
Example #10
0
os.system('get_files -symlink -jo setMagFieldCurrents.py')

ex = ExecStep.ExecStep()
ex.type = 'athenaHLT'
ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
ex.input = 'data'
ex.args = '-i -M -ul -c "setMenu=\'PhysicsP1_pp_run3_v1\';BFieldAutoConfig=False;"'
ex.perfmon = False  # perfmon currently not fully supported with athenaHLT -M

# Pass the transitions file into athenaHLT -i
ex.cmd_suffix = ' < `find_data.py magFieldOnOff.trans`'

test = Test.Test()
test.art_type = 'build'
test.exec_steps = [ex]
test.check_steps = CheckSteps.default_check_steps(test)

# Extra merging pattern for logs produced with -ul option
logmerge = test.get_step("LogMerge")
logmerge.extra_log_regex = 'athenaHLT-.*-.*(.out|.err)'

# Compare to reference to check field status
refcomp = CheckSteps.RegTestStep('RegTest')
refcomp.regex = '^AtlasFieldSvc.*Initializing the field map'
refcomp.reference = 'TrigP1Test/test_trigP1_v1PhysP1_magFieldToggle.ref'
refcomp.required = True  # Final exit code depends on this step
test.check_steps.insert(-1, refcomp)  # Add before the last (zip) step

# Modify rootcomp to compare histograms between the two field ON runs
rc = test.get_step("RootComp")
rc.input_file = 'run_3.root'
Example #11
0
            self.result = 0
            self.report_result()
            return self.result, cmd


# Test configuration
slice_names = ['Bjet', 'Bphysics', 'Egamma', 'Jet', 'MET', 'Muon', 'Tau']

test = Test.Test()
test.art_type = 'build'
test.exec_steps = generate_steps()  # Full menu
for name in slice_names:
    test.exec_steps.extend(generate_steps(name))

cross_check = CompareSlicesToFullMenuStep()
cross_check.slice_names = slice_names

merge_log = CheckSteps.LogMergeStep()
merge_log.merged_name = 'athena.merged.log'
merge_log.log_files = [step.get_log_file_name() for step in test.exec_steps]
merge_log.log_files.append(cross_check.get_log_file_name())

check_log = CheckSteps.CheckLogStep('CheckLog')
check_log.log_file = merge_log.merged_name

test.check_steps = [cross_check, merge_log, check_log]

import sys

sys.exit(test.run())
Example #12
0
pickle = ExecStep.ExecStep('GeneratePickle')
pickle.type = 'other'
pickle.input = ''
pickle.executable = 'python'
pickle.args = 'runHLT_standalone_newJO.py'
pickle.prmon = False

# The main job running athena from pickle
run_athena = ExecStep.ExecStep('newJO')
run_athena.type = 'athena'
run_athena.use_pickle = True
run_athena.job_options = 'runHLT_standalone_newJO.py'
run_athena.input = ''

# The full test configuration
test = Test.Test()
test.art_type = 'build'
#test.exec_steps = [copy_jo, pickle, run_athena]
#test.check_steps = CheckSteps.default_check_steps(test)
test.exec_steps = [copy_jo, pickle]
check_log = CheckSteps.CheckLogStep('CheckLog')
check_log.log_file = pickle.get_log_file_name()
test.check_steps = [check_log]

# Change RegTest pattern
#regtest = test.get_step('RegTest')
#regtest.regex = r'TrigSignatureMoniMT\s*INFO\sHLT_.*|TrigSignatureMoniMT\s*INFO\s-- #[0-9]+ (Events|Features).*'

import sys
sys.exit(test.run())
Example #13
0
ex_bs = ExecStep.ExecStep('create_bs')
ex_bs.type = 'other'
ex_bs.input = ''
ex_bs.executable = 'python'
ex_bs.args = '-m TrigP1Test.BeamSpotUpdate -n 50 -o beamspot %s' % get_input('data').paths[0]

# Run athenaHLT
ex = ExecStep.ExecStep()
ex.type = 'athenaHLT'
ex.job_options = 'TrigP1Test/testHLT_beamspot.py'
ex.input = ''
ex.explicit_input = True
ex.args = '-f ./beamspot._0001.data'

test = Test.Test()
test.art_type = 'build'
test.exec_steps = [ex_rm, ex_bs, ex]
# Only keep a few relevant checks
test.check_steps = [chk for chk in CheckSteps.default_check_steps(test)
                    if type(chk) in (CheckSteps.LogMergeStep, CheckSteps.CheckLogStep, CheckSteps.RegTestStep)]

# Add a reference comparison step
refcomp = CheckSteps.RegTestStep('RefComp')
refcomp.regex = 'InDet::InDetBeamSpotReader.*|BeamSpotCondAlg.*'
refcomp.reference = 'TrigP1Test/BeamSpot.ref'
refcomp.required = True # Final exit code depends on this step
CheckSteps.add_step_after_type(test.check_steps, CheckSteps.LogMergeStep, refcomp)

import sys
sys.exit(test.run())
Example #14
0
# art-output: *.json
# art-output: *.root
# art-output: *.pmon.gz
# art-output: *perfmon*
# art-output: prmon*
# art-output: *.check*
# art-output: HLTconfig*.xml
# art-output: L1Topoconfig*.xml
# art-output: LVL1config*.xml
# art-output: PHYSVAL_WEB
# art-html: PHYSVAL_WEB

from TrigValTools.TrigValSteering import Test, CheckSteps
from TrigAnalysisTest.TrigAnalysisSteps import add_physvalweb_steps

downloadLegacyTrig = CheckSteps.DownloadRefStep('DownloadLegacyTriggerNTUP')
downloadLegacyTrig.artjobname = 'test_trigAna_PhysValWeb_grid.py'

downloadRun3Trig = CheckSteps.DownloadRefStep('DownloadRun3TriggerNTUP')
downloadRun3Trig.artjobname = 'test_trigAna_PhysValWeb_mt1_grid.py'
downloadRun3Trig.args += ' --dst="."'

test = Test.Test()
test.art_type = 'grid'
test.exec_steps = [downloadLegacyTrig, downloadRun3Trig]
# Only keep relevant checks from the defaults
test.check_steps = [
    chk for chk in CheckSteps.default_check_steps(test)
    if type(chk) in (CheckSteps.LogMergeStep, CheckSteps.CheckLogStep)
]