Re: TMapfile::Update causes segmentation violation

Fons Rademakers (Fons.Rademakers@cern.ch)
Thu, 22 Jul 1999 11:49:24 +0000


Hi Burt,

I've fixed the problem.

For the time being don't close the TMapFile in the macro.

Cheers, Fons.

Burt Holzman wrote:
>
> Hi Rooters,
>
> The following simple macro causes a segmentation violation if I
> uncomment
> the mfile->Update line. This is ROOT 2.22/09, CINT 5.14.8.
>
> -B
>
> --
> {
> TH1S *monhisto = new TH1S("eventnr","event_nr",101,-0.5,100.5);
> TH1S *monhisto2 = new TH1S("eventnr2","event_nr2",101,-0.5,100.5);
>
> mfile = TMapFile::Create("onhistos.map","RECREATE",
> 10000000,"blabla");
> mfile->Add(monhisto,"eventnr");
>
> for (Int_t i = 0; i < 52; i++) { monhisto->Fill(i); }
> monhisto2->Add(monhisto,monhisto2);
> //mfile->Update(monhisto);
>
> mfile->Close();
> monhisto2->Draw();
> }

-- 
Org:    CERN, European Laboratory for Particle Physics.
Mail:   1211 Geneve 23, Switzerland
E-Mail: Fons.Rademakers@cern.ch              Phone: +41 22 7679248
WWW:    http://root.cern.ch/~rdm/            Fax:   +41 22 7677910