library: libDCache #include "TDCacheFile.h" |
TDCacheFile
class description - header file - source file - inheritance tree (.pdf)
private:
TDCacheFile()
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 fd)
virtual Int_t SysWrite(Int_t fd, const void* buf, Int_t len)
public:
TDCacheFile(const char* path, Option_t* option = "", const char* ftitle = "", Int_t compress = 1)
~TDCacheFile()
static Bool_t CheckFile(const char* path, const char* location = "0")
static TClass* Class()
static TString GetDcapPath(const char* path)
static const char* GetDcapVersion()
virtual TClass* IsA() const
virtual Bool_t ReadBuffer(char* buf, Int_t len)
virtual void ResetErrno() const
static void SetOnError(TDCacheFile::OnErrorAction = kOnErrorDefault)
static void SetOpenTimeout(UInt_t secs)
static void SetReplyHostName(const char* host_name)
virtual void ShowMembers(TMemberInspector& insp, char* parent)
static Bool_t Stage(const char* path, UInt_t secs, const char* location = "0")
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?
TDCacheFile::stat64 fStatBuffer ! (transient) Cached file status buffer (for performance)
public:
static const TDCacheFile::OnErrorAction kOnErrorRetry
static const TDCacheFile::OnErrorAction kOnErrorFail
static const TDCacheFile::OnErrorAction kOnErrorDefault
TDCacheFile
A TDCacheFile is like a normal TFile except that it may read and
write its data via a dCache server (for more on the dCache daemon
see http://www-dcache.desy.de/. Given a path which doesn't belong
to the dCache managed filesystem, it falls back to the ordinary
TFile behaviour.
TDCacheFile(const char *path, Option_t *option, const char *ftitle, Int_t compress)
Create a dCache file object. A dCache file is the same as a TFile
except that it is being accessed via a dCache server. The url
argument must be of the form: dcache:/pnfs/<path>/<file>.root or
dcap://<nodename.org>/<path>/<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 TDCacheFile 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().
void SetOnError(OnErrorAction a)
Set on error handler.
Int_t SysOpen(const char *pathname, Int_t flags, UInt_t mode)
Interface to system open. All arguments like in POSIX open.
Int_t SysSync(Int_t fd)
Interface to system sync. All arguments like in POSIX fsync.
dCache always keep it's files sync'ed, so there's no need to
sync() them manually.
Int_t SysStat(Int_t, Long_t *id, Long64_t *size, Long_t *flags, Long_t *modtime)
Get info about a file: id, size, flags, modification time.
Id is (statbuf.st_dev << 24) + statbuf.st_ino
Size is the file size
Flags is file type: 0 is regular file, bit 0 set executable,
bit 1 set directory, bit 2 set special file
(socket, fifo, pipe, etc.)
Modtime is modification time.
The function returns 0 in case of success and 1 if the file could
not be stat'ed.
void ResetErrno()
Method resetting the dc_errno and errno.
TString GetDcapPath(const char *path)
Transform the input path into a path usuable by the dcap C library,
i.e either dcap://nodename.org/where/filename.root or
/pnfs/where/filename.root
Author: Grzegorz Mazur 20/01/2002
Last update: root/dcache:$Name: $:$Id: TDCacheFile.cxx,v 1.30 2006/06/27 14:36:27 brun Exp $
Copyright (C) 1995-2000, 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.