SimpleEventBuilder/testing/results/SendBuf.C

34 lines
979 B
C++
Raw Permalink Normal View History

2023-09-27 15:47:46 +00:00
void SendBuf() {
gROOT->SetBatch(kTRUE);
auto filename = "./send_data_buffer.csv";
auto df = ROOT::RDF::MakeCsvDataFrame(filename, true, ';');
auto newcol = df.Define("bandwidth", "100*1024/time").Define("bf_kb", "buffer_size/static_cast<double>(1024)");
auto canvas = new TCanvas("c", "c", 1400, 1000);
//canvas->SetLogx();
canvas->SetGrid();
canvas->SetLogy();
auto g = newcol.Graph("bf_kb", "bandwidth");
g->SetTitle("Bandwidth vs Sender Buffer Size;Buffer Size [kB];Bandwidth [kB/s]");
// Make the plot esthetically better
//It's kMultiply a lil bigger
g->SetMarkerStyle(52);
g->SetMarkerSize(1.5);
g->SetMarkerColor(kBlack);
g->SetLineColor(kBlue);
g->GetXaxis()->SetLimits(-50,1000);
g->GetHistogram()->SetMinimum(1e3);
g->GetHistogram()->SetMaximum(1e7);
g->DrawClone("ALP");
canvas->Print("SendBufferSize.png");
gROOT->SetBatch(kFALSE);
gApplication->Terminate(0);
}