Dear Roottalk,
assume I have an object Obj (class MyObj) with two data members data1 and data2 which I store into a TTree.
>MyTree->Branch( "Obj", "MyObj", &Obj )
To read those objects from the tree works perfectly via
>MyObj* Obj=0;
>MyTree->SetBranchAddress( "Obj", &Obj );
>MyTree->GetEntry( i );
So far so good...
I now recalculate data2 and store these results in another TTree which I
add as a friend to the first one (e.g. I do a calibration).
Is it now possible to read my objects from the tree, but now with data1 from the original and data2 from the friend tree?
I know I can directly read out the data members via the Branches "Tree1.Obj.data1", "Tree2.Obj.data2" but I would prefer something like the upper, i.e. creating a pointer to my object and telling ROOT where to get the data from.
Thanks a lot for your help
Thomas L.
-- Thomas Lauf MPE - Halbleiterlabor E-Mail: thl_at_hll.mpg.deReceived on Wed Apr 25 2007 - 17:23:42 CEST
This archive was generated by hypermail 2.2.0 : Wed Apr 25 2007 - 23:50:02 CEST