Oops, sorry, that version of the script was broken. The one attached here
should work.
Phil
On Monday, February 21, 2011 12:00:08 pm Philip Rodrigues wrote:
> Hi,
> I have a TClonesArray containing a class with a TString member variable
> (although I see the same behaviour with std::string), and I'm storing the
> TClonesArray as a TTree Branch.
>
> What I want to do in the end is read the values of the TString branch
> without having to read any other branches, but I couldn't manage it using
> branches and leaves directly, or with TTreeFormula.
>
> So I took a step back, and looked at the output of TTree::Scan, which I
> don't understand: for every instance it shows the value of the TString
> from the first instance. Is this intended behaviour? (For an int, the
> values between instances do vary). If so, is there a way I can get at the
> individual TString instances without reading the whole object off of disk?
>
> I've attached a minimal example: load it up and run createTree() to create
> the tree, and readTree() to run a TTree::Scan that shows the issue.
>
> Thanks,
> Phil
This archive was generated by hypermail 2.2.0 : Tue Feb 22 2011 - 23:50:01 CET