Question on Graphing Histogram Plots From FEWZ

I am currently using the FEWZ generator (gate.hep.anl.gov/fpetriello/FEWZ.html) which has a utility for writing out histograms in .dat files of three columns of the form:

Bins | Weight | Numerical Error

However, I see that with the histogram classes that ROOT calculates the actual weight for you in the histograms. My question is what utility and implementation would be best for creating plots for my data?. Because of the nature of the data output, I’d have to manually manipulate the written .dat files in order to create a visual plot.
Sorry if this sounds trivial, I am new to the software and have been working on a solution for a while before I had gotten to these forums

Here is a sample of some dummy data, along with the original file itself.

If someone could help it would be much appreciated! I’m just confused on the actual implementation, once I can get started I should be able to streamline and automate the process more.
ZWpT.dat (459 Bytes)
NNLO.test_results_Z.dat (29.9 KB)

Try with a TGraphErrors:

{
  TGraphErrors *ZWpT = new TGraphErrors("ZWpT.dat", "%lg %lg %lg");
  ZWpT->SetNameTitle("ZWpT", "TGraphErrors from ZWpT.dat");
  ZWpT->Draw("AP*");
}

If you want to have a histogram, you need to define its “binning” -> in the most general case that would mean two numbers per bin -> the “low-edge” and the “upper-edge” of each bin.
That information does not exist in your data files.
It is, however, possible that there exists some “standard binning” which is used by the “FEWZ generator” (and you just get the “center” of each bin printed in your data files as the first column).
If you find such information somewhere, you can easily create a “variable bin size” histogram, for example. See the TH1 and/or the THnSparse descriptions for more informations.

If you want to get data out of your “NNLO.test_results_Z.dat” file, you would need to write a small “parser” in C++.

BTW. Questions like these belong to the ROOT Support forum.

Thanks for the quick reply. Also my apologies, I will make note of that for posts in the future.

Now moved …