TNetFile Class Reference

#include <TNetFile.h>

Inheritance diagram for TNetFile:

TFile TFile TDirectoryFile TDirectoryFile TDirectoryFile TDirectoryFile TDirectory TDirectory TDirectory TDirectory TDirectory TDirectory TDirectory TDirectory TCastorFile TXNetFile TAlienFile List of all members.

Public Member Functions

 TNetFile (const char *url, Option_t *option="", const char *ftitle="", Int_t compress=1, Int_t netopt=0)
 TNetFile ()
virtual ~TNetFile ()
void Close (Option_t *option="")
void Flush ()
Int_t GetErrorCode () const
Bool_t IsOpen () const
Bool_t Matches (const char *url)
Int_t ReOpen (Option_t *mode)
Bool_t ReadBuffer (char *buf, Int_t len)
Bool_t ReadBuffer (char *buf, Long64_t pos, Int_t len)
Bool_t ReadBuffers (char *buf, Long64_t *pos, Int_t *len, Int_t nbuf)
Bool_t WriteBuffer (const char *buf, Int_t len)
void Seek (Long64_t offset, ERelativeTo pos=kBeg)
const TUrlGetEndpointUrl () const
 TNetFile (const char *url, Option_t *option="", const char *ftitle="", Int_t compress=1, Int_t netopt=0)
 TNetFile ()
virtual ~TNetFile ()
void Close (Option_t *option="")
void Flush ()
Int_t GetErrorCode () const
Bool_t IsOpen () const
Bool_t Matches (const char *url)
Int_t ReOpen (Option_t *mode)
Bool_t ReadBuffer (char *buf, Int_t len)
Bool_t ReadBuffer (char *buf, Long64_t pos, Int_t len)
Bool_t ReadBuffers (char *buf, Long64_t *pos, Int_t *len, Int_t nbuf)
Bool_t WriteBuffer (const char *buf, Int_t len)
void Seek (Long64_t offset, ERelativeTo pos=kBeg)
const TUrlGetEndpointUrl () const

Protected Member Functions

 TNetFile (const TNetFile &)
TNetFileoperator= (const TNetFile &)
 TNetFile (const char *url, const char *ftitle, Int_t comp, Bool_t)
virtual void ConnectServer (Int_t *stat, EMessageTypes *kind, Int_t netopt, Int_t tcpwindowsize, Bool_t forceOpen, Bool_t forceRead)
virtual void Create (const char *url, Option_t *option, Int_t netopt)
virtual void Create (TSocket *s, Option_t *option, Int_t netopt)
void Init (Bool_t create)
void Print (Option_t *option) const
void PrintError (const char *where, Int_t err)
Int_t Recv (Int_t &status, EMessageTypes &kind)
Int_t SysOpen (const char *pathname, Int_t flags, UInt_t mode)
Int_t SysClose (Int_t fd)
Int_t SysStat (Int_t fd, Long_t *id, Long64_t *size, Long_t *flags, Long_t *modtime)
 TNetFile (const TNetFile &)
TNetFileoperator= (const TNetFile &)
 TNetFile (const char *url, const char *ftitle, Int_t comp, Bool_t)
virtual void ConnectServer (Int_t *stat, EMessageTypes *kind, Int_t netopt, Int_t tcpwindowsize, Bool_t forceOpen, Bool_t forceRead)
virtual void Create (const char *url, Option_t *option, Int_t netopt)
virtual void Create (TSocket *s, Option_t *option, Int_t netopt)
void Init (Bool_t create)
void Print (Option_t *option) const
void PrintError (const char *where, Int_t err)
Int_t Recv (Int_t &status, EMessageTypes &kind)
Int_t SysOpen (const char *pathname, Int_t flags, UInt_t mode)
Int_t SysClose (Int_t fd)
Int_t SysStat (Int_t fd, Long_t *id, Long64_t *size, Long_t *flags, Long_t *modtime)

Protected Attributes

TUrl fEndpointUrl
TString fUser
TSocketfSocket
Int_t fProtocol
Int_t fErrorCode
Int_t fNetopt
TSocketfSocket

Detailed Description

Definition at line 44 of file TNetFile.h.


Constructor & Destructor Documentation

TNetFile::TNetFile ( const TNetFile  )  [protected]

TNetFile::TNetFile ( const char *  url,
const char *  ftitle,
Int_t  comp,
Bool_t   
) [protected]

Definition at line 96 of file TNetFile.cxx.

References fErrorCode, fNetopt, fProtocol, and fSocket.

TNetFile::TNetFile ( const char *  url,
Option_t option = "",
const char *  ftitle = "",
Int_t  compress = 1,
Int_t  netopt = 0 
)

