TXNetSystem Class Reference

#include <TXNetSystem.h>

Inheritance diagram for TXNetSystem:

TNetSystem TSystem TSystem TNamed TNamed TNamed TNamed TObject TObject TObject TObject TObject TObject TObject TObject List of all members.

Public Member Functions

 TXNetSystem (Bool_t owner=kTRUE)
 TXNetSystem (const char *url, Bool_t owner=kTRUE)
virtual ~TXNetSystem ()
Bool_t AccessPathName (const char *path, EAccessMode mode)
virtual Bool_t ConsistentWith (const char *path, void *dirptr)
virtual void FreeDirectory (void *dirp)
virtual const char * GetDirEntry (void *dirp)
virtual Int_t GetPathInfo (const char *path, FileStat_t &buf)
virtual Bool_t IsPathLocal (const char *path)
virtual Int_t Locate (const char *path, TString &endurl)
virtual Int_t MakeDirectory (const char *dir)
virtual void * OpenDirectory (const char *dir)
virtual int Unlink (const char *path)
Bool_t GetPathsInfo (const char *paths, UChar_t *info)
Bool_t IsOnline (const char *path)
Bool_t Prepare (const char *path, UChar_t opt=8, UChar_t prio=0)
Int_t Prepare (TCollection *paths, UChar_t opt=8, UChar_t prio=0, TString *buf=0)

Private Member Functions

XrdClientAdminConnect (const char *url)
void * GetDirPtr () const
void InitXrdClient ()

Static Private Member Functions

static XrdClientAdminGetClientAdmin (const char *url)
static TString GetKey (const char *url)

Private Attributes

Bool_t fIsRootd
Bool_t fIsXRootd
TString fDir
void * fDirp
vecString fDirList
Bool_t fDirListValid
TString fDirEntry
TString fUrl

Static Private Attributes

static Bool_t fgInitDone
static Bool_t fgRootdBC
static THashList fgAddrFQDN
static THashList fgAdminHash

Friends

class TXNetSystemConnectGuard

Detailed Description

Definition at line 65 of file TXNetSystem.h.


Constructor & Destructor Documentation

TXNetSystem::TXNetSystem ( Bool_t  owner = kTRUE  ) 

Definition at line 53 of file TXNetSystem.cxx.

References fDir, fDirListValid, fDirp, fIsXRootd, fUrl, kFALSE, and TNamed::SetTitle().

TXNetSystem::TXNetSystem ( const char *  url,
Bool_t  owner = kTRUE 
)

Definition at line 66 of file TXNetSystem.cxx.

References EnvPutInt, TObject::Error(), fDir, fDirListValid, fDirp, fgAddrFQDN, fgAdminHash, fgInitDone, fIsRootd, fIsXRootd, fUrl, gEnv, TEnv::GetValue(), TNetSystem::InitRemoteEntity(), InitXrdClient(), TXNetSystemConnectGuard::IsValid(), kFALSE, NAME_DEBUG, TCollection::SetOwner(), and TNamed::SetTitle().

virtual TXNetSystem::~TXNetSystem (  )  [inline, virtual]

Definition at line 96 of file TXNetSystem.h.


Member Function Documentation

XrdClientAdmin * TXNetSystem::Connect ( const char *  url  )  [private]

Definition at line 101 of file TXNetSystem.cxx.

References XrdClientAdmin::Connect(), TNetSystem::Create(), dummy, EnvGetLong, EnvPutInt, TObject::Error(), fgRootdBC, fIsRootd, fIsXRootd, TXNetFile::FormUrl(), gDebug, gEnv, GetClientAdmin(), XrdClientAbs::GetClientConn(), XrdClientConn::GetCurrentUrl(), TROOT::GetListOfSockets(), XrdClientConn::GetOpenSockFD(), TXNetFile::GetRootdProtocol(), XrdClientConn::GetServerType(), gROOT, gROOTMutex, TObject::Info(), kNoBlock, TSocket::kROOTD, kSTRootd, kTRUE, NAME_FIRSTCONNECTMAXCNT, R__LOCKGUARD2, TCollection::Remove(), s, and TEnv::SetValue().

Referenced by TXNetSystemConnectGuard::TXNetSystemConnectGuard().

void* TXNetSystem::GetDirPtr (  )  const [inline, private, virtual]

Reimplemented from TNetSystem.

Definition at line 83 of file TXNetSystem.h.

References fDirp.

void TXNetSystem::InitXrdClient (  )  [private]

Definition at line 203 of file TXNetSystem.cxx.

References fgInitDone, gEnv, TEnv::GetValue(), TROOT::GetVersion(), gROOT, TObject::Info(), kTRUE, and TXNetFile::SetEnv().

Referenced by TXNetSystem().

XrdClientAdmin * TXNetSystem::GetClientAdmin ( const char *  url  )  [static, private]

Definition at line 707 of file TXNetSystem.cxx.

References TList::Add(), TString::Data(), fgAdminHash, THashList::FindObject(), TXrdClientAdminWrapper::fXCA, GetKey(), and TCollection::GetSize().

Referenced by Connect().

TString TXNetSystem::GetKey ( const char *  url  )  [static, private]

Definition at line 731 of file TXNetSystem.cxx.

References u.

Referenced by GetClientAdmin().

Bool_t TXNetSystem::AccessPathName ( const char *  path,
EAccessMode  mode 
) [virtual]

Reimplemented from TNetSystem.

Definition at line 422 of file TXNetSystem.cxx.

References TNetSystem::AccessPathName(), buf, fIsXRootd, gDebug, GetPathInfo(), TObject::Info(), kFALSE, kS_IFSOCK, and kTRUE.

Bool_t TXNetSystem::ConsistentWith ( const char *  path,
void *  dirptr 
) [virtual]

Reimplemented from TNetSystem.

Definition at line 409 of file TXNetSystem.cxx.

References TNetSystem::ConsistentWith(), gDebug, and TObject::Info().

void TXNetSystem::FreeDirectory ( void *  dirp  )  [virtual]

Reimplemented from TNetSystem.

Definition at line 259 of file TXNetSystem.cxx.

References XrdClientVector< T >::Clear(), TObject::Error(), fDir, fDirEntry, fDirList, fDirListValid, fDirp, fIsXRootd, TNetSystem::FreeDirectory(), gDebug, TObject::Info(), and kFALSE.

const char * TXNetSystem::GetDirEntry ( void *  dirp  )  [virtual]

Reimplemented from TNetSystem.

Definition at line 307 of file TXNetSystem.cxx.

References TXNetSystemConnectGuard::ClientAdmin(), TString::Data(), XrdClientAdmin::DirList(), TObject::Error(), fDir, fDirEntry, fDirList, fDirListValid, fDirp, fIsXRootd, fUrl, gDebug, TNetSystem::GetDirEntry(), XrdClientVector< T >::GetSize(), XrdClientAdmin::GoBackToRedirector(), TObject::Info(), TXNetSystemConnectGuard::IsValid(), kTRUE, TXNetSystemConnectGuard::NotifyLastError(), ok, and XrdClientVector< T >::Pop_front().

Int_t TXNetSystem::GetPathInfo ( const char *  path,
FileStat_t buf 
) [virtual]

Reimplemented from TNetSystem.

Definition at line 346 of file TXNetSystem.cxx.

References buf, XrdOucString::c_str(), TXNetSystemConnectGuard::ClientAdmin(), fIsXRootd, flags, gDebug, XrdClientAbs::GetCurrentUrl(), TUrl::GetFile(), TNetSystem::GetPathInfo(), TUrl::GetUrl(), XrdClientAdmin::GoBackToRedirector(), XrdClientUrlInfo::Host, id, TObject::Info(), TXNetSystemConnectGuard::IsValid(), kS_IFDIR, kS_IFOFF, kS_IFREG, kS_IFSOCK, kS_IRUSR, kS_IWUSR, kS_IXGRP, kS_IXOTH, kS_IXUSR, kXR_isDir, kXR_offline, kXR_other, kXR_readable, kXR_writable, kXR_xset, Long64_t, XrdClientStatInfo::modtime, TXNetSystemConnectGuard::NotifyLastError(), ok, XrdClientUrlInfo::Port, XrdClientUrlInfo::Proto, TUrl::SetHost(), TUrl::SetPort(), TUrl::SetProtocol(), size, and XrdClientAdmin::Stat().

