Skip to content
Snippets Groups Projects
Commit 496bbe45 authored by Frank Winklmeier's avatar Frank Winklmeier
Browse files

Merge branch '22-trigindetvalidation-addconfig' into 'master'

Small updates to TrigInDetValidation scripts

See merge request atlas/athena!38391
parents 35c4da0a 45eb182d
No related branches found
No related tags found
No related merge requests found
...@@ -19,20 +19,22 @@ from TrigInDetValidation.TrigInDetArtSteps import TrigInDetReco, TrigInDetAna, T ...@@ -19,20 +19,22 @@ from TrigInDetValidation.TrigInDetArtSteps import TrigInDetReco, TrigInDetAna, T
import sys,getopt import sys,getopt
try: try:
opts, args = getopt.getopt(sys.argv[1:],"lxpn:",["local"]) opts, args = getopt.getopt(sys.argv[1:],"lcxpn:",["local","config"])
except getopt.GetoptError: except getopt.GetoptError:
print("Usage: ") print("Usage: ")
print("-l(--local) run locally with input file from art eos grid-input") print("-l(--local) run locally with input file from art eos grid-input")
print("-x don't run athena or post post-processing, only plotting") print("-x don't run athena or post post-processing, only plotting")
print("-p run post-processing, even if -x is set") print("-p run post-processing, even if -x is set")
print("")
print("-n N run only on N events per job") print("-n N run only on N events per job")
print("-c(--config) run with config_only and print to a pkl file")
print("")
Events_local = 0 Events_local = 0
local = False local = False
exclude = False exclude = False
postproc = False postproc = False
testconfig = False
lowpt_local = [] lowpt_local = []
...@@ -53,6 +55,9 @@ for opt,arg in opts: ...@@ -53,6 +55,9 @@ for opt,arg in opts:
postproc=True postproc=True
if opt=="-n": if opt=="-n":
Events_local=arg Events_local=arg
if opt in ("-c", "--config"):
testconfig = True
if 'postinclude_file' in dir() : if 'postinclude_file' in dir() :
rdo2aod = TrigInDetReco( postinclude_file = postinclude_file ) rdo2aod = TrigInDetReco( postinclude_file = postinclude_file )
...@@ -64,6 +69,7 @@ else : ...@@ -64,6 +69,7 @@ else :
rdo2aod.slices = Slices rdo2aod.slices = Slices
rdo2aod.threads = Threads rdo2aod.threads = Threads
rdo2aod.concurrent_events = Slots rdo2aod.concurrent_events = Slots
rdo2aod.config_only = testconfig
if "Lowpt" in locals() : if "Lowpt" in locals() :
if isinstance( Lowpt, list ) : if isinstance( Lowpt, list ) :
...@@ -108,8 +114,6 @@ if (not exclude): ...@@ -108,8 +114,6 @@ if (not exclude):
test.exec_steps.append(TrigInDetAna()) test.exec_steps.append(TrigInDetAna())
test.check_steps = CheckSteps.default_check_steps(test) test.check_steps = CheckSteps.default_check_steps(test)
# Run TIDArdict # Run TIDArdict
# first make sure that we have a proper list .. # first make sure that we have a proper list ..
......
...@@ -25,73 +25,15 @@ ...@@ -25,73 +25,15 @@
# art-output: cost-perEvent-chain # art-output: cost-perEvent-chain
# art-output: *.dat # art-output: *.dat
Slices = ['bjet']
RunEF = False
Events = 4000
Threads = 4
Slots = 4
Input = 'ttbar_ID' # defined in TrigValTools/share/TrigValInputs.json
from TrigValTools.TrigValSteering import Test, CheckSteps TrackReference = [ 'Truth' ]
from TrigInDetValidation.TrigInDetArtSteps import TrigInDetReco, TrigInDetAna, TrigInDetdictStep, TrigInDetCompStep, TrigInDetCpuCostStep
import sys,getopt from AthenaCommon.Include import include
include("TrigInDetValidation/TrigInDetValidation_Base.py")
try: \ No newline at end of file
opts, args = getopt.getopt(sys.argv[1:],"lxp",["local"])
except getopt.GetoptError:
print("Usage: ")
print("-l(--local) run locally with input file from art eos grid-input")
print("-x don't run athena or post post-processing, only plotting")
print("-p run post-processing, even if -x is set")
local=False
exclude=False
postproc=False
for opt,arg in opts:
if opt in ("-l", "--local"):
local=True
if opt=="-x":
exclude=True
if opt=="-p":
postproc=True
rdo2aod = TrigInDetReco()
rdo2aod.slices = ['bjet']
rdo2aod.max_events = 4000
rdo2aod.threads = 4
rdo2aod.concurrent_events = 4
rdo2aod.perfmon = False
rdo2aod.timeout = 18*3600
rdo2aod.input = 'ttbar_ID' # defined in TrigValTools/share/TrigValInputs.json
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 -b Test_bin.dat '
test.check_steps.append(rdict)
# Now the comparitor steps
comp1=TrigInDetCompStep('Comp_L2bjet','L2','bjet')
test.check_steps.append(comp1)
comp2=TrigInDetCompStep('Comp_EFbjet','EF','bjet')
test.check_steps.append(comp2)
# CPU cost steps
cpucost=TrigInDetCpuCostStep('CpuCostStep1', ftf_times=False)
test.check_steps.append(cpucost)
cpucost2=TrigInDetCpuCostStep('CpuCostStep2')
test.check_steps.append(cpucost2)
import sys
sys.exit(test.run())
...@@ -34,6 +34,7 @@ class ExecStep(Step): ...@@ -34,6 +34,7 @@ class ExecStep(Step):
self.imf = True self.imf = True
self.perfmon = True self.perfmon = True
self.prmon = True self.prmon = True
self.config_only = False
self.auto_report_result = True self.auto_report_result = True
self.required = True self.required = True
self.depends_on_previous = True self.depends_on_previous = True
...@@ -168,6 +169,20 @@ class ExecStep(Step): ...@@ -168,6 +169,20 @@ class ExecStep(Step):
if self.perfmon: if self.perfmon:
athenaopts += ' --perfmon' athenaopts += ' --perfmon'
# Run config-only if requested
if self.config_only :
if self.type == 'athenaHLT' or (self.type == "other" and self.executable == "athenaHLT.py") :
athenaopts += ' --dump-config-exit'
elif self.type == 'athena' or self.type == 'Reco_tf' or (self.type == "other" and self.executable == "athena.py") :
athenaopts += ' --config-only=' + self.name + '.pkl'
# No current support if it isn't clear exactly what's being run
# This includes Trig_reco_tf and 'other' where the executable is not known
else :
self.misconfig_abort('Cannot determine what config-only option is needed. Consider adding the appropriate flag to "args" instead.')
# Default threads/concurrent_events/forks # Default threads/concurrent_events/forks
if test.package_name == 'TrigP1Test' and self.type == 'athenaHLT': if test.package_name == 'TrigP1Test' and self.type == 'athenaHLT':
if self.threads is None: if self.threads is None:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment