20n_algos_in_flight_l = [1, 2, 5, 7, 10, 16, 20, 22]
21n_evts_in_flight_l = [1, 2, 4, 6, 7, 8, 9, 11, 13, 14, 15]
71 for key, rt
in runtimes.items():
72 this_n_algos_in_flight, this_n_evts_in_flight, this_cloneFlag = key
73 if this_n_evts_in_flight == n_evts_in_flight
and this_cloneFlag == cloneFlag:
74 points.append((this_n_algos_in_flight, rt))
80 graph = ROOT.TGraph(len(points))
81 graph.GetXaxis().SetTitle(
"Maximum # in flight algos")
82 graph.GetXaxis().SetRangeUser(0, 23)
83 graph.GetYaxis().SetTitle(
"Runtime [s]")
84 graph.GetYaxis().SetTitleOffset(1.45)
85 graph.GetYaxis().SetRangeUser(0.1, 275)
86 graph.GetYaxis().SetNdivisions(12, 5, 1)
88 graph.SetLineColor(colour)
89 graph.SetMarkerColor(colour)
90 graph.SetLineStyle(style)
91 graph.SetFillColor(ROOT.kWhite)
95 graph.SetPoint(point_n, x, y)
101 title =
"Brunel 150 events"
104 clone_string =
"_clone"
105 title +=
" (Cloning)"
106 plotname =
"runtime%s.pdf" % clone_string
108 canvas = ROOT.TCanvas(plotname,
"plot", 500, 400)
114 for colour, n_evts_in_flight, line_style
in zip(
115 colour_l, n_evts_in_flight_l, line_style_l
117 print(n_evts_in_flight)
119 n_evts_in_flight, cloneFlag, runtimes, colour, line_style
125 graph.SetTitle(title)
130 legend = ROOT.TLegend(0.499, 0.45, 0.9, 0.9,
"# Parallel Events")
131 legend.SetTextSize(0.04)
132 legend.SetFillColor(ROOT.kWhite)
134 for graph, n
in zip(graphs, n_evts_in_flight_l):
135 legend.AddEntry(graph,
"%s" % n)
139 l = ROOT.TLatex(0.13, 0.16,
"#font[12]{#scale[.8]{24 Threads}}")
143 input(
"Press enter to save...")
144 canvas.Print(plotname)