ATLAS Offline Software
Loading...
Searching...
No Matches
python.TrigValSteering.CheckSteps.InputDependentStep Class Reference
Inheritance diagram for python.TrigValSteering.CheckSteps.InputDependentStep:
Collaboration diagram for python.TrigValSteering.CheckSteps.InputDependentStep:

Public Member Functions

 __init__ (self, name=None)
 run (self, dry_run=False)

Public Attributes

 input_file = None
 name
int result = 1
 auto_report_result

Detailed Description

Base class for steps executed only if the input file exists

Definition at line 96 of file CheckSteps.py.

Constructor & Destructor Documentation

◆ __init__()

python.TrigValSteering.CheckSteps.InputDependentStep.__init__ ( self,
name = None )

Definition at line 99 of file CheckSteps.py.

99 def __init__(self, name=None):
100 super(InputDependentStep, self).__init__(name)
101 self.input_file = None
102

Member Function Documentation

◆ run()

python.TrigValSteering.CheckSteps.InputDependentStep.run ( self,
dry_run = False )

Reimplemented in python.TrigValSteering.CheckSteps.CheckFileStep.

Definition at line 103 of file CheckSteps.py.

103 def run(self, dry_run=False):
104 if self.input_file is None:
105 self.log.error('%s misconfiguration - no input file specified',
106 self.name)
107 self.result = 1
108 if self.auto_report_result:
109 self.report_result()
110 return self.result, '# (internal) {} -> failed'.format(self.name)
111
112 if not dry_run and not os.path.isfile(self.input_file):
113 self.log.debug('Skipping %s because %s does not exist',
114 self.name, self.input_file)
115 self.result = 0
116 return self.result, '# (internal) {} -> skipped'.format(self.name)
117
118 return super(InputDependentStep, self).run(dry_run)
119
120
const bool debug
Definition run.py:1

Member Data Documentation

◆ auto_report_result

python.TrigValSteering.CheckSteps.InputDependentStep.auto_report_result

Definition at line 108 of file CheckSteps.py.

◆ input_file

python.TrigValSteering.CheckSteps.InputDependentStep.input_file = None

Definition at line 101 of file CheckSteps.py.

◆ name

python.TrigValSteering.CheckSteps.InputDependentStep.name

Definition at line 106 of file CheckSteps.py.

◆ result

python.TrigValSteering.CheckSteps.InputDependentStep.result = 1

Definition at line 107 of file CheckSteps.py.


The documentation for this class was generated from the following file: