[ROOT] TBrowser problem

From: Liz Buckley-Geer (buckley@fnal.gov)
Date: Tue Apr 01 2003 - 22:44:09 MEST


Hi, I am having a problem looking at my root file using TBRowser. I am 
using Root Version   3.05/00  20 February 2003 (built from cvs). I have 
also tried  Version   3.05/03     21 March 2003 (FNAL installed version). 

I have a root file containing many TCanvases 
Here is the listing of the first few.
root [1] f->ls();                        
TFile**		stability_NEAR.root	
 TFile*		stability_NEAR.root	
  KEY: TCanvas	c1;295	Light Injection stability
  KEY: TCanvas	c1;294	Light Injection stability
  KEY: TCanvas	c1;293	Light Injection stability
  KEY: TCanvas	c1;292	Light Injection stability
  KEY: TCanvas	c1;291	Light Injection stability

For each entry I reuse the same canvas, clearing it first. When I attempt 
to view the canvases using a TBrowser every canvas contains the last 
canvas that was written to the file instead of the picture that should be 
there - I hope that makes sense. I can provide the macro and root file if 
requested. 

If I use the commands 

root [0] TFile f("stability_NEAR.root");
root [2] TH1F *h = (TH1F*) f->Get("c1;14");
root [3] h->Draw();

Then I see the correct contents so I think I wrote the file correctly.  
This method is a bit painful as there are 295 canvases in this file.

Any clues.


	Thanks Liz
 -- 



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:10 MET