Re: [ROOT] file copying

From: Rene Brun (Rene.Brun@cern.ch)
Date: Mon Aug 12 2002 - 20:58:19 MEST


David,

gSystem->Exec cannot return before the action is terminated.
Are you sure that you do not hit a disk quota problem?

Rene Brun

On Mon, 12 Aug 2002, David R. Relyea wrote:

> I have a simple question, but I can't find reference of it anywhere.  I
> want to copy a file from one spot to another, and then access the new
> file.  My problem is that if I do
> 
> (this is all compiled code, btw)
>   gSystem->Exec("cp file1 file2");
>   TFile *f1 = new TFile("file2","READ");
> 
> , ROOT attempts to open the file before it's fully copied (the files are
> 100 Mb and contain ~100 branches, so they take a while to copy).  I could
> create another TFile and use ROOT to copy the file over that way, but that
> seems like it would be much slower than the straight system call to "cp".
> So how do I wait for the file to fully copy before I read it?  Or should I
> use TFile::Copy?
> 
> David Relyea
> 



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:04 MET