3 from __future__
import print_function
7 collection = line[begin+2:]
10 return collection.strip()
17 filename=os.path.expanduser(filename)
18 if filename.endswith(
'.gz'):
20 fh = gzip.open(filename,
'r')
22 fh =
open(filename,
'r')
30 if line[0]!=
'>' and line[0]!=
'|':
38 firstline=line.strip().removeprefix(
"||")
40 keys = [key.strip()
for key
in firstline.split(
"||")]
41 nextLine = lineIt.next()
42 secondline=nextLine.strip().removeprefix(
"||")
44 values = [
float(value.strip())
for value
in secondline.split(
"||")]
45 info = dict(zip(keys,values))
46 summary[collectionName]=info
50 print (
"Found data for the following collections: ", summary.keys())
52 from PmbUtils.ValuePerDomainCalcUtils
import PlottableResult, JobListPlotter, TimeLabel
53 title =
'MooreTracks ( %s events)' %
int(summary[
'MooreTracks'].
get(
'Events'))
54 result = PlottableResult(summary[
'MooreTracks'].
keys(), title=title)
56 exclusions = [
"Events",
"Tracks"]
57 for key
in summary[
'MooreTracks'].
keys():
58 if (key
not in exclusions):
59 result.addPoint(colname=key, value=summary[
'MooreTracks'].
get(key), time=TimeLabel(label=
"Now",sortvalue=0))
60 JobListPlotter().produceTimeDevelopmentPlot(result,
"test.png")
64 from PmbUtils.ValuePerDomainCalcUtils
import PlottableResult, JobListPlotter, TimeLabel
65 firstSummary = summaries[0]
67 title =
'%s ( %s events)' % (collection,
int(firstSummary[collection].
get(
'Events')) )
68 print (
'Making plot for %s with %s summaries' % (title, len(summaries)))
69 result = PlottableResult(firstSummary[collection].
keys(), title=title)
71 for summary
in summaries:
74 exclusions = [
"Events",
"Tracks"]
75 for key
in summary[collection].
keys():
76 if (key
not in exclusions):
78 result.addPoint(colname=key, value=summary[collection].
get(key), time=TimeLabel(label=times[i],sortvalue=i))
79 print (
"result.getNColumns()", result.getNColumns())
80 print (
"result.getTimes()", result.getTimes())
81 JobListPlotter().produceTimeDevelopmentPlot(result,filename)