Re: [ROOT] TMapFile & TTree::Fill

From: Rene Brun (Rene.Brun@cern.ch)
Date: Fri Sep 13 2002 - 14:33:04 MEST


Hi,

This problem has been fixed in the development version in CVS.
It happens when a Tree is created and when no TFile object exists.
If you create a dummy TFile before creating your TMapFile, your macro will
probably work.

Rene Brun

On Fri, 13 Sep 2002, PISA COSY wrote:

> 
> Hello
> 
> What is the diffrence beetwen version 3.02/7 and 3.03/8 that the belowe
> procedure gives:
> 
> *** Break *** segmentation violation
> 
> in version 3.03/08 ?
> 
> root [0] mfile = TMapFile::Create("pisa.map","RECREATE", 50000, "Memor");
> root [1] pisaTree = new TTree("pisaTree","data");
> root [2] Float_t tCpSa01;
> root [3] Float_t tCpSa02;
> root [4] pisaTree->Branch("tCpSa01",&tCpSa01,"tCpSa01");
> root [5] pisaTree->Branch("tCpSa02",&tCpSa02,"tCpSa02");
> root [6] mfile->Add(pisaTree);
> root [7] tCpSa01 = 23;
> root [8] tCpSa02 = 25;
> root [9] pisaTree->Fill()
> 
> 
> Arek
> 



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