| The Gaudi Framework v32r1 (f65d50dc)

Functions | Variables
jsonFromLHCbLog Namespace Reference

## Functions
def | load_brunel_scenario (filename)

## Variables
dictionary | json = {}

## Function Documentation

## ◆ load_brunel_scenario()

def jsonFromLHCbLog.load_brunel_scenario | ( |  | filename | ) |

Definition at line 4 of file jsonFromLHCbLog.py.

4 def load_brunel_scenario(filename):
5 gr = graph()
6 algs = {}
7 timing = {}
8 objs = []
9 curr = None
10 order = 0
11 nodes = ('/Event', '/Event/Rec', '/Event/DAQ')
12 for l in open(filename).readlines():
13 if l.find('StoreTracer') == 0:
14 if l.find('Executing Algorithm') != -1:
15 alg = l.split()[-1]
16 if alg not in algs.keys():
17 algs[alg] = (order, set(), set())
18 curr = alg
19 order += 1
20 elif l.find('Done with Algorithm') != -1:
21 curr = None
22 elif l.find('[EventDataSvc]') != -1 and curr:
23 obj = l.split()[-1]
24 if obj in nodes:
25 continue
26 if obj.find('/Event/') == 0:
27 obj = obj[7:]
28 obj = obj.replace('/', '_')
29 if obj not in objs:
30 objs.append(obj)
31 talg = algs[curr]
32 if l.find('RETRIEVE') != -1:
33 if obj not in talg[1]:
34 talg[1].add(obj)
35 elif l.find('REGOBJ') != -1:
36 if obj not in talg[2]:
37 talg[2].add(obj)
38 if l.find("TimingAuditor") != -1:
39 algo = l.split()[2] # .rstrip("|")
40 index = 13
41 if algo.endswith("|"):
42 index = 12
43 algo = algo.rstrip("|")
44 if algo in algs.keys():
45 timing[algo] = l.split()[index]
46 else:
47 for name in algs.keys():
48 if name.startswith(algo):
49 timing[name] = l.split()[index]
50
51 all_algos = []
52 for i, (alg, deps) in enumerate(algs.items()):
53 if alg in ["PatPVOffline", "PrsADCs"]:
54 continue
55 if deps[1] or deps[2]:
56 inputs = []
57 inputs = [
58 item for item in deps[1]
59 if item not in ("DAQ_ODIN",
60 "DAQ_RawEvent") and item not in deps[2]
61 ]
62 outputs = [item for item in deps[2]]
63 new_algo = {
64 "name": alg,
65 "inputs": inputs,
66 "outputs": outputs,
67 "runtimes_wall": [float(timing[alg])]
68 }
69 all_algos.append(new_algo)
70 return all_algos
71
72
GaudiPython.Persistency.add
def add(instance)
Definition: Persistency.py:39
plotSpeedupsPyRoot.graph
graph
Definition: plotSpeedupsPyRoot.py:140
jsonFromLHCbLog.load_brunel_scenario
def load_brunel_scenario(filename)
Definition: jsonFromLHCbLog.py:4

## Variable Documentation

## ◆ json

dictionary jsonFromLHCbLog.json = {}

Definition at line 75 of file jsonFromLHCbLog.py.