Get data from tree's branch to txt

how to get data from one branch of a tree and output txt?
the way:
doesn’t work

Please read tips for efficient and successful posting and posting code

ROOT Version: 6.14
Compiler: Not Provided

The middle line: .x dump.cxx

1 Like

oh,sorry, i write wrong. it also doesn’t work

image like this

There’s no error reported. The “dump.txt” file should contain the output from the “dump.cxx” macro.

1 Like (783 Bytes)
i think it should be right. However, its result is the dump.txt of you can see it, maybe the cxx is wrong. thanks.

The “dump.cxx” macro writes its output to the “outputname” = “dump.txt” (and also to “dump.xml”) so, you should not use “.>” at all.

1 Like

thanks a lot ! you are right. and i find that my branch is “Singles”, not “singles”. it is the main reason.

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