Hi Ed, The problem appears only on Windows because of their choice for the result of operator> and operator< when applied to numerical NaN. Your file indeed has some Nan: root [7] nt->Scan("yd","yd<-30") ************************ * Row * yd * ************************ * 28482 * -1.#IND * * 28490 * -1.#IND * * 28520 * -1.#IND * * 28534 * -1.#IND * * 28540 * -1.#IND * * 28541 * -1.#IND * * 28589 * -1.#IND * * 28622 * -1.#IND * * 28631 * -1.#IND * * 28640 * -1.#IND * * 28681 * -1.#IND * * 28700 * -1.#IND * * 28730 * -1.#IND * * 28733 * -1.#IND * ************************ Somehow this is not a problem on Linux where comparaison to Nan are always false. While it is a problem on Windows where the comparaison are sometimes true, sometimes false. Hence on Linux the Nan always appear as underflow or overflow, while on Windows they are being used to try to determine the range of the histogram. Cheers, Philippe. -----Original Message----- From: owner-roottalk@pcroot.cern.ch [mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Ed Oltman Sent: Thursday, September 05, 2002 1:58 PM To: Roottalk@Pcroot. Cern. Ch Subject: [ROOT] Strange ntupe behavior. Hello, I have a root file with a single ntuple created with: TFile *f = new TFile("test.root","RECREATE"); TNtuple *nt = new TNtuple("nt","ff","x:y:z:xd:yd:zd:s"); . . for(int i=0;i<totInShell;i++) { . . nt->Fill((x,y,z,xd,yd,zd,s); } f->Write(); f->Close(); I would be happy to send the root file - its 339 kBytes. The file is generated with a standalone application (Win2K + VC6.0) I then open the ntuple in a normal root session: TFile *f = new TFile("test.root") At the bottom of this not is result of nt->Print() Here's the problem: I can display any single branch with nt->Draw() EXCEPT xd and yd. IF I try these, root consumes all my cpu until I type ctrl-C. However, I can do nt->Draw("xd:x") or nt->Draw("yd:xd") etc... The only failures I have are nt->Draw("xd") and nt->Draw("yd"). Same failure occurs if I use a TBrowser object to inspect the ntuple. Note: I can create a 1D histogram and project xd onto it TH1F *pxd = new TH1F("pxd","xd",100,-25.,25.) nt->Project("pxd","xd"); pxd->Draw() and it works fine. I have the problem in both 3.02/7 and 3.03/8. (stand-alone application linked with same version as root.exe) Any ideas what might be wrong? Thanks, Ed Oltman here is nt->Print() **************************************************************************** ** *Tree :nt : ff * *Entries : 30664 : Total = 748011 bytes File Size = 331425 * * : : Tree compression factor = 2.63 * **************************************************************************** ** *Br 0 :x : * *Entries : 30664 : Total Size= 95994 bytes File Size = 40248 * *Baskets : 3 : Basket Size= 32000 bytes Compression= 2.39 * *........................................................................... .* *Br 1 :y : * *Entries : 30664 : Total Size= 95994 bytes File Size = 41533 * *Baskets : 3 : Basket Size= 32000 bytes Compression= 2.31 * *........................................................................... .* *Br 2 :z : * *Entries : 30664 : Total Size= 95994 bytes File Size = 31161 * *Baskets : 3 : Basket Size= 32000 bytes Compression= 3.08 * *........................................................................... .* *Br 3 :xd : * *Entries : 30664 : Total Size= 95997 bytes File Size = 55843 * *Baskets : 3 : Basket Size= 32000 bytes Compression= 1.72 * *........................................................................... .* *Br 4 :yd : * *Entries : 30664 : Total Size= 95997 bytes File Size = 55933 * *Baskets : 3 : Basket Size= 32000 bytes Compression= 1.72 * *........................................................................... .* *Br 5 :zd : * *Entries : 30664 : Total Size= 95997 bytes File Size = 30069 * *Baskets : 3 : Basket Size= 32000 bytes Compression= 3.19 * *........................................................................... .* *Br 6 :s : * *Entries : 30664 : Total Size= 95994 bytes File Size = 594 * *Baskets : 3 : Basket Size= 32000 bytes Compression= 161.61 *
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:07 MET