TDCacheFile Class Reference

#include <TDCacheFile.h>

Inheritance diagram for TDCacheFile:

TFile TDirectoryFile TDirectoryFile TDirectory TDirectory TDirectory TDirectory TNamed TNamed TNamed TNamed TNamed TNamed TNamed TNamed List of all members.

Public Types

enum  OnErrorAction

Public Member Functions

 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 ReadBuffer (char *buf, Long64_t pos, Int_t len)
Bool_t WriteBuffer (const char *buf, Int_t len)
Bool_t ReadBuffers (char *buf, Long64_t *pos, Int_t *len, Int_t nbuf)
void ResetErrno () const

Static Public Member Functions

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)
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)

Private Member Functions

 TDCacheFile ()
 (transient) Cached file status buffer (for performance)
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)

Private Attributes

Bool_t fStatCached
stat64 fStatBuffer
 (transient) is file status cached?

Detailed Description

Definition at line 42 of file TDCacheFile.h.


Member Enumeration Documentation

enum TDCacheFile::OnErrorAction

Definition at line 78 of file TDCacheFile.h.


Constructor & Destructor Documentation

TDCacheFile::TDCacheFile (  )  [inline, private]

(transient) Cached file status buffer (for performance)

Definition at line 48 of file TDCacheFile.h.

TDCacheFile::TDCacheFile ( const char *  path,
Option_t option = "",
const char *  ftitle = "",
Int_t  compress = 1 
)

TDCacheFile::~TDCacheFile (  ) 

Definition at line 200 of file TDCacheFile.cxx.

References TFile::Close().


Member Function Documentation

Int_t TDCacheFile::SysOpen ( const char *  pathname,
Int_t  flags,
UInt_t  mode 
) [private, virtual]

Reimplemented from TFile.

Definition at line 410 of file TDCacheFile.cxx.

References gSystem, and TSystem::SetErrorStr().

Int_t TDCacheFile::SysClose ( Int_t  fd  )  [private, virtual]

Reimplemented from TFile.

Definition at line 434 of file TDCacheFile.cxx.

References gSystem, and TSystem::SetErrorStr().

Int_t TDCacheFile::SysRead ( Int_t  fd,
void *  buf,
Int_t  len 
) [private, virtual]

Reimplemented from TFile.

Definition at line 451 of file TDCacheFile.cxx.

References gSystem, and TSystem::SetErrorStr().

Int_t TDCacheFile::SysWrite ( Int_t  fd,
const void *  buf,
Int_t  len 
) [private, virtual]

Reimplemented from TFile.

Definition at line 468 of file TDCacheFile.cxx.

References gSystem, and TSystem::SetErrorStr().

Long64_t TDCacheFile::SysSeek ( Int_t  fd,
Long64_t  offset,
Int_t  whence 
) [private, virtual]

Reimplemented from TFile.

Definition at line 485 of file TDCacheFile.cxx.

References gSystem, Long64_t, and TSystem::SetErrorStr().

Int_t TDCacheFile::SysStat ( Int_t  fd,
Long_t id,
Long64_t size,
Long_t flags,
Long_t modtime 
) [private, virtual]

Reimplemented from TFile.

Definition at line 521 of file TDCacheFile.cxx.

References TString::Data(), TFile::fOption, fStatBuffer, fStatCached, GetDcapPath(), TNamed::GetName(), if(), kTRUE, and stat64().

Int_t TDCacheFile::SysSync ( Int_t  fd  )  [private, virtual]

Reimplemented from TFile.

Definition at line 502 of file TDCacheFile.cxx.

References gSystem, and TSystem::SetErrorStr().

Bool_t TDCacheFile::ReadBuffer ( char *  buf,
Int_t  len 
) [virtual]

Reimplemented from TFile.

Definition at line 208 of file TDCacheFile.cxx.

References kFALSE, kTRUE, TFile::ReadBuffer(), and TFile::ReadBufferViaCache().

Referenced by ReadBuffers().

Bool_t TDCacheFile::ReadBuffer ( char *  buf,
Long64_t  pos,
Int_t  len 
) [virtual]

Reimplemented from TFile.

Definition at line 224 of file TDCacheFile.cxx.

References kFALSE, kTRUE, TFile::ReadBuffer(), TFile::ReadBufferViaCache(), and TFile::SetOffset().

Bool_t TDCacheFile::WriteBuffer ( const char *  buf,
Int_t  len 
) [virtual]

Reimplemented from TFile.

Definition at line 320 of file TDCacheFile.cxx.

References TDirectoryFile::fWritable, TFile::IsOpen(), kFALSE, kTRUE, TFile::WriteBuffer(), and TFile::WriteBufferViaCache().

Bool_t TDCacheFile::ReadBuffers ( char *  buf,
Long64_t pos,
Int_t len,
Int_t  nbuf 
) [virtual]

Reimplemented from TFile.

Definition at line 241 of file TDCacheFile.cxx.

References TFile::fArchiveOffset, TFile::fBytesRead, TFile::fCacheRead, TFile::fD, free(), TFile::GetFileBytesRead(), high, i, j, k, kFALSE, kTRUE, Long64_t, low, malloc(), ReadBuffer(), result(), TFile::Seek(), TFile::SetFileBytesRead(), and total.

void TDCacheFile::ResetErrno (  )  const [virtual]

Reimplemented from TFile.

Definition at line 575 of file TDCacheFile.cxx.

References TSystem::ResetErrno().

Bool_t TDCacheFile::Stage ( const char *  path,
UInt_t  secs,
const char *  location = 0 
) [static]

Definition at line 338 of file TDCacheFile.cxx.

References TString::Data(), GetDcapPath(), gSystem, kFALSE, kTRUE, and TSystem::SetErrorStr().

Bool_t TDCacheFile::CheckFile ( const char *  path,
const char *  location = 0 
) [static]

Definition at line 357 of file TDCacheFile.cxx.

References TString::Data(), GetDcapPath(), gSystem, kFALSE, kTRUE, and TSystem::SetErrorStr().

void TDCacheFile::SetOpenTimeout ( UInt_t  secs  )  [static]

Reimplemented from TFile.

Definition at line 378 of file TDCacheFile.cxx.

void TDCacheFile::SetOnError ( OnErrorAction  = kOnErrorDefault  )  [static]

Definition at line 386 of file TDCacheFile.cxx.

void TDCacheFile::SetReplyHostName ( const char *  host_name  )  [static]

Definition at line 394 of file TDCacheFile.cxx.

const char * TDCacheFile::GetDcapVersion (  )  [static]

Definition at line 402 of file TDCacheFile.cxx.

TString TDCacheFile::GetDcapPath ( const char *  path  )  [static]

Definition at line 584 of file TDCacheFile.cxx.

References DCACHE_PREFIX, DCACHE_PREFIX_LEN, TUrl::GetFile(), TUrl::GetHost(), TUrl::GetProtocol(), and TUrl::GetUrl().

Referenced by TDCacheSystem::AccessPathName(), CheckFile(), TDCacheSystem::GetPathInfo(), TDCacheSystem::MakeDirectory(), TDCacheSystem::OpenDirectory(), Stage(), and SysStat().


Member Data Documentation

Bool_t TDCacheFile::fStatCached [private]

Definition at line 45 of file TDCacheFile.h.

Referenced by SysStat().

struct stat64 TDCacheFile::fStatBuffer [private]

(transient) is file status cached?

Definition at line 46 of file TDCacheFile.h.

Referenced by SysStat().


The documentation for this class was generated from the following files:
Generated on Tue Jul 5 16:35:57 2011 for ROOT_528-00b_version by  doxygen 1.5.1