Hi,
I have this root file whose branches contains a number of leaves.I don’t know how to access the individual leaves of each branch of this tree. I am attaching the root file. Please let me know how to access the leaves variables of the individual branches.
Hi mustak21,
there are several ways to read data from a TTree in a ROOT file. Depending on the method you use to read the data the syntax to access the leaves might be different.
I am missing dictionaries for the classes stored in your file, but can you maybe provide a small macro/source file with your attempt that I can try to correct?
Also I would like to know that if I can change the structure of the root file from Tree->Branch->Leaves Structure to another root file to Tree->Leaves structure without losing any data.
Yes, afaik the only way is to read in your data and write in out in the form you prefer.
You can use TDataFrame (if you have access to ROOT v6.10) or TTree directly with SetBranchAddress and Fill to write out data.