ATLAS Offline Software
Functions | Variables
python.TrigValSteering.Common Namespace Reference

Functions

def get_logger ()
 
def art_result (result, name)
 
def clear_art_summary ()
 
def find_file (pattern)
 
def find_file_in_path (filename, path_env_var)
 
def running_in_CI ()
 

Variables

 trigvalsteering_logging_level
 
 package_prefix_dict
 
 art_result_summary
 
 art_input_eos
 
 art_input_cvmfs
 

Function Documentation

◆ art_result()

def python.TrigValSteering.Common.art_result (   result,
  name 
)
Print art-result to stdout and summary log file

Definition at line 42 of file Common.py.

42 def art_result(result, name):
43  '''Print art-result to stdout and summary log file'''
44 
45  line = 'art-result: {} {}\n'.format(result, name)
46  sys.stdout.write(line)
47  with open(art_result_summary, 'a') as summary:
48  summary.write(line)
49 
50 

◆ clear_art_summary()

def python.TrigValSteering.Common.clear_art_summary ( )
Remove art-result summary file produced by the art_result function

Definition at line 51 of file Common.py.

51 def clear_art_summary():
52  '''Remove art-result summary file produced by the art_result function'''
53 
54  if os.path.isfile(art_result_summary):
55  os.remove(art_result_summary)
56 
57 

◆ find_file()

def python.TrigValSteering.Common.find_file (   pattern)
Bash inline command frequently used in multi-step tests
to pass the output of one step to the input of another
based on a name pattern rather than a fixed full file name

Definition at line 58 of file Common.py.

58 def find_file(pattern):
59  '''
60  Bash inline command frequently used in multi-step tests
61  to pass the output of one step to the input of another
62  based on a name pattern rather than a fixed full file name
63  '''
64  return '`find . -name \'{:s}\' | tail -n 1`'.format(pattern)
65 

◆ find_file_in_path()

def python.TrigValSteering.Common.find_file_in_path (   filename,
  path_env_var 
)
Find filename in search path given by environment variable

Definition at line 66 of file Common.py.

66 def find_file_in_path(filename, path_env_var):
67  '''Find filename in search path given by environment variable'''
68 
69  # same as AthenaCommon.unixtools.FindFile but don't want AthenaCommon dependency
70  for path in os.environ[path_env_var].split(os.pathsep):
71  f = os.path.join( path, filename )
72  if os.access(f, os.R_OK):
73  return f
74  return None
75 
76 
77 @lru_cache

◆ get_logger()

def python.TrigValSteering.Common.get_logger ( )
Default TrigValSteering logger

Definition at line 33 of file Common.py.

33 def get_logger():
34  '''Default TrigValSteering logger'''
35  logging.basicConfig(stream=sys.stdout,
36  format='%(asctime)s %(name)s %(levelname)-8s %(message)s',
37  datefmt='%Y-%m-%dT%H%M%S %Z',
38  level=trigvalsteering_logging_level)
39  return logging.getLogger('TrigValSteering')
40 
41 

◆ running_in_CI()

def python.TrigValSteering.Common.running_in_CI ( )

Definition at line 78 of file Common.py.

78 def running_in_CI():
79  return os.environ.get('gitlabTargetBranch') is not None

Variable Documentation

◆ art_input_cvmfs

python.TrigValSteering.Common.art_input_cvmfs

Definition at line 30 of file Common.py.

◆ art_input_eos

python.TrigValSteering.Common.art_input_eos

Definition at line 29 of file Common.py.

◆ art_result_summary

python.TrigValSteering.Common.art_result_summary

Definition at line 26 of file Common.py.

◆ package_prefix_dict

python.TrigValSteering.Common.package_prefix_dict

Definition at line 19 of file Common.py.

◆ trigvalsteering_logging_level

python.TrigValSteering.Common.trigvalsteering_logging_level

Definition at line 16 of file Common.py.

vtune_athena.format
format
Definition: vtune_athena.py:14
python.TrigValSteering.Common.find_file
def find_file(pattern)
Definition: Common.py:58
python.TrigValSteering.Common.running_in_CI
def running_in_CI()
Definition: Common.py:78
python.TrigValSteering.Common.clear_art_summary
def clear_art_summary()
Definition: Common.py:51
python.TrigValSteering.Common.find_file_in_path
def find_file_in_path(filename, path_env_var)
Definition: Common.py:66
Trk::open
@ open
Definition: BinningType.h:40
python.TrigValSteering.Common.get_logger
def get_logger()
Definition: Common.py:33
python.TrigValSteering.Common.art_result
def art_result(result, name)
Definition: Common.py:42
Trk::split
@ split
Definition: LayerMaterialProperties.h:38