Hi all,
I am new to ROOT and I’ve a macro that repeats the same thing over and over, so it is probably a good idea to make this part of the code a function, but I don’t know how to do this partially because the function would need to take a data.txt file as an argument.
TGraphErrors *gr1 = new TGraphErrors("~/macros/centralitypions5.txt", "%lg %*s %*s %lg %lg");
gr1->SetLineColor(kRed);
pions->Add(gr1);
I could also download the data as a ROOT file, which has a TDirectoryFile in it, which is something I don’t know how to work with. So in short could someone help me define this piece of code as a function?