Saving root output in txt file

I have a root file(of about 250MB), it has histograms saved inside it. I want to have a look at those histograms. When I list them using-

root [0] Tfile *f= new TFile (“hist.root”)
root [1] f->ls()

The output exceeds the size of terminal, so I cannot have a look at all the histograms. I want a way to save the output of list command in a txt file.

Version:_ Not Provided
Platform: Not Provided
Compiler: Not Provided

You can also do at the system prompt:

$ rootls hist.root > hist.txt

I tried this, it doesn’t seem to work ;(

It gives an error saying,

ImportError: No module named cmdLineUtils

What ROOT version? On v5 you can try:

f->ls(); > myfile.txt

Its version 6.22

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