Export data from histogram to text file

Hello everyone,

I have produced the following histogram. Now I would like to extract two columns: bin range and number of events in that range: for instance from (12.6 to 12.65) there are 8 events.
image
Your help will be appreciated.

Thank you.

A search for “Print histogram” revealed this here:

If you leave out the redirects .> file.txt, it will print to the console.

it does not work for me,
but thanks for your help.

If

histogram->Print("all");

doesn’t work, you have to upload the histogram, and we have to have a look. This should work.

It works now.
I previously typed .>.
Thank you.

Just a follow up question for clarifications:
What do the x-values represent? Center, left, or right of the bin? What do error represent?

Thank you.

It’s
binContent binCentre errorOfBinContent