From: Manoj Jha (
Date: Wed Aug 11 2004 - 06:57:29 MEST

Hi Rene & Philippe,

  Thanks for help. There was problem in array dimensions. Thanks again. Have a good day.

Thanks and with regards,

-----Original Message-----
From:	Philippe Canal []
Sent:	Tue 8/10/2004 6:22 PM
To:	Manoj Jha;
Subject:	RE: [ROOT]

You might not have read access to those files.
  Char_t namefile_os[16];
  strcpy (namefile_os, "egamma_60_875Events_");
is incorrect (16 is too small of a number).
Instead you should write something like
  TString prefix = /home/jha/work/shaping/original_geometry/root_file/60_GeV/";
  TString filename = prefix;
  filename += "egamma_60_875Events_";
  filename += ifil_os+1;
  filename += ".root";


-----Original Message-----
[]On Behalf Of Manoj Jha
Sent: Tuesday, August 10, 2004 6:08 AM
Subject: [ROOT]

Dear Rooters,
  I am trying to merge different numbers of root files using the "Tchain->Add" method. I am using the following script

TChain * chain = new TChain("EGAMMA");
for (Int_t ifil_os = 1; ifil_os < 20; ifil_os++) {

  Char_t namefile_os[16];
  strcpy (namefile_os, "egamma_60_875Events_");
  Char_t numfile_os[4];
  sprintf (numfile_os,"%d",ifil_os+1);
  Char_t endfile_os[6];
  strcpy (endfile_os, ".root");
  // strncat (namefile, numfile, endfile);
  TString mystring_os = "/home/jha/work/shaping/original_geometry/root

When I run the script, I faced with the following error

"Error in <TFile::TFile>: file /home/jha/work/shaping/original_geometry/root_file/60_GeV/egamma_60_875Events_2.root does not exist
Error in <TFile::TFile>: file /home/jha/work/shaping/original_geometry/root_file/60_GeV/egamma_60_875Events_2.root does not exist
Error in <TFile::TFile>: file /home/jha/work/shaping/original_geometry/root_file/60_GeV/egamma_60_875Events_2.root does not exist
 and the program is still running with the above message.

However, the above file exists in the mentioned folder. I am able to browse the contents of the above root file using TBrowser. Please let me know where I am committing the mistakes.

Thanks for help.

With regards,
manoj jha

This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:09 MET