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 499 of file CheckSteps.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 505 of file CheckSteps.py.

505 def __init__(self,name='CheckFile',input_file='AOD.pool.root'):
506 super(CheckFileStep, self).__init__(name)
507 self.input_file = input_file
508 self.executable = 'checkFile.py,checkxAOD.py'
509 self.__executables__ = None
510 self.__input_files__ = None
511

Member Function Documentation

◆ configure()

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

Definition at line 512 of file CheckSteps.py.

512 def configure(self, test):
513 # Skip the check if all test steps are athenaEF (no POOL files)
514 test_types = [step.type for step in test.exec_steps]
515 if all(tt == 'athenaEF' for tt in test_types):
516 self.log.debug('%s will be skipped because all exec steps use athenaEF')
517 self.__executables__ = []
518 self.__input_files__ = []
519 return
520 self.__executables__ = self.executable.split(',')
521 self.__input_files__ = set(self.input_file.split(','))
522 super(CheckFileStep, self).configure(test)
523
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:179

◆ run()

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

Reimplemented from python.TrigValSteering.CheckSteps.InputDependentStep.

Definition at line 524 of file CheckSteps.py.

524 def run(self, dry_run=False):
525 ret_codes = []
526 commands = []
527 for f in self.__input_files__:
528 for ex in self.__executables__:
529 self.executable = ex
530 self.input_file = f
531 self.args = f
532 ex_base = ex.split('.')[0:-1]
533 self.log_file_name = f + '.' + ''.join(ex_base)
534 ret, cmd = super(CheckFileStep, self).run(dry_run)
535 ret_codes.append(ret)
536 commands.append(cmd)
537
538 # Merge executed commands for logging
539 merged_cmd = ''
540 for cmd in commands:
541 if '(internal)' not in cmd:
542 merged_cmd += cmd+'; '
543 if len(merged_cmd) == 0: # can happen if all exec steps are type athenaEF
544 merged_cmd = '# (internal) {} -> skipped'.format(self.name)
545 ret_codes.append(0)
546
547 return max(ret_codes), merged_cmd
548
549
#define max(a, b)
Definition cfImp.cxx:41
int run(int argc, char *argv[])

Member Data Documentation

◆ __executables__

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

Definition at line 509 of file CheckSteps.py.

◆ __input_files__

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

Definition at line 510 of file CheckSteps.py.

◆ args

python.TrigValSteering.CheckSteps.CheckFileStep.args = f

Definition at line 531 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 508 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 533 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: