ATLAS Offline Software
TrigAnalysisSteps.py
Go to the documentation of this file.
1 #
2 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 #
4 
5 '''
6 Definitions of additional validation steps in Trigger ART tests relevant only for TrigAnalysisTest.
7 The main common check steps are defined in the TrigValSteering.CheckSteps module.
8 '''
9 
10 from TrigValTools.TrigValSteering.CheckSteps import CheckFileStep, InputDependentStep, LogMergeStep
11 
12 
15 
16 class 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 
26 class TrigEDMChecker(InputDependentStep):
27  def __init__(self, name='TrigEDMChecker', in_file='AOD.pool.root'):
28  super().__init__(name)
29  self.input_file = in_file
30  self.executable = 'trigEDMChecker.py'
31 
32  def configure(self, test):
33  self.args = f' --filesInput {self.input_file}'
34  super().configure(test)
35 
36 
37 
40 
41 class CheckFileTrigSizeStep(CheckFileStep):
42  '''
43  Execute checkFileTrigSize.py for POOL files.
44  '''
45  def __init__(self, name='CheckFileTrigSize'):
46  super(CheckFileTrigSizeStep, self).__init__(name)
47  self.input_file = 'AOD.pool.root,ESD.pool.root,RDO_TRIG.pool.root,DAOD_PHYS.DAOD.pool.root'
48  self.executable = 'checkFileTrigSize.py'
49 
50 
51 
54 
55 def trig_analysis_exec_steps(input_file='AOD.pool.root'):
56  # TODO: add TrigNavSlimming test
57  return [
58  TrigDecChecker(in_file=input_file),
59  TrigEDMChecker(in_file=input_file)
60  ]
61 
63  return [CheckFileTrigSizeStep()]
64 
65 def add_analysis_steps(test, input_file='AOD.pool.root'):
66  analysis_exec_steps = trig_analysis_exec_steps(input_file)
67  test.exec_steps.extend(analysis_exec_steps)
68  test.check_steps.extend(trig_analysis_check_steps())
69 
70  # Add the analysis exec step logs for merging
71  logmerge = test.get_step_by_type(LogMergeStep)
72  if not logmerge:
73  test.log.warning('LogMerge step not found, cannot add TrigAnalysisSteps exec step log files for merging')
74  else:
75  for step in analysis_exec_steps:
76  logmerge.log_files.append(step.get_log_file_name())
python.TrigAnalysisSteps.TrigEDMChecker.configure
def configure(self, test)
Definition: TrigAnalysisSteps.py:32
python.TrigAnalysisSteps.TrigEDMChecker.__init__
def __init__(self, name='TrigEDMChecker', in_file='AOD.pool.root')
Definition: TrigAnalysisSteps.py:27
python.TrigAnalysisSteps.CheckFileTrigSizeStep.executable
executable
Definition: TrigAnalysisSteps.py:48
python.TrigAnalysisSteps.CheckFileTrigSizeStep.input_file
input_file
Definition: TrigAnalysisSteps.py:47
python.TrigAnalysisSteps.CheckFileTrigSizeStep.__init__
def __init__(self, name='CheckFileTrigSize')
Definition: TrigAnalysisSteps.py:45
python.TrigAnalysisSteps.add_analysis_steps
def add_analysis_steps(test, input_file='AOD.pool.root')
Definition: TrigAnalysisSteps.py:65
python.TrigAnalysisSteps.TrigEDMChecker
Definition: TrigAnalysisSteps.py:26
python.TrigAnalysisSteps.TrigEDMChecker.args
args
Definition: TrigAnalysisSteps.py:33
python.TrigAnalysisSteps.TrigDecChecker.configure
def configure(self, test)
Definition: TrigAnalysisSteps.py:22
python.TrigAnalysisSteps.CheckFileTrigSizeStep
Definition: TrigAnalysisSteps.py:41
python.TrigAnalysisSteps.trig_analysis_exec_steps
def trig_analysis_exec_steps(input_file='AOD.pool.root')
Definition: TrigAnalysisSteps.py:55
python.TrigAnalysisSteps.TrigDecChecker.executable
executable
Definition: TrigAnalysisSteps.py:20
python.TrigAnalysisSteps.TrigEDMChecker.executable
executable
Definition: TrigAnalysisSteps.py:30
python.TrigAnalysisSteps.TrigDecChecker
Additional exec steps.
Definition: TrigAnalysisSteps.py:16
python.TrigAnalysisSteps.TrigDecChecker.args
args
Definition: TrigAnalysisSteps.py:23
python.TrigAnalysisSteps.TrigDecChecker.input_file
input_file
Definition: TrigAnalysisSteps.py:19
python.TrigAnalysisSteps.trig_analysis_check_steps
def trig_analysis_check_steps()
Definition: TrigAnalysisSteps.py:62
python.TrigAnalysisSteps.TrigEDMChecker.input_file
input_file
Definition: TrigAnalysisSteps.py:29
python.TrigAnalysisSteps.TrigDecChecker.__init__
def __init__(self, name='TrigDecChecker', in_file='AOD.pool.root')
Definition: TrigAnalysisSteps.py:17