Question About root2array et al.

52 views
Skip to first unread message

Jacob Howard

unread,
Jan 28, 2014, 12:35:40 PM1/28/14
to rootpy...@googlegroups.com
Hi Noel (or others),

Can you tell me if the include_weight/weight_name functionality of root2array works for multiple ROOT files?  E.g., if I have N ROOT files that I'm using root2array on, and I request that the tree weight be included as an array property, is the tree weight property for each event just taken from the tree in the first file, or is it taken from for the respective tree that each event is in?

I assume it is the latter (or my plots would look weird), but I just wanted to double check this at some point.  I'm not sure how the GetWeight() method of TChain works as you advance through entries, or exactly how root_numpy handles this.

Best,
Jacob

Noel Dawe

unread,
Jan 28, 2014, 2:06:42 PM1/28/14
to rootpy...@googlegroups.com
Hi Jacob,

Yes, it should always be the weight of the current tree. We have a unit test that checks this with two trees with different weights in a chain:


The current weight of the chain will be the weight of the current tree unless you use the "global" option in TChain's SetWeight method:


Noel



--
You received this message because you are subscribed to the Google Groups "rootpy users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rootpy-users...@googlegroups.com.
To post to this group, send email to rootpy...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rootpy-users/CACQAW3tEK4%3D_hCfBES8iKx_r32DRyLBreRR-SKvrDEWH-Ei9Aw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Jacob Howard

unread,
Jan 28, 2014, 2:18:43 PM1/28/14
to rootpy...@googlegroups.com
Cool, thanks for the confirmation.

Best,
Jacob


Reply all
Reply to author
Forward
0 new messages