[ROOT] problems with using more than 1 branch.

From: Martin Turner (martin@hep.ph.liv.ac.uk)
Date: Tue Apr 09 2002 - 12:00:09 MEST


Hello ROOT experts,
This is the frame of some code I have:

TFile *f =new TFile("Lambda_analysis.root","READ");
TTree *lambda_tree =(TTree*)f.Get("Lambda_analysis");


//Do analysis

f->close()
TFile *f =new TFile("Lambda_analysis.root","READ");
TTree *lambda_tree =(TTree*)f.Get("Lambda_analysis_track");
//ie. a different branch

TH1F* hpt_all_pion=new TH1F("pion pt","pion pt",100,0,10);
lambda_tree2->Draw("ftrack_pt>> pion pt");

This prints nothing except the Canvas and Pad.
It will work if I use hwhatever->SetDirectory(0), but I must do this for
every histogram. Clearly this is messy. Is there any way I can specify
where to place or subsequent histograms. It seems to get confused by using
another branch before it. What exactly is happening?

Martin



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:48 MET