RE: TFile::Close() in CVS head June 28

From: Lee, Kerry T. \(JSC-SF\)[LMIT] <kerry.t.lee_at_nasa.gov>
Date: Thu, 29 Jun 2006 08:43:10 -0500

Dear Rooters,

I have several macros that are broken as of yesterday (6/28) morning after updating with the CVS head. Here is an example with the resulting stack dump.

Thanks
Kerry

PS. I'm using linux CentOS with gcc 3.4.4

//
//CreateSimpleTree.C
//
//This macro creates a TFile (random.root) which holds the TTree variable T
//which has the name Random. The tree has 5 branches with are filled with
//different distributions created by a random number generator.
{
  TFile *f = new TFile("random.root","RECREATE");   float g,u,l,p,e;
  TTree *T = new TTree("Random","Random Number Generated Branches");   TRandom2 *ran = new TRandom2();

  T->Branch("Gaussian",&g,"g/F");
  T->Branch("Uniform",&u,"u/F");
  T->Branch("Landau",&l,"l/F");
  T->Branch("Poisson",&p,"p/F");
  T->Branch("Exp",&e,"e/F");

  for(int i=0;i<1000000;i++) {

    g=ran->Gaus();
    u=ran->Uniform();
    l=ran->Landau(1,0.001);
    p=ran->Poisson(5);
    e=ran->Exp(0.1);

    T->Fill();
  }
  f->Write();
  f->Close();
}
[kerrylee_at_jsc-sf-2148872 ROOTClass]$
[kerrylee_at_jsc-sf-2148872 ROOTClass]$
[kerrylee_at_jsc-sf-2148872 ROOTClass]$
[kerrylee_at_jsc-sf-2148872 ROOTClass]$ root
  *******************************************
  *                                         *
  *        W E L C O M E  to  R O O T       *
  *                                         *
  *   Version   5.11/07       1 June 2006   *
  *                                         *
  *  You are welcome to visit our Web site  *
  *          http://root.cern.ch            *
  *                                         *
  *******************************************

FreeType Engine v2.1.9 used to render TrueType fonts. Compiled on 27 June 2006 for linux with thread support.

CINT/ROOT C/C++ Interpreter version 5.16.13, June 8, 2006 Type ? for help. Commands must be C++ statements. Enclose multiple statements between { }. root [0] .x CreateSimpleTree.C

Received on Thu Jun 29 2006 - 15:44:24 MEST

This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:31:59 MET