6from TrigValTools.TrigValSteering
import Test, CheckSteps
7from TrigInDetValidation.TrigInDetArtSteps
import TrigInDetAna, TrigCostStep, TrigInDetRdictStep, TrigInDetCompStep, TrigInDetCpuCostStep, TrigInDetRecoData, TrigTZReco
8from TrigP1Test.TrigP1TestSteps
import filterBS
13 opts, args = getopt.getopt(sys.argv[1:],
"cxptirmn:",[
"config"])
14except getopt.GetoptError:
16 print(
"-x don't run athena or post post-processing, only plotting")
17 print(
"-m run cost monitoring plotting, even if -x is set")
18 print(
"-p run post-processing, even if -x is set")
19 print(
"-n N run only on N events per job")
20 print(
"-c | --config run with config_only and print to a pkl file")
21 print(
"-t test steering, dry run for all steps")
22 print(
"-i force the dry AbortDryRun flag to be False")
36if "Art_type" not in locals(): Art_type =
'grid'
37if "Malloc" not in locals(): Malloc=
False
38if "AbortDryRun" in locals(): abort_dry_run=AbortDryRun
39if "MultipleLB" not in locals(): MultipleLB=
False
52 if opt
in (
"-c",
"--config"):
59vdry_run = os.environ.get(
'TRIGVALSTEERING_DRY_RUN')
75hlt = TrigInDetRecoData()
81hlt.concurrent_events = Slots
82hlt.config_only = testconfig
87if "Args" not in locals() :
94 hlt.max_events = Events_local
96 hlt.max_events = Events
105if os.getenv(
"ArtInFile",
None):
106 hlt.input = os.getenv(
'ArtInFile')
113 os.environ[
"MALLOC_CHECK_"] =
"3"
129filter_bs = filterBS(
'Main', extra_args =
'-l 0' if MultipleLB
else '')
132tzreco.threads = Threads
133tzreco.concurrent_events = Slots
136if 'ExtraAna' not in locals() :
138aod_to_ntup = TrigInDetAna(extraArgs = ExtraAna)
144test.art_type = Art_type
153 test.exec_steps = [hlt, filter_bs, tzreco, aod_to_ntup ]
155 test.exec_steps = [aod_to_ntup]
156 test.check_steps = CheckSteps.default_check_steps(test)
160if ((
not exclude)
or postproc ):
163 rdict = TrigInDetRdictStep( name=job[0], args=job[1], testbin=job[2], config=(testconfig
or dry_run) )
165 rdict = TrigInDetRdictStep( name=job[0], args=job[1], config=(testconfig
or dry_run) )
166 print(
"\n\033[0;32m TIDArdict "+job[1]+
" \033[0m" )
167 test.check_steps.append(rdict)
174 compstep = TrigInDetCompStep( name=_slice[0], slice=_slice[1], file=_slice[2], args=_slice[3] )
175 test.check_steps.append(compstep)
179cputest = [ (
"CpuCostStep1",
" times ",
"expert-monitoring.root",
" --auto -p TIME" ),
180 (
"CpuCostStep2",
" times-FTF ",
"expert-monitoring.root",
" --auto -p TIME -d TrigFastTrackFinder_" ),
181 (
"CpuCostStep3",
" cost-perCall ",
"TrigCostRoot_Results.root",
" --auto -p _Time_perCall -d /Algorithm --logx " ),
182 (
"CpuCostStep4",
" cost-perEvent ",
"TrigCostRoot_Results.root",
" --auto -p _Time_perEvent -d /Algorithm --logx " ),
183 (
"CpuCostStep5",
" cost-perCall-chain ",
"TrigCostRoot_Results.root",
" --auto -p _Time_perCall -d /Chain_Algorithm --logx " ),
184 (
"CpuCostStep6",
" cost-perEvent-chain ",
"TrigCostRoot_Results.root",
" --auto -p _Time_perEvent -d /Chain_Algorithm --logx " ) ]
void print(char *figname, TCanvas *c1)