Re: retrieving current position in (any) TFile ?

From: Rene Brun <Rene.Brun_at_cern.ch>
Date: Fri, 13 Nov 2009 16:09:09 +0100


Use TFile::GetRelOffset
This supports all TFile cases, + the case of ROOT files in archive zip files.

Rene Brun

Sebastien Binet wrote:
> hi there,
>
> to limit nasty surprises users could get (and "effective" side-effects) when
> using some function of mine looking like so:
>
> void do_stuff(TFile* f) {/*play with TFile::Seek*/}
>
> I'd like to be able to save the current position in the TFile before doing
> some work and then restore it before exiting that function.
>
> I found TFile::Seek being the equivalent of the good ol' POSIX fseek(3), but
> what is the equivalent of ftell(3) ?
>
> cheers,
> sebastien.
>
Received on Fri Nov 13 2009 - 16:09:14 CET

This archive was generated by hypermail 2.2.0 : Fri Nov 13 2009 - 17:50:03 CET