deleting histograms

From: Richard Dubois (richard@SLAC.stanford.edu)
Date: Thu Mar 18 1999 - 06:13:39 MET


 I would like to allow for cleaning up histograms, so I loop over the
objects in gDirectory->GetList() and make a TObjArray of those
inheriting from TH1 (is there a better way?). Then from this list I can
Reset() them or delete them.

 If I delete them, I find that, when I redefine the same histogram, it
appears to go through the fill OK, but when I go to draw it, I get a seg
fault.

 I'm wondering if Root keeps its own list of histograms and doesn't
realize that I have deleted it.

 Is there a safe way to delete the histograms?

Thanks,

Richard
--
Richard Dubois
SLD, Stanford Linear Accelerator Center
Richard@slac.stanford.edu
http://www.slac.stanford.edu/~richard/
650-926-3824
650-926-2923 (FAX)



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:30 MET