[ROOT] TFile::Map()

From: Hiroyuki Sako (H.Sako@gsi.de)
Date: Tue Sep 11 2001 - 12:05:35 MEST


Dear ROOT experts,

I have a partially corrupted ROOT file including TNTuple ojects, and
I would like to catch the problem.
In the following macro, f->Map() detects the problem and says
"ERROR". However, there seems no other member in TFile which returns
the error status. On the other hand, when I use TChain, it causes
segmentation fault. Is there any way how to catch this error?

I am using ROOT version 2.25.

 Best regards,
  Hiroyuki Sako

macro
{
  char filename[400];
 
sprintf(filename,"/shift/na45pc11/data02/cerescdr/prodCal160Gev/sidc-160gev-1383-0064.root");
  cout << "start TFile"<<endl;
  TFile *f=new TFile(filename);
  f->Map();
  delete f;

  cout << "create TChain"<<endl;
  TChain testan1c("an1");
  cout << "TChain::Add"<<endl;
  testan1c.Add(filename);
}


output of the macro (partial)
start TFile
20010908/201001  At:64        N=128       TFile
20010908/201140  At:192       N=142       TBasket        CX = 225.35
20010908/201140  At:334       N=4104      TBasket        CX =  7.80
....

20010909/001550  At:17055085  N=29113     TBasket        CX =  1.10
20010909/001550  At:17084198  N=7863      TBasket        CX =  4.07
20010909/001550  At:17092061  N=2759      TBasket        CX = 11.60
20010909/001550  At:17094820  N=350       TBasket        CX = 91.42
20010909/001550  At:17095170  N=1813      TBasket        CX = 17.65
20010909/001551  At:17096983  N=151       TBasket        CX = 211.89
20010909/001551  At:17097134  N=7145      TBasket        CX =  4.48
20010909/001551  At:17104279  N=28727     TBasket        CX =  1.11
20010909/001551  At:17133006  N=27563     TBasket        CX =  1.16
20010909/001551  At:17160569  N=2745      TBasket        CX = 11.66
20010909/001551  At:17163314  N=2657      TBasket        CX = 12.04
20010909/002007  At:17165971  N=151       TBasket        CX = 211.89
20010909/002007  At:17166122  N=7649      TBasket        CX =  4.18
20010909/002007  At:17173771  N=28716     TBasket        CX =  1.11
Address = 17202487      Nbytes = 0      =====E R R O R=======
create TChain
TChain::Add
 
 *** Break *** segmentation violation
Root>



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