[ROOT] TDirectory question (again)

From: Yiqun Wang (yqwang@rcf.rhic.bnl.gov)
Date: Sun Dec 22 2002 - 04:17:12 MET


Dear rooters:

Following Rene's advice, I downloaded the binary root 3.04.02 (Intel x86
Linux for Redhat 7.3 and gcc 3.2), and installed on my Mandrake 9.0
machine (also gcc 3.2) (I haven't had the chance to try the binary version
on other RedHat 7.1 machines with gcc 2.96 yet. I will do that tomorrow).
When I ran the following macro under root:


void dirCd(void){

	TBrowser *b = new TBrowser();

	TH1F *h0 = new TH1F("h0", "h0", 100, -10, 10);
	h0->FillRandom("gaus",1000);

	TFile *f1 = new TFile("xxx.root");

	TFile *f2;

	f2 = new TFile("cdDir.root", "Recreate");

	TDirectory *d1 = f2->mkdir("d1");
	TDirectory *d2 = f2->mkdir("d2");

	d1->cd();

	TH1F *h1 = new TH1F("h1", "h1", 100, -10, 10);

	d2->cd();

	TH1F *h2 = new TH1F("h2", "h2", 100, -10, 10);

	h1->FillRandom("gaus",1000);
	h2->FillRandom("gaus",1000);


	f2->Write();
	f2->Close();

	f1->Close();

	f2 = new TFile("cdDir.root");

}

it ran without error. However, if I tried to open the root file
"cdDir.root" and clicked on one of the directory ("d1" or "d2"), I got
this message:

root [1]
 *** Break *** segmentation violation
 Generating stack trace...
/usr//bin/c++filt: unknown demangling style `gnu-new-abi'
Root >

The problem was not fatal, as I could continue to browser the content of
the directories, draw histograms, etc.

When I tried to do the same thing in a compiled program, everything was fine.

To recap, the behavior is the same as when I used the self-compiled
version 3.04.02 (on both RedHat 7.1 with gcc 2.96 and Mandrake 9.0 with
gcc 3.2).

Merry Christmas and Happy New Year!

Yiqun Wang



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