ATLAS Offline Software
Loading...
Searching...
No Matches
TrigAnalysisSteps.py
Go to the documentation of this file.
2# Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3#
4
5'''
6Definitions of additional validation steps in Trigger ART tests relevant only for TrigAnalysisTest.
7The main common check steps are defined in the TrigValSteering.CheckSteps module.
8'''
9
10from TrigValTools.TrigValSteering.CheckSteps import CheckFileStep, InputDependentStep, LogMergeStep
11
12
15
16class TrigDecChecker(InputDependentStep):
17 def __init__(self, name='TrigDecChecker', in_file='AOD.pool.root'):
18 super().__init__(name)
19 self.input_file = in_file
20 self.executable = 'dumpTriggerInfo.py'
21
22 def configure(self, test):
23 self.args = f' --filesInput {self.input_file}'
24 super().configure(test)
25
26class TrigEDMChecker(InputDependentStep):
27 def __init__(self, name='TrigEDMChecker', in_file='AOD.pool.root', args=''):
28 super().__init__(name)
29 self.input_file = in_file
30 self.args = args
31 self.executable = 'trigEDMChecker.py'
32
33 def configure(self, test):
34 self.args += f' --filesInput {self.input_file}'
35 super().configure(test)
36
37
38
41
42class CheckFileTrigSizeStep(CheckFileStep):
43 '''
44 Execute checkFileTrigSize.py for POOL files.
45 '''
46 # TODO: Avoid rerunning checkFile.py even when *checkFile output already produced.
47 def __init__(self, name='CheckFileTrigSize', input_file='AOD.pool.root'):
48 super(CheckFileTrigSizeStep, self).__init__(name)
49 self.input_file = 'AOD.pool.root,ESD.pool.root,RDO_TRIG.pool.root,DAOD_PHYS.DAOD.pool.root,'+input_file
50 self.executable = 'checkFileTrigSize.py'
51
52
53
56
57def trig_analysis_exec_steps(input_file='AOD.pool.root', args=''):
58 # TODO: add TrigNavSlimming test
59 tests = []
60 tests.append(TrigDecChecker(name="TrigDecChecker", in_file=input_file))
61 if 'DAOD' not in input_file: # DAOD won't have full trigger EDM
62 tests.append(TrigEDMChecker(name="TrigEDMChecker",in_file=input_file, args=args))
63
64 return tests
65
67 return [CheckFileTrigSizeStep(name='CheckFileTrigSize', input_file=input_file)]
68
69def add_analysis_steps(test, input_file='AOD.pool.root', args=''):
70 analysis_exec_steps = trig_analysis_exec_steps(input_file,args)
71 test.exec_steps.extend(analysis_exec_steps)
72 test.check_steps.extend(trig_analysis_check_steps(input_file))
73
74 # Add the analysis exec step logs for merging
75 logmerge = test.get_step_by_type(LogMergeStep)
76 if not logmerge:
77 test.log.warning('LogMerge step not found, cannot add TrigAnalysisSteps exec step log files for merging')
78 else:
79 for step in analysis_exec_steps:
80 logmerge.log_files.append(step.get_log_file_name())
__init__(self, name='CheckFileTrigSize', input_file='AOD.pool.root')
__init__(self, name='TrigDecChecker', in_file='AOD.pool.root')
__init__(self, name='TrigEDMChecker', in_file='AOD.pool.root', args='')
add_analysis_steps(test, input_file='AOD.pool.root', args='')
trig_analysis_exec_steps(input_file='AOD.pool.root', args='')