library: libGFAL #include "TGFALFile.h" |
TGFALFile
class description - header file - source file - inheritance tree (.pdf)
private:
TGFALFile()
virtual Int_t SysClose(Int_t fd)
virtual Int_t SysOpen(const char* pathname, Int_t flags, UInt_t mode)
virtual Int_t SysRead(Int_t fd, void* buf, Int_t len)
virtual Long64_t SysSeek(Int_t fd, Long64_t offset, Int_t whence)
virtual Int_t SysStat(Int_t fd, Long_t* id, Long64_t* size, Long_t* flags, Long_t* modtime)
virtual Int_t SysSync(Int_t)
virtual Int_t SysWrite(Int_t fd, const void* buf, Int_t len)
public:
TGFALFile(const char* url, Option_t* option = "", const char* ftitle = "", Int_t compress = 1)
~TGFALFile()
static TClass* Class()
virtual TClass* IsA() const
virtual Bool_t ReadBuffer(char* buf, Int_t len)
virtual void ShowMembers(TMemberInspector& insp, char* parent)
virtual void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
virtual Bool_t WriteBuffer(const char* buf, Int_t len)
private:
Bool_t fStatCached ! (transient) is file status cached?
TGFALFile::stat64 fStatBuffer ! (transient) Cached file status buffer (for performance)
TGFALFile
A TGFALFile is like a normal TFile except that it reads and writes
its data via the underlaying Grid access mechanism.
TGFALFile file names are either a logical file name, a guid, an
SURL or a TURL, like:
gfal:/lfn/user/r/rdm/galice.root
Grid storage interactions today require using several existing
software components:
- The replica catalog services to locate valid replicas of
files.
- The SRM software to ensure:
- files exist on disk (they are recalled from mass
storage if necessary) or
- space is allocated on disk for new files (they are possibly
migrated to mass storage later)
- A file access mechanism to access files from the storage
system on the worker node.
The GFAL library hides these interactions and presents a Posix
interface for the I/O operations. The currently supported protocols
are: file for local access, dcap, gsidcap and kdcap (dCache access
protocol) and rfio (CASTOR access protocol).
File naming convention:
A file name can be a Logical File Name (LFN), a Grid Unique
IDentifier (GUID), a file replica (SURL) or a Transport file
name (TURL):
an LFN starts with lfn:
for example lfn:baud/testgfal15
a GUID starts with guid:
for example guid:2cd59291-7ae7-4778-af6d-b1f423719441
an SURL starts with srm://
for example srm://wacdr002d.cern.ch:8443/castor/
cern.ch/user/b/baud/testgfal15
a TURL starts with a protocol name:
for example rfio:///castor/cern.ch/user/b/baud/testgfal15
Note that for the TGFALFile plugin to work, all these pathnames
should be prepended by gfal:.
TGFALFile(const char *url, Option_t *option, const char *ftitle, Int_t compress)
Create a GFAL file object. A GFAL file is the same as a TFile
except that it is being accessed via the underlaying Grid access
mechanism. The url argument must be of the form: gfal:/lfn/file.root
If the file specified in the URL does not exist, is not accessable
or can not be created the kZombie bit will be set in the TGFALFile
object. Use IsZombie() to see if the file is accessable.
For a description of the option and other arguments see the TFile ctor.
The preferred interface to this constructor is via TFile::Open().
Int_t SysOpen(const char *pathname, Int_t flags, UInt_t mode)
Interface to system open. All arguments like in POSIX open.
Long64_t SysSeek(Int_t fd, Long64_t offset, Int_t whence)
Interface to system lseek. All arguments like in POSIX lseek
except that the offset and return value are Long_t to be able to
handle 64 bit file systems.
Author: Fons Rademakers 8/12/2005
Last update: root/gfal:$Name: $:$Id: TGFALFile.cxx,v 1.6 2006/06/21 13:57:53 rdm Exp $
Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. *
ROOT page - Class index - Class Hierarchy - Top of the page
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.