ATLAS Offline Software
Functions | Variables
verify_menu_config Namespace Reference

Functions

def verify (config, trigger_level)
 
def load_and_verify (file_path, trigger_level)
 
def paths_starting_with (prefix)
 

Variables

 log
 
 parser
 
 description
 
 individual
 
 title
 
 help
 
 args
 
 results
 
 json_files
 
 any_failures
 
 success_plural
 
 failure_plural
 

Function Documentation

◆ load_and_verify()

def verify_menu_config.load_and_verify (   file_path,
  trigger_level 
)

Definition at line 41 of file verify_menu_config.py.

41 def load_and_verify(file_path, trigger_level):
42  if not os.path.isfile(file_path):
43  log.error("'{}' does not exist".format(file_path))
44  elif not os.path.splitext(file_path)[1] == ".json":
45  log.error("'{}' is not a JSON file".format(file_path))
46  else:
47  with open(file_path, "r") as config_file:
48  config = json.load(config_file, object_pairs_hook = odict)
49 
50  return verify(config, trigger_level)
51 
52  return {"successes": [], "failures": []}
53 
54 

◆ paths_starting_with()

def verify_menu_config.paths_starting_with (   prefix)

Definition at line 75 of file verify_menu_config.py.

75  def paths_starting_with(prefix):
76  return [args.folder + os.sep + f
77  for f in json_files if f.startswith(prefix)]
78 

◆ verify()

def verify_menu_config.verify (   config,
  trigger_level 
)
Run all consistency checks for the trigger on the config.

Definition at line 23 of file verify_menu_config.py.

23 def verify(config, trigger_level):
24  '''
25  Run all consistency checks for the trigger on the config.
26  '''
27  tests = menu_tests[trigger_level]
28  for test in tests:
29  test.run(config)
30 
31  successes = []
32  failures = []
33  for test in tests:
34  if test.failures:
35  failures.append(test)
36  else:
37  successes.append(test)
38  return { "successes": successes, "failures": failures }
39 
40 

Variable Documentation

◆ any_failures

verify_menu_config.any_failures

Definition at line 94 of file verify_menu_config.py.

◆ args

verify_menu_config.args

Definition at line 65 of file verify_menu_config.py.

◆ description

verify_menu_config.description

Definition at line 57 of file verify_menu_config.py.

◆ failure_plural

verify_menu_config.failure_plural

Definition at line 98 of file verify_menu_config.py.

◆ help

verify_menu_config.help

Definition at line 61 of file verify_menu_config.py.

◆ individual

verify_menu_config.individual

Definition at line 58 of file verify_menu_config.py.

◆ json_files

verify_menu_config.json_files

Definition at line 73 of file verify_menu_config.py.

◆ log

verify_menu_config.log

Definition at line 21 of file verify_menu_config.py.

◆ parser

verify_menu_config.parser

Definition at line 56 of file verify_menu_config.py.

◆ results

verify_menu_config.results

Definition at line 67 of file verify_menu_config.py.

◆ success_plural

verify_menu_config.success_plural

Definition at line 96 of file verify_menu_config.py.

◆ title

verify_menu_config.title

Definition at line 59 of file verify_menu_config.py.

vtune_athena.format
format
Definition: vtune_athena.py:14
verify_menu_config.paths_starting_with
def paths_starting_with(prefix)
Definition: verify_menu_config.py:75
verify_menu_config.load_and_verify
def load_and_verify(file_path, trigger_level)
Definition: verify_menu_config.py:41
verify_menu_config.verify
def verify(config, trigger_level)
Definition: verify_menu_config.py:23
Trk::open
@ open
Definition: BinningType.h:40