[ROOT] write doesn't write

From: Michael Gold (gold@higgs.phys.unm.edu)
Date: Thu Jun 06 2002 - 22:22:55 MEST


Dear Rooters:

when I execute this, the histograms are there in
the local memory, but the f->ls() shows the file
is empty.  

what is wrong here?

thanks, Michael

void save() 
{
  TFile *f = new TFile("Hmu.root","recreate");
  //gDirectory->pwd();
  gDirectory->cd("Rint:/");
  gDirectory->ls("-m");
  //  gDirectory->GetList()->ls();
  f->Write();
  f->ls();
  // automatic upon deletion  f->Close();
  delete f;
}



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