Re: retrieving current position in (any) TFile ?

From: Sebastien Binet <binet_at_cern.ch>
Date: Fri, 13 Nov 2009 16:15:34 +0100


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.
>

-- 
#########################################
# Dr. Sebastien Binet
# Laboratoire de l'Accelerateur Lineaire
# Universite Paris-Sud XI
# Batiment 200
# 91898 Orsay
#########################################
Received on Fri Nov 13 2009 - 16:19:49 CET

This archive was generated by hypermail 2.2.0 : Sun Nov 15 2009 - 05:50:03 CET