Hi,
Use:
TObjArray *namArr = .....;
....
tree->Branch("Naming",&namArr,32000, -1 /* select the split level */);
Cheers,
Philippe.
James Harrison wrote:
> Hi folks,
>
> I'm having real difficulty making an array of objects store themselves
> in a TTree branch.
>
> I have two arrays of primitives that are stored on the branch just fine:
>
> tree->Branch("RMSing",rmsArr,"rmsArr[arrLen]/F");
> tree->Branch("MEANing",mArr,"mArr[arrLen]/F");
>
> And storing the objects in the array works fine:
>
> namArr->Add(new TObjString(hulkName));
>
> But then I'm lost on actually adding the array as a branch. The manual
> says in chapter 12 that it's possible to add an array of objects where
> one object is represented by a branch, but I'd like to store the
> entire TObjArray as a single branch.
>
> Doable?
>
> Thanks!
>
> James
>
Received on Thu Oct 02 2008 - 22:51:41 CEST
This archive was generated by hypermail 2.2.0 : Fri Oct 03 2008 - 11:50:02 CEST