Reading the branches of a class

Dear Experts,

I am facing a problem to read the branches of the classes. I tried to follow the previously asked questions. But I could not figure it out.

Here I have attached my branches list, the expected output and the macros used.

Thank you
Kanhaiya Gupta

delphes_analysis.C (1.3 KB)


Please read tips for efficient and successful posting and posting code

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


Hello @kanhaiya-gupta,

Can you please be more concise about the issue that you are having? Also, you have some tutorials that you can use for reference here. Maybe you find useful this particular one.

Cheers,
J.

I am getting an unexpected output. I don’t know what is a mistake in my code.

Hello,

It seems to me that you are misusing the TBranch API. Please look at the aforementioned tutorial -it looks similar to what you are trying to accomplish-. Also, please read this documentation on TTree.

Cheers,
J.

I am sorry. I applied the example code uploaded by @brun for this question. Can you please forward some example of reading sub-branches of tree in root file.

Thank you

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