Convert root 2d histogram data to alternate format

hi everyone,

i apologize if i did not post this in the root forum, but my question is whether there is a way to convert the data stored in a root 2d (or any histogram for that matter) into a more universal format, such as a CSV file.

i am completely unfamiliar with ROOT and am currently able to obtain ROOT histogram data outputs from my simulations. instead of using ROOT to analyze the data, i was hoping there was a way to convert the files to CSV for analysis in MATLAB, which i am much more familiar with.

thanks

adam

to generate comma separated data format you can make a simple macro looping over the histogram bins.

Hi Olivier,

is there no way this could be implemented inside ROOT proper? I usually need to have these in my own ROOT utility library for TTree, TGraph and at least TH1 and TH2. There is e.g. TTree::ReadFile to get data into ROOT, but getting data out is left to the user.

I am not sure what the plans are on for TTree. Ask Philippe.