[ROOT] Seg fault with copy of histogram

From: Rich Holmes (rsholmes@physics.syr.edu)
Date: Thu Oct 10 2002 - 00:05:50 MEST


Why does this not work?  I'm using ROOT 3.02/07 under Red Hat Linux
7.2.  ntp1 is a tree in the root file.

root [0] TFile f("root/5100/run5152.root")                       
root [1] ntp1->Draw("bpm31X")                                    
<TCanvas::MakeDefCanvas>: created default TCanvas with name c1
root [2] TH1F *new = (TH1F*)(htemp->Clone())                     
root [3] new->SetName("new")                                     
root [4] new->Draw()                                             
root [5] ntp1->Draw("bpm31Y")                                    
root [6] new->Draw()                                             

 *** Break *** segmentation violation

[new->Draw() works fine, until I use ntp1->Draw(), and then new->Draw()
seg faults.]

-- 
Richard S. Holmes, Research Assistant Professor
Physics Department, Syracuse University
Syracuse, NY 13244
(315) 443-5977



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