TNetFile::TNetFile (  )  [inline]

Definition at line 74 of file TNetFile.h.

TNetFile::~TNetFile (  )  [virtual]

Definition at line 110 of file TNetFile.cxx.

References Close().

TNetFile::TNetFile ( const TNetFile  )  [protected]

TNetFile::TNetFile ( const char *  url,
const char *  ftitle,
Int_t  comp,
Bool_t   
) [protected]

TNetFile::TNetFile ( const char *  url,
Option_t option = "",
const char *  ftitle = "",
Int_t  compress = 1,
Int_t  netopt = 0 
)

TNetFile::TNetFile (  )  [inline]

Definition at line 74 of file TNetFile.h.

virtual TNetFile::~TNetFile (  )  [virtual]


Member Function Documentation

TNetFile& TNetFile::operator= ( const TNetFile  )  [protected]

void TNetFile::ConnectServer ( Int_t stat,
EMessageTypes kind,
Int_t  netopt,
Int_t  tcpwindowsize,
Bool_t  forceOpen,
Bool_t  forceRead 
) [protected, virtual]

Definition at line 579 of file TNetFile.cxx.

References TSocket::CreateAuthSocket(), TString::Data(), TObject::Error(), TFile::fOption, Form(), fProtocol, fSocket, TFile::fUrl, gDirectory, TUrl::GetFile(), TUrl::GetHost(), TUrl::GetPort(), TUrl::GetProtocol(), TSocket::GetRemoteProtocol(), TUrl::GetUser(), gROOT, TString::Insert(), TSocket::IsAuthenticated(), kErrAuthNotOK, kFALSE, kROOTD_ERR, kROOTD_OPEN, TObject::MakeZombie(), Recv(), SafeDelete, TSocket::Send(), ToLower(), and TObject::Warning().

Referenced by TCastorFile::ConnectServer(), and Create().

void TNetFile::Create ( const char *  url,
Option_t option,
Int_t  netopt 
) [protected, virtual]

Definition at line 645 of file TNetFile.cxx.

References ConnectServer(), TObject::Error(), fErrorCode, fNetopt, TFile::fOption, fSocket, TFile::fUrl, TDirectoryFile::fWritable, gDebug, gDirectory, TUrl::GetUrl(), gROOT, TObject::Info(), Init(), TUrl::IsValid(), kFALSE, kROOTD_ERR, kTRUE, TObject::MakeZombie(), PrintError(), read, SafeDelete, stat, strcasecmp, TString::ToUpper(), and update().

Referenced by Create(), TXNetFile::CreateXClient(), and SysOpen().

void TNetFile::Create ( TSocket s,
Option_t option,
Int_t  netopt 
) [protected, virtual]

Definition at line 758 of file TNetFile.cxx.

References Create(), fSocket, and s.

void TNetFile::Init ( Bool_t  create  )  [protected, virtual]

Reimplemented from TFile.

Definition at line 245 of file TNetFile.cxx.

References TFile::fD, TFile::Init(), and Seek().

Referenced by Create(), and TXNetFile::Init().

void TNetFile::Print ( Option_t option  )  const [protected, virtual]

Reimplemented from TFile.

Definition at line 264 of file TNetFile.cxx.

References TString::Data(), TFile::fBytesRead, TFile::fBytesWrite, TFile::fOption, TNamed::fTitle, TFile::fUrl, fUser, TUrl::GetFile(), and Printf().

void TNetFile::PrintError ( const char *  where,
Int_t  err 
) [protected]

Definition at line 279 of file TNetFile.cxx.

References TObject::Error(), fErrorCode, and gRootdErrStr.

Referenced by Create(), ReadBuffer(), ReadBuffers(), SysOpen(), and WriteBuffer().

Int_t TNetFile::Recv ( Int_t status,
EMessageTypes kind 
) [protected]

Definition at line 554 of file TNetFile.cxx.

References fSocket, kROOTD_ERR, n, TSocket::Recv(), and what.

Referenced by ConnectServer(), ReadBuffer(), ReadBuffers(), SysOpen(), and WriteBuffer().

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

Reimplemented from TFile.

Definition at line 118 of file TNetFile.cxx.

References Create(), TString::Data(), fNetopt, TFile::fOption, Form(), fProtocol, fSocket, TFile::fUrl, TUrl::GetFile(), TUrl::GetUrl(), kROOTD_ERR, kROOTD_OPEN, PrintError(), Recv(), TSocket::Send(), stat, and ToLower().

Referenced by TXNetFile::SysOpen().

Int_t TNetFile::SysClose ( Int_t  fd  )  [protected, virtual]

Reimplemented from TFile.

Definition at line 153 of file TNetFile.cxx.

