Re: [ROOT] help

From: Rene Brun (Rene.Brun@cern.ch)
Date: Sat Mar 15 2003 - 11:27:31 MET


Hi,

You can do this by deriving a new class (say TMemoryFile) from TFile
and implement the following functions:

   // Interface to basic system I/O routines
  Int_t  SysOpen(const char *pathname, Int_t flags, UInt_t mode);
  Int_t  SysClose(Int_t fd);
  Int_t  SysRead(Int_t fd, void *buf, Int_t len);
  Int_t  SysWrite(Int_t fd, const void *buf, Int_t len);
  Seek_t SysSeek(Int_t fd, Seek_t offset, Int_t whence);
  Int_t  SysStat(Int_t fd, Long_t *id, Long_t *size, Long_t *flags, Long_t *modtime);
  Int_t  SysSync(Int_t fd);

If you implement this class, let me know. This could be useful for other
applications as well.

Rene Brun

On 
Fri, 14 Mar 2003, Xiaochun He wrote:

> Dear experts,
> 
> Any suggestions for solving a problem described below?
> 
> We have created a root file which contains a couple ntuples and is then saved to a local disk.  This root file is then read in via fread and saved into a database as a string of characters. In another application, we could retrieve this file from the same database and used fwrite to save it to disk.  This procedure works fine without any problems at all.  However, for our other applications, we want to retrieve this file from the database and then access it directly without ever writing it to a local disk.  Since what we get back from the database is a string of characters,  how could we extract out those ntuples from it or map it to a memory resident TFile?
> 
> Thanks,
> Xiaochun He
>       
> 



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:10 MET