Thanks for your response,
The error is the following for pmfDataMD:
Traceback (most recent call last):
File "layer_eff_rt.py", line 18, in ?
for nEvent in tree.pmfDataMD:
TypeError: iteration over non-sequence
If I insert print type(tree.pmfDataMD) right after the
tree = gDirectory.Get( 'correl_tree' )
entries = tree.GetEntriesFast()
statements, I get the following printed out:
<type 'long'>
Traceback (most recent call last):
File "layer_eff_rt.py", line 19, in ?
for nEvent in tree.pmfDataMD:
TypeError: iteration over non-sequence
Cheers,
Dennis
-----Ursprüngliche Nachricht-----
Von: Christopher Jones [mailto:c_jones_at_MIT.EDU]
Gesendet: Di 25.11.2008 15:16
An: Dennis Petschull
Cc: roottalk_at_lxbuild091.cern.ch
Betreff: Re: [ROOT] PyROOT: Getting boolean array (branch) out of tree
Hi,
What does the error look like when you try this? Also, in your loop,
>
> for nEvent in tree.pmfDataMD:
> if nEvent >= 1:
> print nEvent
could you find out the type of the iterable "nEvent" (with say type(nEvent) )? Maybe you have to do a little more to tease out the value you want (like indexing), depending on your error message or bug.
Chris Jones
c_jones_at_mit.edu
Received on Tue Nov 25 2008 - 15:44:23 CET
This archive was generated by hypermail 2.2.0 : Tue Nov 25 2008 - 17:50:01 CET