Re: [ROOT] piping input to root?

From: Rene Brun (Rene.Brun@cern.ch)
Date: Fri Aug 09 2002 - 22:50:48 MEST


I thought that Fons had already answered your mail to about_root.
Here is the original Fons's answer.

Rene Brun


Currently getline always reads per character, which is of course much
slower then per line. We could optimize this to call gets() instead of
getchar() in the internals of getline as soon as we read from a non-tty
(which we know).

To be done.

-- Fons



On Fri, 9 Aug 2002, Rob Snihur wrote:

> Hi,
> Both of the following two commands work:
> 
> root -l -b -q foo.C
> cat foo.C | root -l -b
> 
> However, the latter is much slower (a factor >25) than the former!
> If the file foo.C is generated by an external program (e.g., a Monte
> Carlo),
> then the latter case is attractive because the intermediate file foo.C
> need not be written to disk.
> 
> Is there any way to speed up how root reads input from a pipe?
> Is it an issue of an internal buffer size in unix?
> I see similar behaviour on both linux and SGI IRIX.
> I am using root 3.02/06.
> 
> thanks,
> -rob
> 



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