Saving output as .txt file

Dear Experts,

When I do treename->Scan(branch:branch:branch), I get the print out on the terminal screen but it does not give the complete output at once and I cannot refer to the results again and again.

So is there a way to save the complete output in a pdf or .txt file?


Please read tips for efficient and successful posting and posting code

ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided

You can use treename->SetScanField(0) to display all, as described here. And you can redirect the screen output to a file. For example:

root [0] treename->SetScanField(0)
root [1] .> treename-scan.txt
root [2] treename->Scan(branch:branch:branch)
root [3] .>
root [4] .q

Dear @bellenot, thank you very much for this.:slight_smile:

1 Like