TMapFile reuse

Judith Katzy (katzy@nanalpc.phy.uic.edu)
Thu, 22 Apr 1999 14:02:55 -0500 (CDT)


hi rooters,

I tried to reuse the following macro twice witin an interactive
ROOT session. It works fine, when I run it ones, but it gives a seg.fault
at the mfile->Update(eh1), when I execute it for the second time.

{
TMapFile *mfile = TMapFile::Create("histo.map","RECREATE", 500000,
"Memory mapped file with histogram");
TH1F *eh1 = new TH1F("eh1","nevent",100,0.,99.);
mfile->Add(eh1,"eh1");
mfile->Update(eh1);
mfile->ls();
delete eh1;
mfile->Close();
}

Does somebody has an idea, what goes wrong?

cheers,
Judith