ATLAS Offline Software
Loading...
Searching...
No Matches
print_auditor_callgraph Namespace Reference

Classes

class  Steps

Functions

 parse_log_file (fname, step=Steps.ini)

Variables

str __author__ = "Sebastien Binet <binet@cern.ch>"
 fname = os.path.expandvars(os.path.expanduser(sys.argv[1]))
 step = Steps.ini
 gr = parse_log_file(fname,step)

Function Documentation

◆ parse_log_file()

print_auditor_callgraph.parse_log_file ( fname,
step = Steps.ini )

Definition at line 29 of file print_auditor_callgraph.py.

29def parse_log_file(fname, step=Steps.ini):
30 beg_pat = re.compile(r"NameAuditor.*?About to Enter "
31 r"(?P<CompName>.*?) "
32 r"%s Method"%step)
33 end_pat = re.compile(r"NameAuditor.*?Just Exited "
34 r"(?P<CompName>.*?) "
35 r"%s Method"%step)
36
37 stack = 0
38 graph = []
39
40 for l in open(fname, 'r'):
41 l = l.strip()
42 beg = re.match(beg_pat, l)
43 end = re.match(end_pat, l)
44 if not (beg or end):
45 continue
46
47 if beg:
48 component = beg.group('CompName')
49 #print (" "*stack,component)
50 stack += 1
51 graph += [ (stack, component) ]
52
53 if end:
54 component = end.group('CompName')
55 #print (" "*stack,component)
56 stack -= 1
57
58 return graph
59
60

Variable Documentation

◆ __author__

str print_auditor_callgraph.__author__ = "Sebastien Binet <binet@cern.ch>"
private

Definition at line 17 of file print_auditor_callgraph.py.

◆ fname

print_auditor_callgraph.fname = os.path.expandvars(os.path.expanduser(sys.argv[1]))

Definition at line 65 of file print_auditor_callgraph.py.

◆ gr

print_auditor_callgraph.gr = parse_log_file(fname,step)

Definition at line 79 of file print_auditor_callgraph.py.

◆ step

print_auditor_callgraph.step = Steps.ini

Definition at line 70 of file print_auditor_callgraph.py.