13 Script that fetches all the logfiles from disk and reads the timings. 
   14 Parameters can be changed according to the working points considered. 
   15 Some parameters of the plots are hardcoded. 
   19 n_algos_in_flight_l = [1, 2, 5, 7, 10, 16, 20, 22]
 
   20 n_evts_in_flight_l = [1, 2, 4, 6, 7, 8, 9, 11, 13, 14, 15]
 
   29 line_style_l = [1] * 6 + [2] * 6
 
   30 cloneFlag_l = [
True, 
False]
 
   32 To be filled with files on disk of the form 
   33 timing_measurement_BrunelScenario_n150_eif2_aif20_nthreads24_cFalse_dqFalse.log 
   35 filename_scheleton = (
 
   36     "timing_measurement_BrunelScenario_n150_eif%s_aif%s_nthreads24_c%s_dqFalse.log" 
   40 def getRuntime(n_algos_in_flight, n_evts_in_flight, cloneFlag):
 
   41     filename = filename_scheleton % (n_evts_in_flight, n_algos_in_flight, cloneFlag)
 
   44     for line 
in open(filename, 
"r").readlines():
 
   53 o Key = [n_algos_in_flight,  n_evts_in_flight, cloneFlag] 
   60     for n_algos_in_flight 
in n_algos_in_flight_l:
 
   61         for n_evts_in_flight 
in n_evts_in_flight_l:
 
   62             for cloneFlag 
in cloneFlag_l:
 
   63                 rt = 
getRuntime(n_algos_in_flight, n_evts_in_flight, cloneFlag)
 
   64                 runtimes[n_algos_in_flight, n_evts_in_flight, cloneFlag] = rt
 
   70     for key, rt 
in runtimes.items():
 
   71         this_n_algos_in_flight, this_n_evts_in_flight, this_cloneFlag = key
 
   72         if this_n_evts_in_flight == n_evts_in_flight 
and this_cloneFlag == cloneFlag:
 
   73             points.append((this_n_algos_in_flight, rt))
 
   79     graph = ROOT.TGraph(len(points))
 
   80     graph.GetXaxis().SetTitle(
"Maximum # in flight algos")
 
   81     graph.GetXaxis().SetRangeUser(0, 23)
 
   82     graph.GetYaxis().SetTitle(
"Runtime [s]")
 
   83     graph.GetYaxis().SetTitleOffset(1.45)
 
   84     graph.GetYaxis().SetRangeUser(0.1, 275)
 
   85     graph.GetYaxis().SetNdivisions(12, 5, 1)
 
   87     graph.SetLineColor(colour)
 
   88     graph.SetMarkerColor(colour)
 
   89     graph.SetLineStyle(style)
 
   90     graph.SetFillColor(ROOT.kWhite)
 
   94         graph.SetPoint(point_n, x, y)
 
  100     title = 
"Brunel 150 events" 
  103         clone_string = 
"_clone" 
  104         title += 
" (Cloning)" 
  105     plotname = 
"runtime%s.pdf" % clone_string
 
  107     canvas = ROOT.TCanvas(plotname, 
"plot", 500, 400)
 
  113     for colour, n_evts_in_flight, line_style 
in zip(
 
  114         colour_l, n_evts_in_flight_l, line_style_l
 
  116         print(n_evts_in_flight)
 
  118             n_evts_in_flight, cloneFlag, runtimes, colour, line_style
 
  124         graph.SetTitle(title)
 
  129     legend = ROOT.TLegend(0.499, 0.45, 0.9, 0.9, 
"# Parallel Events")
 
  130     legend.SetTextSize(0.04)
 
  131     legend.SetFillColor(ROOT.kWhite)
 
  133     for graph, n 
in zip(graphs, n_evts_in_flight_l):
 
  134         legend.AddEntry(graph, 
"%s" % n)
 
  138     l = ROOT.TLatex(0.13, 0.16, 
"#font[12]{#scale[.8]{24 Threads}}")
 
  142     input(
"Press enter to save...")
 
  143     canvas.Print(plotname)