Referenced by AccessPathName(), and IsOnline().

Bool_t TXNetSystem::IsPathLocal ( const char *  path  )  [virtual]

Reimplemented from TSystem.

Definition at line 623 of file TXNetSystem.cxx.

References TXNetSystemConnectGuard::ClientAdmin(), fIsXRootd, XrdClientAbs::GetClientConn(), XrdClientConn::GetServerType(), TSystem::IsPathLocal(), TXNetSystemConnectGuard::IsValid(), kFALSE, and kSTDataXrootd.

Int_t TXNetSystem::Locate ( const char *  path,
TString endurl 
) [virtual]

Definition at line 642 of file TXNetSystem.cxx.

References a, TList::Add(), XrdOucString::c_str(), TXNetSystemConnectGuard::ClientAdmin(), TString::Data(), fgAddrFQDN, THashList::FindObject(), fIsXRootd, gDebug, TSystem::GetHostByName(), TCollection::GetSize(), TNamed::GetTitle(), gSystem, XrdClientUrlInfo::Host, TObject::Info(), TXNetSystemConnectGuard::IsValid(), kTRUE, XrdClientAdmin::Locate(), TXNetSystemConnectGuard::NotifyLastError(), XrdClientUrlInfo::Port, TNamed::TNamed(), and u.

Referenced by TXNetFileStager::Locate().

Int_t TXNetSystem::MakeDirectory ( const char *  dir  )  [virtual]

Reimplemented from TNetSystem.

Definition at line 282 of file TXNetSystem.cxx.

References TXNetSystemConnectGuard::ClientAdmin(), fIsXRootd, gDebug, XrdClientAdmin::GoBackToRedirector(), TObject::Info(), TXNetSystemConnectGuard::IsValid(), TNetSystem::MakeDirectory(), XrdClientAdmin::Mkdir(), TXNetSystemConnectGuard::NotifyLastError(), and ok.

void * TXNetSystem::OpenDirectory ( const char *  dir  )  [virtual]

Reimplemented from TNetSystem.

Definition at line 225 of file TXNetSystem.cxx.

References TXNetSystemConnectGuard::ClientAdmin(), TString::Data(), dirs(), XrdClientAdmin::ExistDirs(), fDir, fDirp, fIsXRootd, fUrl, gDebug, XrdClientVector< T >::GetSize(), XrdClientAdmin::GoBackToRedirector(), TObject::Info(), TXNetSystemConnectGuard::IsValid(), TXNetSystemConnectGuard::NotifyLastError(), TNetSystem::OpenDirectory(), and s.

int TXNetSystem::Unlink ( const char *  path  )  [virtual]

Reimplemented from TNetSystem.

Definition at line 446 of file TXNetSystem.cxx.

References TXNetSystemConnectGuard::ClientAdmin(), TString::Data(), fIsXRootd, flags, gDebug, XrdClientAdmin::GoBackToRedirector(), id, TObject::Info(), TXNetSystemConnectGuard::IsValid(), kXR_isDir, kXR_offline, Long64_t, XrdClientStatInfo::modtime, TXNetSystemConnectGuard::NotifyLastError(), ok, XrdClientAdmin::Rm(), XrdClientAdmin::Rmdir(), size, and XrdClientAdmin::Stat().

Bool_t TXNetSystem::GetPathsInfo ( const char *  paths,
UChar_t info 
)

Definition at line 594 of file TXNetSystem.cxx.

References TXNetSystemConnectGuard::ClientAdmin(), gDebug, XrdClientAdmin::GoBackToRedirector(), TObject::Info(), TXNetSystemConnectGuard::IsValid(), kFALSE, kTRUE, XrdClientAbs::LastServerResp(), TXNetSystemConnectGuard::NotifyLastError(), ServerResponseHeader::status, XrdClientAdmin::SysStatX(), and TObject::Warning().

Bool_t TXNetSystem::IsOnline ( const char *  path  ) 

Definition at line 488 of file TXNetSystem.cxx.

