Hi David, I fixed this problem last week in the development version in CVS. Rene Brun On Fri, 10 Jan 2003, David d'Enterria wrote: > Hello Rooters, > > A sequence of CINT commands showing two(?) problems: > > // This works: > > const Int_t n = 5; > Float_t y[n] = {5.,7.,10.,14.,16.}; > Float_t x[n] = {5.,7.,9.,13.,15.}; > TGraph *g = new TGraph(n,x,y); > g->GetHistogram() > (const class TH1F*)0x87365c0 // non-null address. OK, no need of > g->Draw("AP") after 3.04 release > > // although: > > g->GetXaxis() > (const class TAxis*)0x0 > g->GetHistogram()->GetXaxis() > (const class TAxis*)0x8736600 > > // Is this above a bug or a feature ? > > // Let's go on and try now with TGraphErrors > > Float_t ex[n] = {0.01,0.02,0.02,0.01,0.01}; > Float_t ey[n] = {0.,0.,0.,0.,0.}; > TGraphErrors *graph = new TGraphErrors(n,x,y,ex,ey); > graph->GetXaxis() > (const class TAxis*)0x0 > graph->GetHistogram() > *** Break *** segmentation violation > > Relevant part of back trace from gdb: > > Program received signal SIGSEGV, Segmentation fault. > [Switching to Thread 1024 (LWP 994)] > 0x408d2431 in TGraphErrors::ComputeRange () from /usr/root/lib/libGraf.so > (gdb) back > #0 0x408d2431 in TGraphErrors::ComputeRange () from > /usr/root/lib/libGraf.so > #1 0x408c7a4e in TGraph::GetHistogram () from /usr/root/lib/libGraf.so > #2 0x4091f694 in G__TGraph_GetHistogram_0_3 () from > /usr/root/lib/libGraf.so > .... > > Am I doing something wrong here ? > > Thanks in advance, > > PS: Using ROOT 3.04/02 binaries on a redhat 7.1 machine > > -- > David D'ENTERRIA PostDoctoral Research Scientist > Nevis Labs http://www.nevis.columbia.edu/~denterria > Columbia University, NY mailto:denterria@nevis.columbia.edu > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > PHENIX Group (Bldg 510C) tel: +1 631 344 7053 > Brookhaven National Lab, Upton, NY 11973 fax: +1 631 344 3253 > http://www.phenix.bnl.gov/~enterria mailto:denterri@bnl.gov > --------------------------------------------------------------------- > >
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:08 MET