TTree: Scan and Friends

From: Chris Roat <>
Date: Thu, 9 Jun 2005 12:02:09 -0700

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

// 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

   // cut had no effect on friend -- entries that were cut during CopyTree still present

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