51#include <XrdClient/XrdClient.hh> 
   55#include <XProtocol/XProtocol.hh> 
  106                     const char *logicalurl) :
 
  107            TNetFile((logicalurl ? logicalurl : url), ftitle, compress, 
kFALSE)
 
  109   TUrl urlnoanchor(url);
 
  120         Info(
"TXNetFile",
"(eXtended TNetFile) %s",
 
  121              gROOT->GetVersion());
 
  167   if (strlen(uu.
GetUser()) > 0) {
 
  173   if (strlen(uu.
GetHost()) > 0) {
 
  194   static const char *keys[6] = { 
"cachesz=", 
"readaheadsz=", 
"rmpolicy=",
 
  195                                  "mxredir=", 
"readaheadstrategy=", 
"readtrimblksz=" };
 
  200   for (i = 0; i < (
sizeof(keys)/
sizeof(keys[0])); i++) {
 
  207            if (!
TString(val(k++)).IsDigit())
 
  214               cachesz = val.
Atoi();
 
  216               readaheadsz = val.
Atoi();
 
  218               rmpolicy = val.
Atoi();
 
  220               mxredir = val.
Atoi();
 
  222               rastrategy = val.
Atoi();
 
  224               readtrimblksz = val.
Atoi();
 
  231      Info(
"ParseCacheOptions",
"found: cachesz = %d, readaheadsz = %d, " 
  232           "rmpolicy = %d, mxredir = %d, rastrategy = %d, readtrimblksz = %d",
 
  233           cachesz, readaheadsz, rmpolicy, mxredir, rastrategy, readtrimblksz);
 
  245   Int_t cachesz = -1, readaheadsz = -1, rmpolicy = -1, mxredir = -1, 
np = 0;
 
  246   Int_t readaheadstrategy = -1, readtrimblksz = -1;
 
  262            ::Warning(
"TXNetFile",
"<%s> is not staged - StageOnly flag is set!",url);
 
  273      parallelopen = 
kTRUE;
 
  283      Error(
"CreateXClient",
"fatal error: new object creation failed -" 
  284            " out of system resources.");
 
  291                     cachesz, readaheadsz, rmpolicy, mxredir,
 
  292                     readaheadstrategy, readtrimblksz);
 
  296      if (
fClient->GetClientConn()) {
 
  298            Info(
"CreateXClient", 
"setting maxredir = %d", mxredir);
 
  299         fClient->GetClientConn()->SetMaxRedirCnt(mxredir);
 
  306         Info(
"CreateXClient", 
"setting cachesz = %d, readaheadsz = %d, " 
  308                               cachesz, readaheadsz, rmpolicy);
 
  309      fClient->SetCacheParameters(cachesz, readaheadsz, rmpolicy);
 
  311      if (readaheadstrategy >= 0) {
 
  313            Info(
"CreateXClient", 
"setting readaheadstrategy = %d", readaheadstrategy);
 
  314         fClient->SetReadAheadStrategy(readaheadstrategy);
 
  317      if (readtrimblksz >= 0) {
 
  319            Info(
"CreateXClient", 
"setting readtrimblksz = %d", readtrimblksz);
 
  320         fClient->SetBlockReadTrimming(readtrimblksz);
 
  330            Info(
"CreateXClient", 
"remote file could not be open");
 
  349                     Error(
"CreateXClient", 
"getting rootd server protocol");
 
  356                                   ->GetCurrentUrl()).GetUrl().c_str());
 
  361                     Info(
"CreateXClient",
" url: %s",uu.
Data());
 
  384                  Error(
"CreateXClient", 
"rootd: underlying socket undefined");
 
  389                  Info(
"CreateXClient", 
"rootd: fall back not enabled - closing");
 
  418   memcpy((
char *)&cproto,
 
  422      ::Error(
"TXNetFile::GetRootdProtocol",
 
  423              "sending %d bytes to rootd server [%s:%d]",
 
  433      ::Error(
"TXNetFile::GetRootdProtocol",
 
  434              "reading %d bytes from rootd server [%s:%d]",
 
  444         len = 
sizeof(rproto);
 
  447            ::Error(
"TXNetFile::GetRootdProtocol",
 
  448                    "reading %d bytes from rootd server [%s:%d]",
 
  456      ::Info(
"TXNetFile::GetRootdProtocol",
 
  457             "remote rootd: buf1: %d, buf2: %d rproto: %d",
 
  471   kXR_unt16 openOpt = 0;
 
  472   memset(&openOpt, 0, 
sizeof(openOpt));
 
  480      openOpt |= kXR_force;
 
  484   Bool_t read = (opt == 
"READ");
 
  487   Bool_t create = (opt == 
"CREATE" || opt == 
"NEW");
 
  490   Bool_t recreate = (opt == 
"RECREATE");
 
  496   if (!create && !recreate && !
update && !read) {
 
  503   if (create || 
update || recreate)
 
  515            Error(
"Open", 
"no write permission, could not open file %s",
 
  520         openOpt |= kXR_open_updt;
 
  529      openOpt |= kXR_delete;
 
  536     mkpath = (*(
p + strlen(
"mkpath=")) == 
'1') ? 
kTRUE : 
kFALSE;
 
  538     openOpt |= kXR_mkpath;
 
  541      openOpt |= kXR_open_read;
 
  545   kXR_unt16 openMode = kXR_or | kXR_gr | kXR_ur | kXR_uw;
 
  549   if (!
fClient->Open(openMode, openOpt, doitparallel)) {
 
  551         Info(
"Open", 
"remote file could not be open");
 
  585      Error(
"ReadBuffer", 
"ReadBuffer is not possible because object" 
  586            " is in 'zombie' state");
 
  592         Info(
"ReadBuffer",
"Calling TNetFile::ReadBuffer");
 
  597      Error(
"ReadBuffer",
"The remote file is not open");
 
  641   if (nr != bufferLength) {
 
  642      Error(
"ReadBuffer", 
"error reading all requested bytes, got %d of %d",
 
  648      Info(
"ReadBuffer", 
"%d bytes of data read from offset" 
  649                         " %lld (%d requested)", nr, 
fOffset, bufferLength);
 
  664        gPerfStats->FileReadEvent(
this, bufferLength, start);
 
  690      Error(
"ReadBuffer", 
"ReadBuffer is not possible because object" 
  691            " is in 'zombie' state");
 
  697         Error(
"ReadBufferAsync",
"Not supported for rootd");
 
  702      Error(
"ReadBuffer",
"The remote file is not open");
 
  736      gPerfStats->FileReadEvent(
this, bufferLength, start);
 
  739      Info(
"ReadBufferAsync", 
"%d bytes of data read request from offset" 
  740                              " %lld", bufferLength, offs);
 
  757      Error(
"ReadBuffers", 
"ReadBuffers is not possible because object" 
  758            " is in 'zombie' state");
 
  764         Info(
"ReadBuffers",
"Calling TNetFile::ReadBuffers");
 
  769      Error(
"ReadBuffers",
"The remote file is not open");
 
  777      for (
Int_t i = 0; i < nbuf; i++)
 
  782   for (
Int_t i = 0; i < nbuf; i++) {
 
  783      expected_nr += 
len[i];
 
  799      Info(
"ReadBuffers", 
"response from ReadV(%d) nr: %lld", nbuf, nr);
 
  801   if (nr == expected_nr) {
 
  804         Info(
"ReadBuffers", 
"%lld bytes of data read from a list of %d buffers",
 
  808         Info(
"ReadBuffers", 
"%lld bytes of data read with a smaller (%d) TFileCacheRead buffer size?",
 
  835      Info(
"ReadBuffers", 
"XrdClient->ReadV failed, executing TFile::ReadBuffers");
 
  854      Error(
"WriteBuffer", 
"WriteBuffer is not possible because object" 
  855            " is in 'zombie' state");
 
  861         Info(
"WriteBuffer",
"file not writable");
 
  867         Info(
"WriteBuffer",
"Calling TNetFile::WriteBuffer");
 
  872      Error(
"WriteBuffer",
"The remote file is not open");
 
  887              "error writing %d bytes of data wrote to offset %lld",
 
  893      Info(
"WriteBuffer", 
" %d bytes of data wrote to offset" 
  894                         " %lld", bufferLength , 
fOffset);
 
  916         Info(
"Init",
"TFile::Init already called once");
 
  922         Info(
"Init",
"rootd: calling directly TFile::Init");
 
  939         bool usecachesave = 
fClient->UseCache(0);
 
  945         fClient->UseCache(usecachesave);
 
  953         if (
fClient->GetClientConn() && 
fClient->GetClientConn()->fRedirOpaque.length() <= 0) {
 
  963            Info(
"Init",
"open request failed!");
 
  978         Info(
"IsOpen",
"Calling TNetFile::IsOpen");
 
  995      if (
fClient->IsOpen_inprogress()) {
 
 1017         Info(
"ReOpen",
"Calling TNetFile::ReOpen");
 
 1032         Info(
"Close",
"Calling TNetFile::Close");
 
 1055      Error(
"Flush", 
"Flush is not possible because object is" 
 1056            " in 'zombie' state");
 
 1062         Info(
"Flush", 
"file not writable - do nothing");
 
 1068         Info(
"Flush",
"Calling TNetFile::Flush");
 
 1074      Error(
"Flush",
"The remote file is not open");
 
 1084      Info(
"Flush", 
"XrdClient::Sync called.");
 
 1094      Error(
"SysStat", 
"SysStat is not possible because object is" 
 1095            " in 'zombie' state");
 
 1102         Info(
"SysStat", 
"calling TNetFile::SysStat");
 
 1108   struct XrdClientStatInfo stinfo;
 
 1110      *
id = (
Long_t)(stinfo.id);
 
 1112      *flags = (
Long_t)(stinfo.flags);
 
 1113      *modtime = (
Long_t)(stinfo.modtime);
 
 1115         Info(
"SysStat", 
"got stats = %ld %lld %ld %ld",
 
 1116                         *
id, *
size, *flags, *modtime);
 
 1120         if (!
IsOpen()) 
Info(
"SysStat", 
"could not stat remote file. Not opened.");
 
 1122            Info(
"SysStat", 
"could not stat remote file");
 
 1140      Error(
"SysClose", 
"SysClose is not possible because object is" 
 1141            " in 'zombie' state");
 
 1147         Info(
"SysClose",
"Calling TNetFile::SysClose");
 
 1165         Info(
"SysOpen", 
"Calling TNetFile::SysOpen");
 
 1196   if (allowRE.
Length() > 0)
 
 1206   if (allowCO.
Length() > 0)
 
 1280   if (socks4Port > 0) {
 
 1283         socks4Host = 
"127.0.0.1";
 
 1288   const char *cenv = 0;
 
 1292   if (autolog.
Length() > 0 &&
 
 1293      (!(cenv = 
gSystem->
Getenv(
"XrdSecPWDAUTOLOG")) || strlen(cenv) <= 0))
 
 1302   if (alogfile.
Length() > 0)
 
 1306   if (verisrv.
Length() > 0 &&
 
 1307      (!(cenv = 
gSystem->
Getenv(
"XrdSecPWDVERIFYSRV")) || strlen(cenv) <= 0))
 
 1344   if (deplen.
Length() > 0 &&
 
 1345      (!(cenv = 
gSystem->
Getenv(
"XrdSecGSIPROXYDEPLEN")) || strlen(cenv) <= 0))
 
 1349   if (pxybits.
Length() > 0)
 
 1353   if (crlcheck.
Length() > 0 &&
 
 1354      (!(cenv = 
gSystem->
Getenv(
"XrdSecGSICRLCHECK")) || strlen(cenv) <= 0))
 
 1358   if (delegpxy.
Length() > 0 &&
 
 1359      (!(cenv = 
gSystem->
Getenv(
"XrdSecGSIDELEGPROXY")) || strlen(cenv) <= 0))
 
 1363   if (signpxy.
Length() > 0 &&
 
 1364      (!(cenv = 
gSystem->
Getenv(
"XrdSecGSISIGNPROXY")) || strlen(cenv) <= 0))
 
 1381   Long64_t bytessubmitted, byteshit, misscount, readreqcnt;
 
 1382   Float_t  missrate, bytesusefulness;
 
 1385                             byteshit, misscount,
 
 1386                             missrate, readreqcnt,
 
 1387                             bytesusefulness) ) {
 
 1393         newbsz = std::max(newbsz, 
size);
 
 1410      fClient->RemoveAllDataFromCache();
 
 1419   Long64_t bytessubmitted, byteshit, misscount, readreqcnt;
 
 1420   Float_t  missrate, bytesusefulness;
 
 1423                                        byteshit, misscount,
 
 1424                                        missrate, readreqcnt,
 
 1435   Printf(
"TXNetFile caching information:");
 
 1438   Long64_t bytessubmitted, byteshit, misscount, readreqcnt;
 
 1439   Float_t  missrate, bytesusefulness;
 
 1442                                        byteshit, misscount,
 
 1443                                        missrate, readreqcnt,
 
 1446      Printf(
" Bytes submitted:           %lld", bytessubmitted);
 
 1447      Printf(
" Bytes hit (estimation):    %lld", byteshit);
 
 1448      Printf(
" Miss count:                %lld", misscount);
 
 1449      Printf(
" Miss rate:                 %f",   missrate);
 
 1450      Printf(
" Read requests count:       %lld", readreqcnt);
 
 1451      Printf(
" Bytes usefulness:          %f\n", bytesusefulness);
 
 1453      Printf(
" -- No Xrd client instance allocated --\n");
 
UShort_t net2host(UShort_t x)
 
static void update(gsl_integration_workspace *workspace, double a1, double b1, double area1, double error1, double a2, double b2, double area2, double error2)
 
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
 
void Info(const char *location, const char *msgfmt,...)
Use this function for informational messages.
 
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
 
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
 
winID h TVirtualViewer3D TVirtualGLPainter p
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t np
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t result
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t len
 
Option_t Option_t TPoint TPoint const char mode
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t bytes
 
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
 
void Printf(const char *fmt,...)
Formats a string in a circular formatting buffer and prints the string.
 
R__EXTERN TSystem * gSystem
 
R__EXTERN TVirtualMonitoringWriter * gMonitoringWriter
 
#define NAME_TRANSACTIONTIMEOUT
 
#define NAME_CONNECTTIMEOUT
 
#define DFLT_REQUESTTIMEOUT
 
#define NAME_READCACHESIZE
 
#define NAME_REQUESTTIMEOUT
 
#define DFLT_DFLTTCPWINDOWSIZE
 
#define DFLT_FIRSTCONNECTMAXCNT
 
#define DFLT_MAXREDIRECTCOUNT
 
#define NAME_REDIRDOMAINDENY_RE
 
#define NAME_MAXREDIRECTCOUNT
 
#define NAME_FIRSTCONNECTMAXCNT
 
#define DFLT_TRANSACTIONTIMEOUT
 
#define NAME_RECONNECTWAIT
 
#define NAME_REDIRDOMAINALLOW_RE
 
#define DFLT_READAHEADSIZE
 
#define NAME_DFLTTCPWINDOWSIZE
 
#define NAME_CONNECTDOMAINDENY_RE
 
#define NAME_READAHEADSIZE
 
#define NAME_MULTISTREAMCNT
 
#define NAME_CONNECTDOMAINALLOW_RE
 
#define DFLT_READCACHESIZE
 
#define DFLT_CONNECTTIMEOUT
 
#define NAME_KEEPSOCKOPENIFNOTXRD
 
#define DFLT_MULTISTREAMCNT
 
#define DFLT_RECONNECTWAIT
 
#define EnvPutInt(name, val)
 
#define EnvPutString(name, val)
 
#define XrdSysMutexHelper
 
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
 
Bool_t fWritable
True if directory is writable.
 
Int_t GetBufferSize() const override
Return the buffer size to create new TKeys.
 
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
 
A cache when reading files over the network.
 
virtual Bool_t Matches(const char *s)
 
virtual Bool_t IsStaged(const char *)
Just check if the file exists locally.
 
static TFileStager * Open(const char *stager)
Open a stager, after having loaded the relevant plug-in.
 
static std::atomic< Long64_t > fgBytesRead
Number of bytes read by all TFile objects.
 
Int_t fReadCalls
Number of read calls ( not counting the cache calls )
 
static void SetFileBytesWritten(Long64_t bytes=0)
 
Long64_t fBytesRead
Number of bytes read from this file.
 
static Bool_t GetOnlyStaged()
Returns staged only flag.
 
virtual Int_t ReOpen(Option_t *mode)
Reopen a file with a different access mode.
 
static Long64_t GetFileBytesWritten()
Static function returning the total number of bytes written to all files.
 
static void SetFileBytesRead(Long64_t bytes=0)
 
TList * fOpenPhases
!Time info about open phases
 
static void SetFileReadCalls(Int_t readcalls=0)
 
void Print(Option_t *option="") const override
Print all objects in the file.
 
static UInt_t GetOpenTimeout()
Returns open timeout (in ms).
 
Int_t WriteBufferViaCache(const char *buf, Int_t len)
Write buffer via cache.
 
static Long64_t GetFileBytesRead()
Static function returning the total number of bytes read from all files.
 
Int_t ReadBufferViaCache(char *buf, Int_t len)
Read buffer via cache.
 
virtual Bool_t ReadBuffers(char *buf, Long64_t *pos, Int_t *len, Int_t nbuf)
Read the nbuf blocks described in arrays pos and len.
 
Long64_t fArchiveOffset
!Offset at which file starts in archive
 
virtual void Init(Bool_t create)
Initialize a TFile object.
 
TString fOption
File options.
 
EAsyncOpenStatus
Asynchronous open request status.
 
Bool_t FlushWriteCache()
Flush the write cache if active.
 
Long64_t fBytesWrite
Number of bytes written to this file.
 
Bool_t fInitDone
!True if the file has been initialized
 
Long64_t fOffset
!Seek offset cache
 
static std::atomic< Long64_t > fgBytesWrite
Number of bytes written by all TFile objects.
 
EAsyncOpenStatus fAsyncOpenStatus
!Status of an asynchronous open request
 
void Close(Option_t *option="") override
Close a file.
 
static std::atomic< Int_t > fgReadCalls
Number of bytes read from all TFile objects.
 
static Int_t GetFileReadCalls()
Static function returning the total number of read calls from all files.
 
TFileCacheRead * GetCacheRead(const TObject *tree=nullptr) const
Return a pointer to the current read cache.
 
A TNetFile is like a normal TFile except that it reads and writes its data via a rootd server (for mo...
 
void Init(Bool_t create) override
Initialize a TNetFile object.
 
Bool_t ReadBuffer(char *buf, Int_t len) override
Read specified byte range from remote file via rootd daemon.
 
Bool_t WriteBuffer(const char *buf, Int_t len) override
Write specified byte range to remote file via rootd daemon.
 
virtual void Create(const char *url, Option_t *option, Int_t netopt)
Create a NetFile object.
 
Int_t SysStat(Int_t fd, Long_t *id, Long64_t *size, Long_t *flags, Long_t *modtime) override
Return file stat information.
 
Int_t SysClose(Int_t fd) override
Close currently open file.
 
Bool_t IsOpen() const override
Retruns kTRUE if file is open, kFALSE otherwise.
 
Int_t ReOpen(Option_t *mode) override
Reopen a file with a different access mode, like from READ to UPDATE or from NEW, CREATE,...
 
Bool_t ReadBuffers(char *buf, Long64_t *pos, Int_t *len, Int_t nbuf) override
Read a list of buffers given in pos[] and len[] and return it in a single buffer.
 
void Flush() override
Flush file to disk.
 
void Close(Option_t *option="") override
Close remote file.
 
Int_t SysOpen(const char *pathname, Int_t flags, UInt_t mode) override
Open a remote file. Requires fOption to be set correctly.
 
R__ALWAYS_INLINE Bool_t IsZombie() const
 
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
 
virtual Int_t SetOption(ESockOptions opt, Int_t val)
Set socket options.
 
void SetServType(Int_t st)
 
void SetRemoteProtocol(Int_t rproto)
 
static Int_t GetClientProtocol()
Static method returning supported client protocol.
 
void SetService(const char *service)
 
void SetUrl(const char *url)
 
TInetAddress GetInetAddress() const
 
virtual Int_t RecvRaw(void *buffer, Int_t length, ESendRecvOptions opt=kDefault)
Receive a raw buffer of specified length bytes.
 
virtual Int_t SendRaw(const void *buffer, Int_t length, ESendRecvOptions opt=kDefault)
Send a raw buffer of specified length.
 
Int_t Atoi() const
Return integer value of string.
 
const char * Data() const
 
Bool_t IsDigit() const
Returns true if all characters in string are digits (0-9) or white spaces, i.e.
 
void ToUpper()
Change string to upper case.
 
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
 
TString & Remove(Ssiz_t pos)
 
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
 
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
 
virtual const char * Getenv(const char *env)
Get environment variable.
 
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
 
virtual void IgnoreSignal(ESignals sig, Bool_t ignore=kTRUE)
If ignore is true ignore the specified signal, else restore previous behaviour.
 
virtual void Setenv(const char *name, const char *value)
Set environment variable.
 
virtual const char * HomeDirectory(const char *userName=nullptr)
Return the user's home directory.
 
virtual void Abort(int code=0)
Abort the application.
 
The TTimeStamp encapsulates seconds and ns since EPOCH.
 
This class represents a WWW compatible URL.
 
const char * GetUrl(Bool_t withDeflt=kFALSE) const
Return full URL.
 
void SetAnchor(const char *anchor)
 
const char * GetUser() const
 
const char * GetHost() const
 
const char * GetHostFQDN() const
Return fully qualified domain name of url host.
 
const char * GetOptions() const
 
virtual Bool_t SendFileOpenProgress(TFile *, TList *, const char *, Bool_t=kFALSE)
 
virtual Bool_t SendFileReadProgress(TFile *)
 
TXNetFile is an extension of TNetFile able to deal with new xrootd server.
 
Int_t ParseOptions(const char *opts, Int_t &cachesz, Int_t &readaheadsz, Int_t &rmpolicy, Int_t &mxredir, Int_t &rastrategy, Int_t &readtrimblksz)
Parse input options for cache parameters.
 
virtual void Print(Option_t *option="") const
Print the local statistics.
 
void SynchronizeCacheSize()
Synchronize the cache size Alternative purging policy.
 
static TFileStager * fgFileStager
 
Int_t SysStat(Int_t fd, Long_t *id, Long64_t *size, Long_t *flags, Long_t *modtime)
Override TNetFile::SysStat (see parent's method for more details).
 
virtual Bool_t ReadBuffers(char *buf, Long64_t *pos, Int_t *len, Int_t nbuf)
Read the nbuf blocks described in arrays pos and len, where pos[i] is the seek position of block i of...
 
virtual Int_t ReOpen(const Option_t *mode)
Re-open the file (see TNetFile::ReOpen() or TFile::ReOpen() for more details).
 
virtual ~TXNetFile()
Destructor.
 
void Init(Bool_t create)
Initialize the file.
 
static void SetEnv()
Set the relevant environment variables.
 
virtual void ResetCache()
Reset the cache.
 
static void FormUrl(TUrl uut, TString &uu)
Form url for rootd socket.
 
Int_t SysOpen(const char *pathname, Int_t flags, UInt_t mode)
Override TNetFile::SysOpen (see parent's method for more details).
 
virtual Bool_t ReadBuffer(char *buf, Int_t len)
Override TNetFile::ReadBuffer to deal with the xrootd server.
 
virtual Bool_t ReadBufferAsync(Long64_t offs, Int_t len)
Implementation dealing with the xrootd server.
 
virtual Bool_t WriteBuffer(const char *buffer, Int_t BufferLength)
Override TNetFile::WriteBuffer to deal with the xrootd server.
 
virtual void Close(const Option_t *opt="")
Close the file (see TNetFile::Close() or TFile::Close() for more details).
 
virtual Int_t GetBytesToPrefetch() const
Max number of bytes to prefetch.
 
void CreateXClient(const char *url, Option_t *option, Int_t netopt, Bool_t parallelopen)
The real creation work is done here.
 
virtual void Flush()
Flushes un-written data.
 
Int_t SysClose(Int_t fd)
Override TNetFile::SysClose (see parent's method for more details).
 
Bool_t Open(Option_t *option, Bool_t parallelopen)
The real creation work is done here.
 
virtual Bool_t IsOpen() const
Return kTRUE if the file is open, kFALSE otherwise.
 
static Int_t GetRootdProtocol(TSocket *s)
Find out the remote rootd protocol version.
 
virtual TFile::EAsyncOpenStatus GetAsyncOpenStatus()
Return status of asynchronous request.