Fork me on GitHub

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#1261 closed How to (wontfix)

Reading a leaf with ExRootTreeReader

Reported by: Amin Abou Ibrahim Owned by:
Priority: minor Milestone:
Component: Delphes code Version: Delphes 3
Keywords: Cc:

Description

Dear experts,

I have a free leaf in my tree (not located under a branch) and I am trying to read the values stored in it using the ExRootTreeReader in a c++ macro. I cannot find the correct way of accessing the leaf. How do I do this?

Thank you,
Amin

Change History (3)

comment:1 by Amin Abou Ibrahim, 7 years ago

Let me clarify how I created the leaf. I used a python script:

chain = TChain("Delphes")
tree = chain.CloneTree(0)
wght = np.zeros(1, dtype=float)
tree.Branch('wght', wght, 'wght/D')

followed by a "for loop" to find wght and then tree.Fill(). Now using a c++ macro, I cannot access the leaf wght.
Hope you can help!

Thank you,
Amin

comment:2 by Pavel Demin, 7 years ago

Resolution: wontfix
Status: newclosed

ExRootTreeReader can only read branches that are TClonesArrays. This kind of branches can be created by ExRootTreeWriter.

comment:3 by Amin Abou Ibrahim, 7 years ago

Thanks Pavel.
Are there examples showing how to use ExRootTreeWriter? I could not find any in the examples directory.

Best,
Amin

Note: See TracTickets for help on using tickets.