References FileStat_t::fMode, gDebug, GetPathInfo(), TObject::Info(), kFALSE, kTRUE, and R_ISOFF().

Referenced by TXNetFileStager::IsStaged().

Bool_t TXNetSystem::Prepare ( const char *  path,
UChar_t  opt = 8,
UChar_t  prio = 0 
)

Definition at line 509 of file TXNetSystem.cxx.

References TXNetSystemConnectGuard::ClientAdmin(), gDebug, XrdClientAdmin::GoBackToRedirector(), TObject::Info(), TXNetSystemConnectGuard::IsValid(), kFALSE, kTRUE, XrdClientAbs::LastServerResp(), TXNetSystemConnectGuard::NotifyLastError(), XrdClientAdmin::Prepare(), XrdClientVector< T >::Push_back(), and ServerResponseHeader::status.

Referenced by TXNetFileStager::Stage().

Int_t TXNetSystem::Prepare ( TCollection paths,
UChar_t  opt = 8,
UChar_t  prio = 0,
TString buf = 0 
)

Definition at line 534 of file TXNetSystem.cxx.

References buf, TXNetSystemConnectGuard::ClientAdmin(), TString::Data(), Form(), gDebug, TFileStager::GetPathName(), XrdClientAdmin::GoBackToRedirector(), TObject::Info(), TXNetSystemConnectGuard::IsValid(), XrdClientAbs::LastServerResp(), TXNetSystemConnectGuard::NotifyLastError(), o, XrdClientAdmin::Prepare(), TString::ReplaceAll(), ServerResponseHeader::status, u, and TObject::Warning().


Friends And Related Function Documentation

friend class TXNetSystemConnectGuard [friend]

Definition at line 67 of file TXNetSystem.h.


Member Data Documentation

Bool_t TXNetSystem::fIsRootd [private]

Definition at line 70 of file TXNetSystem.h.

Referenced by Connect(), and TXNetSystem().

Bool_t TXNetSystem::fIsXRootd [private]

Definition at line 71 of file TXNetSystem.h.

Referenced by AccessPathName(), Connect(), FreeDirectory(), GetDirEntry(), GetPathInfo(), IsPathLocal(), Locate(), MakeDirectory(), OpenDirectory(), TXNetSystem(), and Unlink().

TString TXNetSystem::fDir [private]

Reimplemented from TNetSystem.

Definition at line 72 of file TXNetSystem.h.

Referenced by FreeDirectory(), GetDirEntry(), OpenDirectory(), and TXNetSystem().

void* TXNetSystem::fDirp [private]

Reimplemented from TNetSystem.

Definition at line 73 of file TXNetSystem.h.

Referenced by FreeDirectory(), GetDirEntry(), GetDirPtr(), OpenDirectory(), and TXNetSystem().

vecString TXNetSystem::fDirList [private]

Definition at line 74 of file TXNetSystem.h.

Referenced by FreeDirectory(), and GetDirEntry().

Bool_t TXNetSystem::fDirListValid [private]

Definition at line 75 of file TXNetSystem.h.

Referenced by FreeDirectory(), GetDirEntry(), and TXNetSystem().

TString TXNetSystem::fDirEntry [private]

Definition at line 76 of file TXNetSystem.h.

Referenced by FreeDirectory(), and GetDirEntry().

TString TXNetSystem::fUrl [private]

Definition at line 77 of file TXNetSystem.h.

Referenced by GetDirEntry(), OpenDirectory(), TXNetSystem(), and TXNetSystemConnectGuard::TXNetSystemConnectGuard().

Bool_t TXNetSystem::fgInitDone [static, private]

Definition at line 79 of file TXNetSystem.h.

Referenced by InitXrdClient(), and TXNetSystem().

Bool_t TXNetSystem::fgRootdBC [static, private]

Definition at line 80 of file TXNetSystem.h.

Referenced by Connect().

THashList TXNetSystem::fgAddrFQDN [static, private]

Definition at line 87 of file TXNetSystem.h.

Referenced by Locate(), and TXNetSystem().

THashList TXNetSystem::fgAdminHash [static, private]

Definition at line 88 of file TXNetSystem.h.

Referenced by GetClientAdmin(), and TXNetSystem().


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