ATLAS Offline Software
Public Member Functions | Public Attributes | Private Attributes | List of all members
python.TrigValSteering.CheckSteps.CheckFileStep Class Reference
Inheritance diagram for python.TrigValSteering.CheckSteps.CheckFileStep:
Collaboration diagram for python.TrigValSteering.CheckSteps.CheckFileStep:

Public Member Functions

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

Public Attributes

 input_file
 
 executable
 
 args
 
 log_file_name
 
 result
 

Private Attributes

 __executables__
 
 __input_files__
 

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__()

def 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()

def 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 

◆ run()

def 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 

Member Data Documentation

◆ __executables__

python.TrigValSteering.CheckSteps.CheckFileStep.__executables__
private

Definition at line 529 of file CheckSteps.py.

◆ __input_files__

python.TrigValSteering.CheckSteps.CheckFileStep.__input_files__
private

Definition at line 530 of file CheckSteps.py.

◆ args

python.TrigValSteering.CheckSteps.CheckFileStep.args

Definition at line 552 of file CheckSteps.py.

◆ executable

python.TrigValSteering.CheckSteps.CheckFileStep.executable

Definition at line 528 of file CheckSteps.py.

◆ input_file

python.TrigValSteering.CheckSteps.CheckFileStep.input_file

Definition at line 527 of file CheckSteps.py.

◆ log_file_name

python.TrigValSteering.CheckSteps.CheckFileStep.log_file_name

Definition at line 554 of file CheckSteps.py.

◆ result

python.TrigValSteering.CheckSteps.InputDependentStep.result
inherited

Definition at line 107 of file CheckSteps.py.


The documentation for this class was generated from the following file:
vtune_athena.format
format
Definition: vtune_athena.py:14
configure
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)
Definition: TrigGlobEffCorrValidation.cxx:514
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
run
int run(int argc, char *argv[])
Definition: ttree2hdf5.cxx:28
python.processes.powheg.ZZj_MiNNLO.ZZj_MiNNLO.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZj_MiNNLO.py:18
convertTimingResiduals.sum
sum
Definition: convertTimingResiduals.py:55
run
Definition: run.py:1
CxxUtils::set
constexpr std::enable_if_t< is_bitmask_v< E >, E & > set(E &lhs, E rhs)
Convenience function to set bits in a class enum bitmask.
Definition: bitmask.h:232
TCS::join
std::string join(const std::vector< std::string > &v, const char c=',')
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/Root/StringUtils.cxx:10
debug
const bool debug
Definition: MakeUncertaintyPlots.cxx:53
Trk::split
@ split
Definition: LayerMaterialProperties.h:38