References fSocket, kROOTD_CLOSE, and TSocket::Send().

Referenced by TXNetFile::SysClose(), and TCastorFile::SysClose().

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

Reimplemented from TFile.

Definition at line 164 of file TNetFile.cxx.

References fProtocol, fSocket, kROOTD_FSTAT, kS_IXGRP, kS_IXOTH, kS_IXUSR, R_ISDIR(), R_ISREG(), TSocket::Recv(), and TSocket::Send().

Referenced by TXNetFile::SysStat().

void TNetFile::Close ( Option_t option = ""  )  [virtual]

Reimplemented from TFile.

Definition at line 217 of file TNetFile.cxx.

References TFile::Close(), TFile::fD, fProtocol, fSocket, kROOTD_BYE, SafeDelete, and TSocket::Send().

Referenced by TXNetFile::Close(), and ~TNetFile().

void TNetFile::Flush (  )  [virtual]

Reimplemented from TFile.

Definition at line 234 of file TNetFile.cxx.

References TFile::FlushWriteCache(), fSocket, TDirectoryFile::fWritable, kROOTD_FLUSH, and TSocket::Send().

Referenced by TXNetFile::Flush().

Int_t TNetFile::GetErrorCode (  )  const [inline]

Definition at line 79 of file TNetFile.h.

References fErrorCode.

Bool_t TNetFile::IsOpen (  )  const [virtual]

Reimplemented from TFile.

Definition at line 256 of file TNetFile.cxx.

References fSocket, kFALSE, and kTRUE.

Referenced by TXNetFile::IsOpen().

Bool_t TNetFile::Matches ( const char *  url  )  [virtual]

Reimplemented from TFile.

Definition at line 774 of file TNetFile.cxx.

References fEndpointUrl, TUrl::GetFile(), TUrl::GetHostFQDN(), TUrl::GetPort(), kFALSE, kTRUE, TFile::Matches(), and u.

Int_t TNetFile::ReOpen ( Option_t mode  )  [virtual]

Reimplemented from TFile.

Definition at line 288 of file TNetFile.cxx.

References TObject::Error(), fProtocol, and TFile::ReOpen().

Referenced by TXNetFile::ReOpen().

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

Reimplemented from TFile.

Definition at line 308 of file TNetFile.cxx.

References TSignalHandler::Delay(), TObject::Error(), TFile::fBytesRead, fErrorCode, TFile::fgBytesRead, TFile::fgReadCalls, TVirtualPerfStats::FileReadEvent(), TFile::fOffset, Form(), TFile::fReadCalls, fSocket, gApplication, TSystem::GetErrno(), TFile::GetFileBytesRead(), TFile::GetFileReadCalls(), TApplication::GetSignalHandler(), gPerfStats, TSignalHandler::HandleDelayedSignal(), kFALSE, kROOTD_ERR, kROOTD_GET, kTRUE, n, PrintError(), TFile::ReadBufferViaCache(), Recv(), TSocket::RecvRaw(), TSystem::ResetErrno(), result(), TSocket::Send(), TFile::SetFileBytesRead(), TFile::SetFileReadCalls(), start, and stat.

Referenced by ReadBuffer(), and TXNetFile::ReadBuffer().

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

Reimplemented from TFile.

Definition at line 381 of file TNetFile.cxx.

References ReadBuffer(), and TFile::SetOffset().

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

Reimplemented from TFile.

Definition at line 391 of file TNetFile.cxx.

References TSignalHandler::Delay(), TObject::Error(), TFile::fArchiveOffset, TFile::fBytesRead, fErrorCode, TFile::fgBytesRead, TFile::fgReadCalls, TVirtualPerfStats::FileReadEvent(), Form(), fProtocol, TFile::fReadCalls, fSocket, gApplication, gDebug, TSystem::GetErrno(), TFile::GetFileBytesRead(), TFile::GetFileReadCalls(), TApplication::GetSignalHandler(), gPerfStats, TSignalHandler::HandleDelayedSignal(), i, TObject::Info(), kFALSE, kROOTD_ERR, kROOTD_GETS, kTRUE, TString::Length(), Long64_t, n, PrintError(), TFile::ReadBuffers(), Recv(), TSocket::RecvRaw(), TSystem::ResetErrno(), result(), TSocket::Send(), TSocket::SendRaw(), TFile::SetFileBytesRead(), TFile::SetFileReadCalls(), start, and stat.

Referenced by TXNetFile::ReadBuffers().

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

Reimplemented from TFile.

Definition at line 496 of file TNetFile.cxx.

