Hi Glen Problem now fixed in CVS Rene Brun On Fri, 8 Feb 2002, Glen R. Salo wrote: > Hi, > > Changes in the way TTree works has broken some of my code. The changes > are given below. Are these intended changes? I am using the very latest > CVS updates on a RedHat 7.2 linux machine with a completely fresh > recompile. > > 1. TTree::SetDirectory(0) does not seem to remove the tree from the > current directory. Using the following script (and tree1.root from > the tutorials directory), I get: > { > TFile f("tree1.root"); > TTree *t1 = (TTree *)f.Get("t1"); > t1->SetDirectory(0); > gDirectory->ls(); > f.Close(); > t1->Scan(); > delete t1; > } > > TFile** tree1.root > TFile* tree1.root > OBJ: TTree t1 a simple Tree with simple variables : 0 > KEY: TTree t1;1 a simple Tree with simple variables > > *** Break *** segmentation violation > > This did not use to happen in an earlier version (3.01/07) of ROOT. > > 2. When naming a TTree, it seems that the first argument cannot contain a > space as illustrated with the following script. Is this > the intended behavior? > > { > TFile f("junk.root","recreate"); > TTree *t = new TTree("tree data","T"); > Float_t x; > t->Branch("x",&x,"x/F"); > x=2; > t->Fill(); > t->Write(); > f.ls(); > f.Close(); > } > > Produces: > > TFile** junk.root > TFile* junk.root > > > Thanks for your help. > > > Glen >
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:41 MET