ATLAS Offline Software
Classes | Functions
python.TrigValSteering.CheckSteps Namespace Reference

Classes

class  ChainCompStep
 
class  ChainDumpStep
 
class  CheckFileStep
 
class  CheckLogStep
 
class  DownloadRefStep
 
class  HistCountStep
 
class  InputDependentStep
 
class  LogMergeStep
 
class  MessageCountStep
 
class  PerfMonStep
 
class  RefComparisonStep
 
class  RegTestStep
 
class  RootCompStep
 
class  RootMergeStep
 
class  TailStep
 
class  TrigTestJsonStep
 
class  ZeroCountsStep
 
class  ZipStep
 

Functions

def produces_log (step)
 
def default_check_steps (test)
 
def add_step_after_type (step_list, ref_type, step_to_add)
 

Function Documentation

◆ add_step_after_type()

def python.TrigValSteering.CheckSteps.add_step_after_type (   step_list,
  ref_type,
  step_to_add 
)
Insert step_to_add into step_list after the last step of type ref_type.
If the list has no steps of type ref_type, append step_to_add at the end of the list.

Definition at line 836 of file CheckSteps.py.

836 def add_step_after_type(step_list, ref_type, step_to_add):
837  '''
838  Insert step_to_add into step_list after the last step of type ref_type.
839  If the list has no steps of type ref_type, append step_to_add at the end of the list.
840  '''
841  index_to_add = -1
842  for index, step in enumerate(step_list):
843  if isinstance(step, ref_type):
844  index_to_add = index+1
845  if index_to_add > 0:
846  step_list.insert(index_to_add, step_to_add)
847  else:
848  step_list.append(step_to_add)

◆ default_check_steps()

def python.TrigValSteering.CheckSteps.default_check_steps (   test)
Create the default list of check steps for a test. The configuration
depends on the package name and the type of exec steps (athena or
athenaHLT or transforms).

Definition at line 717 of file CheckSteps.py.

