#include <TNetFile.h>
Inheritance diagram for TNetFile:
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 TUrl * | GetEndpointUrl () 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 TUrl * | GetEndpointUrl () const |
Protected Member Functions | |
TNetFile (const TNetFile &) | |
TNetFile & | operator= (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 &) | |
TNetFile & | operator= (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 |
TSocket * | fSocket |
Int_t | fProtocol |
Int_t | fErrorCode |
Int_t | fNetopt |
TSocket * | fSocket |
Definition at line 44 of file TNetFile.h.
TNetFile::TNetFile | ( | const TNetFile & | ) | [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.
TNetFile::~TNetFile | ( | ) | [virtual] |
TNetFile::TNetFile | ( | const TNetFile & | ) | [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] |
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().
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::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().
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().
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] |
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.
Reimplemented from TFile.
Definition at line 288 of file TNetFile.cxx.
References TObject::Error(), fProtocol, and TFile::ReOpen().
Referenced by TXNetFile::ReOpen().
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().
Reimplemented from TFile.
Definition at line 381 of file TNetFile.cxx.
References ReadBuffer(), and TFile::SetOffset().
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().
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] |
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] |
void TNetFile::PrintError | ( | const char * | where, | |
Int_t | err | |||
) | [protected] |
Int_t TNetFile::Recv | ( | Int_t & | status, | |
EMessageTypes & | kind | |||
) | [protected] |
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::Flush | ( | ) | [virtual] |
Reimplemented from TFile.
Int_t TNetFile::GetErrorCode | ( | ) | const [inline] |
Reimplemented from TFile.
Reimplemented from TFile.
void TNetFile::Seek | ( | Long64_t | offset, | |
ERelativeTo | pos = kBeg | |||
) | [virtual] |
Reimplemented from TFile.
const TUrl* TNetFile::GetEndpointUrl | ( | ) | const [inline, virtual] |
TUrl TNetFile::fEndpointUrl [protected] |
Definition at line 47 of file TNetFile.h.
Referenced by GetEndpointUrl(), TXNetFile::Init(), and Matches().
TString TNetFile::fUser [protected] |
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.