Re: retrieving current position in (any) TFile ?

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


It is a public method in version 5.25/03

Rene Brun

Sebastien Binet wrote:
> On Friday 13 November 2009 16:09:09 Rene Brun wrote:
>
>> Use TFile::GetRelOffset
>> This supports all TFile cases, + the case of ROOT files in archive zip
>> files.
>>
> hum... it seems TFile::GetRelOffset would fit the bill, but it is protected...
> :}
>
> cheers,
> sebastien.
>
>
>> 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:23:02 CET

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