#ifndef ROOT_TDCacheFile
#define ROOT_TDCacheFile
#ifndef ROOT_TFile
#include "TFile.h"
#endif
#ifndef ROOT_TSystem
#include "TSystem.h"
#endif
#ifndef ROOT_TString
#include "TString.h"
#endif
#include <sys/stat.h>
class TDCacheFile : public TFile {
private:
Bool_t fStatCached;
struct stat64 fStatBuffer;
TDCacheFile() : fStatCached(kFALSE) { }
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);
Long64_t SysSeek(Int_t fd, Long64_t offset, Int_t whence);
Int_t SysStat(Int_t fd, Long_t *id, Long64_t *size, Long_t *flags, Long_t *modtime);
Int_t SysSync(Int_t fd);
public:
TDCacheFile(const char *path, Option_t *option="",
const char *ftitle="", Int_t compress=1);
~TDCacheFile();
Bool_t ReadBuffer(char *buf, Int_t len);
Bool_t WriteBuffer(const char *buf, Int_t len);
void ResetErrno() const;
static Bool_t Stage(const char *path, UInt_t secs,
const char *location = 0);
static Bool_t CheckFile(const char *path, const char *location = 0);
enum OnErrorAction {
kOnErrorRetry = 1,
kOnErrorFail = 0,
kOnErrorDefault = -1
};
static void SetOpenTimeout(UInt_t secs);
static void SetOnError(OnErrorAction = kOnErrorDefault);
static void SetReplyHostName(const char *host_name);
static const char *GetDcapVersion();
static TString GetDcapPath(const char *path);
ClassDef(TDCacheFile,1)
};
class TDCacheSystem : public TSystem {
private:
void *fDirp;
void *GetDirPtr() const { return fDirp; }
public:
TDCacheSystem();
virtual ~TDCacheSystem() { }
Int_t MakeDirectory(const char *name);
void *OpenDirectory(const char *name);
void FreeDirectory(void *dirp);
const char *GetDirEntry(void *dirp);
Int_t GetPathInfo(const char *path, FileStat_t &buf);
Bool_t AccessPathName(const char *path, EAccessMode mode);
ClassDef(TDCacheSystem,0)
};
#endif
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.