100def make_plot(runtimes, cloneFlag):
101 title = "Brunel 150 events"
102 clone_string = ""
103 if cloneFlag:
104 clone_string = "_clone"
105 title += " (Cloning)"
106 plotname = "runtime%s.pdf" % clone_string
107
108 canvas = ROOT.TCanvas(plotname, "plot", 500, 400)
109 canvas.SetGrid()
110 canvas.cd()
111
112 graphs = []
113 first = True
114 for colour, n_evts_in_flight, line_style in zip(
115 colour_l, n_evts_in_flight_l, line_style_l
116 ):
117 print(n_evts_in_flight)
118 graph = getSingleGraph(
119 n_evts_in_flight, cloneFlag, runtimes, colour, line_style
120 )
121 opts = "LSame"
122 if first:
123 opts = "AL"
124 first = False
125 graph.SetTitle(title)
126 graph.Draw(opts)
127 graphs.append(graph)
128
129
130 legend = ROOT.TLegend(0.499, 0.45, 0.9, 0.9, "# Parallel Events")
131 legend.SetTextSize(0.04)
132 legend.SetFillColor(ROOT.kWhite)
133
134 for graph, n in zip(graphs, n_evts_in_flight_l):
135 legend.AddEntry(graph, "%s" % n)
136 legend.Draw()
137
138
139 l = ROOT.TLatex(0.13, 0.16, "#font[12]{#scale[.8]{24 Threads}}")
140 l.SetNDC()
141 l.Draw()
142
143 input("Press enter to save...")
144 canvas.Print(plotname)
145
146
147