Hi Matthieu, I looked in your file and I see that the pad scales are wrong due to the fit function to your histogram. You use a function fxFit with a gaussian and a polynomial. The standard deviation for the gaussian is null. In this case a NAN value is found in the function values and this corrupts the pad scale. I have introduced two protections in the development version 3.02: - protection against a null value in the computation of the gaussian. - protection against non physical values when computing the size of the pixmap for each pad in TPad::ResizePixmap. With these protections, I can read your canvas.root file. Rene Brun Matthieu Guillo wrote: > > Hello ROOTERS > > I am working on a Linux box, RedHat 6.1, kernel 2.4 (recompiled), ROOT > version 3.01/05. > > I have a TCanvas ojbect I want to save into a ROOT file. I first create > it, divide it in many sub pads and draw on every subpad an histogram > obtained applying a TEventList AND a cut on a tree doing something like: > > c1->cd(2); // go to second pad > tree->SetEventList(0); // reset list (not sure I need to do that) > tree->SetEventList(mylistselection); // use only selected events > tree->Draw("var >> myhisto", cut); // use subset of selected events > > The problem is that sometimes when applying the cut there is no entries. > The histogram is therefore empty and I noticed that the pad where it was > supposed to be drawn is destroyed! Later I save the TCanvas in a ROOT file > and when I try to retrieve it, I receive the following message: > > Error in <RootX11ErrorHandler>: BadValue (integer parameter out of range > for operation) (XID: 0) > > Then everything freeze, ROOT, my canvas, and the only way to recover is to > destroy the shell where I started ROOT! > My guess is that occurs because the subpad was destroyed? What can I do to > prevent that? Shoudn't I have an empty histogram drawn into the pad > instead of having the pad destroyed. May be I cannot use both a TEventList > and a cut? > > Thanks for any suggestion > > Matthieu Guillo > University of South Carolina > Thomas Jefferson National Laboratory > Office 71 trailer 16 > Phone: 757-269-5551
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:58 MET