[ROOT] TChain Merge

From: Schaefer Martina (schaefer@lpsc.in2p3.fr)
Date: Wed Jun 04 2003 - 17:39:56 MEST


Hi,

i send you my macro and the output. Everything is working fine, the output 
root-file is ok, but there is this 
*** Break *** segmentation violation
 Generating stack trace...
at the end.

What am I doing wrong?


	Thanks a lot,	
			Martina

the macro:
--------------------------------------
void mergephoton(int a, int b){
  gROOT->Reset();
  char s[100];
  TChain tree("CBNT/h3333");
  for (int j=a;j<=b;j++){
    if(j<10)
sprintf(s,"rfio:/castor/cern.ch/user/m/mschafer/photons002028lumi10/dc1.002028.lumi10.recon.008.0000%d.test.photon_20_250.root",j);
    else
sprintf(s,"rfio:/castor/cern.ch/user/m/mschafer/photons002028lumi10/dc1.002028.lumi10.recon.008.000%d.test.photon_20_250.root",j);
    Long_t id,size,flags,mt;
    Int_t i = gSystem->GetPathInfo(s,&id,&size,&flags,&mt);
    cout<<s<<" "<<i<<endl; 
    if (i==0) tree.Add(s);
  sprintf(s,"~/cern/w0/photons002028lumi10/files%d-%d.root",a,b);
  cout <<s<<endl;
  tree->Merge(s);
  cout <<"done"<<endl;

}



--------------
the output:
--------------
root [0] .L merge.C
root [1] mergephoton(16,20)
rfio:/castor/cern.ch/user/m/mschafer/photons002028lumi10/dc1.002028.lumi10.recon.008.00016.test.photon_20_250.root 
0
rfio:/castor/cern.ch/user/m/mschafer/photons002028lumi10/dc1.002028.lumi10.recon.008.00017.test.photon_20_250.root 
0
rfio:/castor/cern.ch/user/m/mschafer/photons002028lumi10/dc1.002028.lumi10.recon.008.00018.test.photon_20_250.root 
0
rfio:/castor/cern.ch/user/m/mschafer/photons002028lumi10/dc1.002028.lumi10.recon.008.00019.test.photon_20_250.root 
0
rfio:/castor/cern.ch/user/m/mschafer/photons002028lumi10/dc1.002028.lumi10.recon.008.00020.test.photon_20_250.root 
0
~/cern/w0/photons002028lumi10/files16-20.root
done

 *** Break *** segmentation violation
 Generating stack trace...



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:12 MET