References TObject::Error(), TFile::fBytesWrite, fErrorCode, TFile::fgBytesWrite, TFile::fOffset, Form(), fSocket, TDirectoryFile::fWritable, TFile::GetFileBytesWritten(), gSystem, TSystem::IgnoreInterrupt(), kFALSE, kROOTD_ERR, kROOTD_PUT, kTRUE, TFile::kWriteError, PrintError(), Recv(), result(), TSocket::Send(), TSocket::SendRaw(), TObject::SetBit(), TFile::SetFileBytesWritten(), stat, and TFile::WriteBufferViaCache().

Referenced by TXNetFile::WriteBuffer(), and TCastorFile::WriteBuffer().

void TNetFile::Seek ( Long64_t  offset,
ERelativeTo  pos = kBeg 
) [virtual]

Reimplemented from TFile.

Definition at line 571 of file TNetFile.cxx.

References TFile::SetOffset().

Referenced by Init().

const TUrl* TNetFile::GetEndpointUrl (  )  const [inline, virtual]

Reimplemented from TFile.

Definition at line 89 of file TNetFile.h.

References fEndpointUrl.

TNetFile& TNetFile::operator= ( const TNetFile  )  [protected]

virtual void TNetFile::ConnectServer ( Int_t stat,
EMessageTypes kind,
Int_t  netopt,
Int_t  tcpwindowsize,
Bool_t  forceOpen,
Bool_t  forceRead 
) [protected, virtual]

virtual void TNetFile::Create ( const char *  url,
Option_t option,
Int_t  netopt 
) [protected, virtual]

virtual void TNetFile::Create ( TSocket s,
Option_t option,
Int_t  netopt 
) [protected, virtual]

void TNetFile::Init ( Bool_t  create  )  [protected, virtual]

Reimplemented from TFile.

void TNetFile::Print ( Option_t option  )  const [protected, virtual]

Reimplemented from TFile.

void TNetFile::PrintError ( const char *  where,
Int_t  err 
) [protected]

Int_t TNetFile::Recv ( Int_t status,
EMessageTypes kind 
) [protected]

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

Reimplemented from TFile.

Int_t TNetFile::SysClose ( Int_t  fd  )  [protected, virtual]

Reimplemented from TFile.

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

Reimplemented from TFile.

void TNetFile::Close ( Option_t option = ""  )  [virtual]

Reimplemented from TFile.

void TNetFile::Flush (  )  [virtual]

Reimplemented from TFile.

Int_t TNetFile::GetErrorCode (  )  const [inline]

Definition at line 79 of file TNetFile.h.

References fErrorCode.

Bool_t TNetFile::IsOpen (  )  const [virtual]

Reimplemented from TFile.

Bool_t TNetFile::Matches ( const char *  url  )  [virtual]

Reimplemented from TFile.

Int_t TNetFile::ReOpen ( Option_t mode  )  [virtual]

Reimplemented from TFile.

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

Reimplemented from TFile.

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

Reimplemented from TFile.

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

Reimplemented from TFile.

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

Reimplemented from TFile.

void TNetFile::Seek ( Long64_t  offset,
ERelativeTo  pos = kBeg 
) [virtual]

Reimplemented from TFile.

const TUrl* TNetFile::GetEndpointUrl (  )  const [inline, virtual]

Reimplemented from TFile.

Definition at line 89 of file TNetFile.h.

References fEndpointUrl.


Member Data Documentation

TUrl TNetFile::fEndpointUrl [protected]

Definition at line 47 of file TNetFile.h.

Referenced by GetEndpointUrl(), TXNetFile::Init(), and Matches().

TString TNetFile::fUser [protected]

Definition at line 48 of file TNetFile.h.

Referenced by Print().

TSocket* TNetFile::fSocket [protected]

Definition at line 49 of file TNetFile.h.

Referenced by Close(), ConnectServer(), Create(), Flush(), IsOpen(), ReadBuffer(), ReadBuffers(), Recv(), SysClose(), SysOpen(), SysStat(), TNetFile(), and WriteBuffer().

Int_t TNetFile::fProtocol [protected]

Definition at line 50 of file TNetFile.h.

Referenced by Close(), ConnectServer(), ReadBuffers(), ReOpen(), SysOpen(), SysStat(), and TNetFile().

Int_t TNetFile::fErrorCode [protected]

Definition at line 51 of file TNetFile.h.

Referenced by Create(), GetErrorCode(), PrintError(), ReadBuffer(), ReadBuffers(), TNetFile(), and WriteBuffer().

Int_t TNetFile::fNetopt [protected]

Definition at line 52 of file TNetFile.h.

Referenced by Create(), TXNetFile::CreateXClient(), SysOpen(), TXNetFile::SysOpen(), and TNetFile().

TSocket* TNetFile::fSocket [protected]

Definition at line 49 of file TNetFile.h.


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