TFile "filetype=raw" garbage

From: Ricardo Salgueiro Domingues Silva <ricardo.silva_at_cern.ch>
Date: Thu, 05 Jul 2007 16:39:39 +0200

   Hello all,

   I'm using TFile to open a text file just because of the possibility to open remote files exactly the same way as local ones (from AliEn in this case) and sometimes I get some garbage in the end of the file/buffer. I created a short script (attached) which with an test file (also attached) sometimes yields results like this:

"This is a test file!

With several lines!

No newline at end of file though!� <-- note the garbage at the end

   or this

"This is a test file!

With several lines!

No newline at end of file though!x�X" <-- note the garbage at the end

   or this

"This is a test file!

With several lines!

No newline at end of file though!)" <-- note the garbage at the end

   The "ideal" output would be:

"This is a test file!

With several lines!

No newline at end of file though!" <-- note no garbage at the end

   Is this a bug or am I doing something wrong? (Or assuming something which isn't true for raw file reads?) I am using ROOT Version 5.15/08 compiled with gcc 3.4.6 on SLC4. Thanks for any help.

   Best regards,
     Ricardo Silva

This is a test file!

With several lines!

No newline at end of file though!

Received on Thu Jul 05 2007 - 16:42:38 CEST

This archive was generated by hypermail 2.2.0 : Fri Jul 06 2007 - 17:50:02 CEST