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

Public Member Functions

 __init__ (self, name='CheckFile', input_file='AOD.pool.root')
 configure (self, test)
 run (self, dry_run=False)

Public Attributes

str executable = 'checkFile.py,checkxAOD.py'
 args = f
str log_file_name = f + '.' + ''.join(ex_base)
 input_file = None
 name
int result = 1
 auto_report_result

Private Attributes

list __executables__ = None
list __input_files__ = None

Detailed Description

Execute checkFile and checkxAOD for POOL files.
executable and input_file can have multiple comma-separated values

Definition at line 519 of file CheckSteps.py.

Constructor & Destructor Documentation

◆ __init__()

python.TrigValSteering.CheckSteps.CheckFileStep.__init__ ( self,
name = 'CheckFile',
input_file = 'AOD.pool.root' )

Definition at line 525 of file CheckSteps.py.

525 def __init__(self,name='CheckFile',input_file='AOD.pool.root'):
526 super(CheckFileStep, self).__init__(name)
527 self.input_file = input_file
528 self.executable = 'checkFile.py,checkxAOD.py'
529 self.__executables__ = None
530 self.__input_files__ = None
531

Member Function Documentation

◆ configure()

python.TrigValSteering.CheckSteps.CheckFileStep.configure ( self,
test )

Definition at line 532 of file CheckSteps.py.

532 def configure(self, test):
533 # Skip the check if all test steps are athenaHLT (no POOL files)
534 test_types = [step.type for step in test.exec_steps]
535 num_athenaHLT = sum(1 for tt in test_types if tt == 'athenaHLT')
536 if num_athenaHLT == len(test_types):
537 self.log.debug('%s will be skipped because all exec steps use athenaHLT')
538 self.__executables__ = []
539 self.__input_files__ = []
540 return
541 self.__executables__ = self.executable.split(',')
542 self.__input_files__ = set(self.input_file.split(','))
543 super(CheckFileStep, self).configure(test)
544
const bool debug
bool configure(asg::AnaToolHandle< ITrigGlobalEfficiencyCorrectionTool > &tool, ToolHandleArray< IAsgElectronEfficiencyCorrectionTool > &electronEffToolsHandles, ToolHandleArray< IAsgElectronEfficiencyCorrectionTool > &electronSFToolsHandles, ToolHandleArray< CP::IMuonTriggerScaleFactors > &muonToolsHandles, ToolHandleArray< IAsgPhotonEfficiencyCorrectionTool > &photonEffToolsHandles, ToolHandleArray< IAsgPhotonEfficiencyCorrectionTool > &photonSFToolsHandles, const std::string &triggers, const std::map< std::string, std::string > &legsPerTool, unsigned long nToys, bool debug)
STL class.
std::vector< std::string > split(const std::string &s, const std::string &t=":")
Definition hcg.cxx:177

◆ run()

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

Reimplemented from python.TrigValSteering.CheckSteps.InputDependentStep.

Definition at line 545 of file CheckSteps.py.

545 def run(self, dry_run=False):
546 ret_codes = []
547 commands = []
548 for f in self.__input_files__:
549 for ex in self.__executables__:
550 self.executable = ex
551 self.input_file = f
552 self.args = f
553 ex_base = ex.split('.')[0:-1]
554 self.log_file_name = f + '.' + ''.join(ex_base)
555 ret, cmd = super(CheckFileStep, self).run(dry_run)
556 ret_codes.append(ret)
557 commands.append(cmd)
558
559 # Merge executed commands for logging
560 merged_cmd = ''
561 for cmd in commands:
562 if '(internal)' not in cmd:
563 merged_cmd += cmd+'; '
564 if len(merged_cmd) == 0: # can happen if all exec steps are type athenaHLT
565 merged_cmd = '# (internal) {} -> skipped'.format(self.name)
566 ret_codes.append(0)
567
568 return max(ret_codes), merged_cmd
569
570
#define max(a, b)
Definition cfImp.cxx:41
Definition run.py:1

Member Data Documentation

◆ __executables__

list python.TrigValSteering.CheckSteps.CheckFileStep.__executables__ = None
private

Definition at line 529 of file CheckSteps.py.

◆ __input_files__

list python.TrigValSteering.CheckSteps.CheckFileStep.__input_files__ = None
private

Definition at line 530 of file CheckSteps.py.

◆ args

python.TrigValSteering.CheckSteps.CheckFileStep.args = f

Definition at line 552 of file CheckSteps.py.

◆ auto_report_result

python.TrigValSteering.CheckSteps.InputDependentStep.auto_report_result
inherited

Definition at line 108 of file CheckSteps.py.

◆ executable

str python.TrigValSteering.CheckSteps.CheckFileStep.executable = 'checkFile.py,checkxAOD.py'

Definition at line 528 of file CheckSteps.py.

◆ input_file

python.TrigValSteering.CheckSteps.InputDependentStep.input_file = None
inherited

Definition at line 101 of file CheckSteps.py.

◆ log_file_name

str python.TrigValSteering.CheckSteps.CheckFileStep.log_file_name = f + '.' + ''.join(ex_base)

Definition at line 554 of file CheckSteps.py.

◆ name

python.TrigValSteering.CheckSteps.InputDependentStep.name
inherited

Definition at line 106 of file CheckSteps.py.

◆ result

python.TrigValSteering.CheckSteps.InputDependentStep.result = 1
inherited

Definition at line 107 of file CheckSteps.py.


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