14 #ifndef ROOT_TDCacheFile
15 #define ROOT_TDCacheFile
29 #define RAHEAD_BUFFER_SIZE 131072
50 const char *ftitle=
"",
Int_t compress=1);
63 const char *location = 0);
A TDCacheFile is like a normal TFile except that it may read and write its data via a dCache server (...
void FreeDirectory(void *dirp)
Close a directory.
Long64_t SysSeek(Int_t fd, Long64_t offset, Int_t whence)
Interface to system seek. All arguments like in POSIX lseek.
Int_t SysStat(Int_t fd, Long_t *id, Long64_t *size, Long_t *flags, Long_t *modtime)
Get info about a file: id, size, flags, modification time.
Int_t SysSync(Int_t fd)
Interface to system sync.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
Bool_t fStatCached
! (transient) is file status cached?
static void SetOnError(EOnErrorAction=kOnErrorDefault)
Set on error handler.
Int_t SysWrite(Int_t fd, const void *buf, Int_t len)
Interface to system write. All arguments like in POSIX write.
static void SetOpenTimeout(UInt_t secs)
Set file open timeout.
Bool_t WriteBuffer(const char *buf, Int_t len)
Write specified byte range to remote file via dCache daemon.
#define ClassDef(name, id)
static const char * GetDcapVersion()
Return dCache version string.
void * OpenDirectory(const char *name)
Open a directory.
void ResetErrno() const
Method resetting the dc_errno and errno.
void * fDirp
directory handler
static Bool_t CheckFile(const char *path, const char *location=0)
CheckFile() returns kTRUE on success and kFALSE on failure.
Int_t SysRead(Int_t fd, void *buf, Int_t len)
Interface to system read. All arguments like in POSIX read.
static 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.
static void SetReplyHostName(const char *host_name)
Set reply host name.
const char * GetDirEntry(void *dirp)
Get a directory entry.
Bool_t ReadBuffers(char *buf, Long64_t *pos, Int_t *len, Int_t nbuf)
Read the nbuf blocks described in arrays pos and len, where pos[i] is the seek position of block i of...
Int_t SysOpen(const char *pathname, Int_t flags, UInt_t mode)
Interface to system open. All arguments like in POSIX open.
Int_t MakeDirectory(const char *name)
Create a directory.
Bool_t AccessPathName(const char *path, EAccessMode mode)
Returns FALSE if one can access a file using the specified access mode.
struct stat64 fStatBuffer
! (transient) Cached file status buffer (for performance)
Bool_t ReadBuffer(char *buf, Int_t len)
Read specified byte range from remote file via dCache daemon.
Int_t SysClose(Int_t fd)
Interface to system close. All arguments like in POSIX close.
EOnErrorAction
Note: This must be kept in sync with values #defined in dcap.h.
Int_t GetPathInfo(const char *path, FileStat_t &buf)
Get info about a file.
TDCacheSystem()
Create helper class that allows directory access via dCache.
Abstract base class defining a generic interface to the underlying Operating System.
~TDCacheFile()
Close and cleanup dCache file.
static Bool_t Stage(const char *path, UInt_t secs, const char *location=0)
Stage() returns kTRUE on success and kFALSE on failure.