[ROOT] Pbms with TFile

From: Primrose Mbanefo (didi_mbanefo@laposte.net)
Date: Mon Aug 20 2001 - 12:35:19 MEST


Hello once again,
I'm in alittle bit of a fix. This is a part of the constructor of one of my 
classes:
TRun::TRun(Int_t run_numb = -1,Int_t date = 0, Int_t time = 0):
  ftab_obj(maxobj),
  ftab_histo(maxhisto),
  frun_numb(run_numb)
{
  if (run_numb == -1)
    {
      fsharedmemory=NULL;
      ffile=NULL;
    }
  else
    {
  Char_t name[20];
  sprintf(name,"run%d.map",frun_numb);
  cout<<"creating shared memory"<<endl;
  fsharedmemory = TMapFile::Create(name,"RECREATE",500000,"temp_mem");
  cout<<"shard memory in place"<<endl;
  sprintf(name,"run%d.root",frun_numb);
  cout<<"creating root file"<<endl;
  ffile = new TFile(name,"RECREATE");
  cout<<"root file created"<<endl;
    }
  for (int i=0;i<maxobj;i++)
    {
      ftab_obj[i]=NULL;
    }
    cout<<"all obj are go"<<endl;
  for (int i=0;i<maxhisto;i++)
    {
      ftab_histo[i]=NULL;
    }
    cout<<"all histos are go"<<endl;
  
}

The problem is I have a program which uses this constructor. In fact , it 
always creates the same object but on the 3rd try the constructor cannot 
create the file ffile which is a TFile *. I can't figure out why. It just 
gets stuck there and I have to reboot the computer does anyone have any ideas 
why?
Thanks a lot,
Primrose. 



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:58 MET