Hi ROOTers,
Is it possible to have TTree::Scan (and even TTree::CopyTree) pay attention to friends? For example,
// get 2 catalogs and make them friends
TFile catFile("step2.catalogs/catalogs.root");
TTree *cat= (TTree*)catFile.Get( "STEP2_psfA_shear01" );
TFile resFile("data/STEP2/psfA/psfA_shear01_res.root");
TTree *resCat= (TTree*)resFile.Get("STEP2_psfA_shear01_res");
cat->AddFriend(resCat);
// this does not show any information from friend
cat->Scan("*","","",25);
// trim the tree with some cuts
TTree *finalCat= cat->CopyTree("res_e2*res_e2+res_e1*res_e1<0.95 &&
res_covQual==3");
// still no friend information
finalCat->Scan("*","","",25);
// cut had no effect on friend -- entries that were cut during
CopyTree still present
((TFriendElement*)finalCat->GetListOfFriends()->At(0))->GetTree()->Scan("*","","",25);
Cheers,
Chris
Received on Thu Jun 09 2005 - 21:02:17 MEST
This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:09 MET