[ROOT]

From: Manoj Jha (Manoj.Jha@cern.ch)
Date: Tue Aug 10 2004 - 13:08:18 MEST


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
_file/60_GeV/";
  chain->Add(mystring_os+namefile_os+numfile_os+endfile_os);
}
-----------------------------------------------------------------------

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