6 collection = line[begin+2:]
9 return collection.strip()
16 filename=os.path.expanduser(filename)
17 if filename.endswith(
'.gz'):
19 fh = gzip.open(filename,
'r')
21 fh =
open(filename,
'r')
29 if line[0]!=
'>' and line[0]!=
'|':
37 firstline=line.strip().removeprefix(
"||")
39 keys = [key.strip()
for key
in firstline.split(
"||")]
40 nextLine = lineIt.next()
41 secondline=nextLine.strip().removeprefix(
"||")
43 values = [
float(value.strip())
for value
in secondline.split(
"||")]
44 info = dict(zip(keys,values))
45 summary[collectionName]=info
49 print (
"Found data for the following collections: ", summary.keys())
51 from PmbUtils.ValuePerDomainCalcUtils
import PlottableResult, JobListPlotter, TimeLabel
52 title =
'MooreTracks ( %s events)' %
int(summary[
'MooreTracks'].
get(
'Events'))
53 result = PlottableResult(summary[
'MooreTracks'].
keys(), title=title)
55 exclusions = [
"Events",
"Tracks"]
56 for key
in summary[
'MooreTracks'].
keys():
57 if (key
not in exclusions):
58 result.addPoint(colname=key, value=summary[
'MooreTracks'].
get(key), time=TimeLabel(label=
"Now",sortvalue=0))
59 JobListPlotter().produceTimeDevelopmentPlot(result,
"test.png")
63 from PmbUtils.ValuePerDomainCalcUtils
import PlottableResult, JobListPlotter, TimeLabel
64 firstSummary = summaries[0]
66 title =
'%s ( %s events)' % (collection,
int(firstSummary[collection].
get(
'Events')) )
67 print (
'Making plot for %s with %s summaries' % (title, len(summaries)))
68 result = PlottableResult(firstSummary[collection].
keys(), title=title)
70 for summary
in summaries:
73 exclusions = [
"Events",
"Tracks"]
74 for key
in summary[collection].
keys():
75 if (key
not in exclusions):
77 result.addPoint(colname=key, value=summary[collection].
get(key), time=TimeLabel(label=times[i],sortvalue=i))
78 print (
"result.getNColumns()", result.getNColumns())
79 print (
"result.getTimes()", result.getTimes())
80 JobListPlotter().produceTimeDevelopmentPlot(result,filename)