717 def default_check_steps(test):
718  '''
719  Create the default list of check steps for a test. The configuration
720  depends on the package name and the type of exec steps (athena or
721  athenaHLT or transforms).
722  '''
723 
724  check_steps = []
725 
726  # Log merging
727  if len(test.exec_steps) == 1:
728  exec_step = test.exec_steps[0]
729  if exec_step.type == 'athenaHLT' and produces_log(exec_step):
730  logmerge = LogMergeStep()
731  logmerge.merged_name = 'athena.log'
732  logmerge.log_files = ['athenaHLT.log']
733  nforks = 1 if exec_step.forks is None else exec_step.forks
734  for n in range(1, 1+nforks):
735  logmerge.log_files.append('athenaHLT:{:02d}.out'.format(n))
736  logmerge.log_files.append('athenaHLT:{:02d}.err'.format(n))
737  check_steps.append(logmerge)
738  else:
739  logmerge = LogMergeStep()
740  logmerge.merged_name = 'athena.log'
741  logmerge.log_files = []
742  for exec_step in test.exec_steps:
743  if not produces_log(exec_step):
744  continue
745  logmerge.log_files.append(exec_step.get_log_file_name())
746  if exec_step.type == 'athenaHLT':
747  logmerge.extra_log_regex = 'athenaHLT:.*(.out|.err)'
748  check_steps.append(logmerge)
749  log_to_check = None
750  log_to_zip = None
751  if len(check_steps) > 0 and isinstance(check_steps[-1], LogMergeStep):
752  log_to_check = check_steps[-1].merged_name
753  log_to_zip = check_steps[-1].merged_name
754 
755  # Reco_tf log merging
756  reco_tf_steps = [step for step in test.exec_steps if step.type in ['Reco_tf', 'Trig_reco_tf', 'Derivation_tf']]
757  if len(reco_tf_steps) > 0:
758  reco_tf_logmerge = LogMergeStep('LogMerge_Reco_tf')
759  reco_tf_logmerge.warn_if_missing = False
760  # FIXME: drop AODtoDAOD once test_trigAna_AODtoDAOD_run2_build.py is migrated to Derivation_tf
761  tf_names = ['HITtoRDO', 'Overlay', 'RDOtoRDOTrigger', 'RAWtoESD', 'ESDtoAOD',
762  'PhysicsValidation', 'RAWtoALL',
763  'BSRDOtoRAW', 'DRAWCOSTtoNTUPCOST', 'AODtoNTUPRATE', 'Derivation', 'AODtoDAOD']
764  reco_tf_logmerge.log_files = ['log.'+tf_name for tf_name in tf_names]
765  if not get_step_from_list('LogMerge', check_steps):
766  for step in reco_tf_steps:
767  reco_tf_logmerge.log_files.append(step.get_log_file_name())
768  reco_tf_logmerge.merged_name = 'athena.merged.log'
769  log_to_zip = reco_tf_logmerge.merged_name
770  if log_to_check is not None:
771  reco_tf_logmerge.log_files.append(log_to_check)
772  log_to_check = reco_tf_logmerge.merged_name
773  log_to_check = reco_tf_logmerge.merged_name
774  check_steps.append(reco_tf_logmerge)
775 
776  # Histogram merging for athenaHLT forks
777  num_athenaHLT_steps = sum([1 for step in test.exec_steps if step.type == 'athenaHLT'])
778  if num_athenaHLT_steps > 0:
779  histmerge = RootMergeStep('HistMerge')
780  histmerge.merged_file = 'expert-monitoring.root'
781  histmerge.input_file = 'athenaHLT_workers/*/expert-monitoring.root expert-monitoring-mother.root'
782  histmerge.rename_suffix = '-mother'
783  check_steps.append(histmerge)
784 
785  # CheckLog for errors
786  checklog = CheckLogStep('CheckLog')
787  if log_to_check is not None:
788  checklog.log_file = log_to_check
789  check_steps.append(checklog)
790 
791  # CheckLog for warnings
792  checkwarn = CheckLogStep('Warnings')
793  checkwarn.check_errors = False
794  checkwarn.check_warnings = True
795  if log_to_check is not None:
796  checkwarn.log_file = log_to_check
797  check_steps.append(checkwarn)
798 
799  # MessageCount
800  msgcount = MessageCountStep('MessageCount')
801  for logmerge in [step for step in check_steps if isinstance(step, LogMergeStep)]:
802  msgcount.skip_logs.append(logmerge.merged_name)
803  check_steps.append(msgcount)
804 
805  # Tail (probably not so useful these days)
806  tail = TailStep()
807  if log_to_check is not None:
808  tail.log_file = log_to_check
809  check_steps.append(tail)
810 
811  # Histogram-based steps
812  check_steps.append(RootCompStep())
813  check_steps.append(ChainDumpStep())
814  check_steps.append(HistCountStep())
815 
816  # ZeroCounts
817  check_steps.append(ZeroCountsStep())
818 
819  # Extra JSON
820  check_steps.append(TrigTestJsonStep())
821 
822  # CheckFile
823  check_steps.append(CheckFileStep())
824 
825  # Zip the merged log (can be large and duplicates information)
826  if log_to_zip is not None:
827  zip_step = ZipStep()
828  zip_step.zip_input = log_to_zip
829  zip_step.zip_output = log_to_zip+'.tar.gz'
830  check_steps.append(zip_step)
831 
832  # return the steps
833  return check_steps
834 
835 

◆ produces_log()

def python.TrigValSteering.CheckSteps.produces_log (   step)
Helper function checking whether a Step output_stream value
indicates that it will produce a log file

Definition at line 708 of file CheckSteps.py.

708 def produces_log(step):
709  '''
710  Helper function checking whether a Step output_stream value
711  indicates that it will produce a log file
712  '''
713  return step.output_stream == Step.OutputStream.FILE_ONLY or \
714  step.output_stream == Step.OutputStream.FILE_AND_STDOUT
715 
716 
python.TrigValSteering.CheckSteps.add_step_after_type
def add_step_after_type(step_list, ref_type, step_to_add)
Definition: CheckSteps.py:836
python.TrigValSteering.CheckSteps.default_check_steps
def default_check_steps(test)
Definition: CheckSteps.py:717
vtune_athena.format
format
Definition: vtune_athena.py:14
python.TrigValSteering.Step.get_step_from_list
def get_step_from_list(step_name, step_list)
Definition: Step.py:230
convertTimingResiduals.sum
sum
Definition: convertTimingResiduals.py:55
python.TrigValSteering.CheckSteps.produces_log
def produces_log(step)
Definition: CheckSteps.py:708
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195