Re: [ROOT] file copying

From: David R. Relyea (relyea@SLAC.stanford.edu)
Date: Mon Aug 12 2002 - 21:32:00 MEST


Found my problem - you can't call a TFile whose name is " filename" (space
before the filename.  Which is a stupid bug in my code, but what can you
do...  Sorry about that.

Dave

On Mon, 12 Aug 2002, Rene Brun wrote:

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