Home | News | Documentation | Download

How to make a text file from .root file?

Hello! I have a .root file with trees.I need to show this data to a person,who cant use root.How can I make a file with this data readable without root and not losing anything?(for example .txt)

I add my root file in cloud : https://yadi.sk/d/0LEj_22a6j0Y4A

Try searching the forum for “root to text” or something similar. Perhaps the simplest way is with Scan, but to control the output format I think you will have to do your own export macro (e.g. with ofstream…).

root [1] .> out.dat
ntuple->Scan()
Type <CR> to continue or q to quit ==> q
.>
root [4] .q

Hello,thank you for replying.This doesnt work.Maybe I do something wrong?

“ntuple” is a tree example I have … you should (of course) use you own Three instead.

Im very sorry,but I still have troubles
I have a tree,called GEOM and I did this:
.> out.dat
GEOM->Scan()
==> q
.>

And I got this problems (see screenshot)

Im sorry I am a beginner in ROOT,could You please give me a more detailed explanation

I do not see the Scan command on your screen dump.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.