// @(#)root/netx:$Id$
// Author: Alvise Dorigo, Fabrizio Furano

/*************************************************************************
 * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TXNetFile                                                            //
//                                                                      //
// Authors: Alvise Dorigo, Fabrizio Furano                              //
//          INFN Padova, 2003                                           //
// Interfaced to the standalone client (XrdClient): G. Ganis, CERN      //
//                                                                      //
// TXNetFile is an extension of TNetFile able to deal with new xrootd   //
// server. Its new features are:                                        //
//  - Automatic server kind recognition (xrootd load balancer, xrootd   //
//    data server, old rootd)                                           //
//  - Backward compatibility with old rootd server (acts as an old      //
//    TNetFile)                                                         //
//  - Fault tolerance for read/write operations (read/write timeouts    //
//    and retry)                                                        //
//  - Internal connection timeout (tunable indipendently from the OS    //
//    one) handled by threads                                           //
//  - handling of redirections from server                              //
//  - Single TCP physical channel for multiple TXNetFile's instances    //
//    inside the same application                                       //
//    So, each TXNetFile object client must send messages containing    //
//    its ID (streamid). The server, of course, will respond with       //
//    messages containing the client's ID, in order to make the client  //
//    able to recognize its message by matching its streamid with that  //
//    one contained in the server's response.                           //
//  - Tunable log verbosity level (0 = nothing, 3 = dump read/write     //
//    buffers too!)                                                     //
//  - Many parameters configurable via TEnv facility (see SetParm()     //
//    methods)                                                          //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#include "Bytes.h"

#include "TError.h"
#include "TEnv.h"
#include "TSocket.h"
#include "TXNetFile.h"
#include "TROOT.h"
#include "TVirtualMonitoring.h"
#include "TFileStager.h"
#include "TFileCacheRead.h"
#include "TTimeStamp.h"
#include "TVirtualPerfStats.h"

#include <XrdClient/XrdClient.hh>
#include <XrdClient/XrdClientConn.hh>
#include <XrdClient/XrdClientConst.hh>
#include <XrdClient/XrdClientEnv.hh>
#include <XProtocol/XProtocol.hh>

#include "XpdSysPthread.h"
#include "XrdSysToOuc.h"

ClassImp(TXNetFile);

Bool_t TXNetFile::fgInitDone = kFALSE;
Bool_t TXNetFile::fgRootdBC = kTRUE;
TFileStager *TXNetFile::fgFileStager = 0;

//_____________________________________________________________________________
TXNetFile::TXNetFile(const char *url, Option_t *option, const char* ftitle,
                     Int_t compress, Int_t netopt, Bool_t parallelopen,
                     const char *logicalurl) :
            TNetFile((logicalurl ? logicalurl : url), ftitle, compress, kFALSE)
{
   // Create a TXNetFile object. A TXNetFile object is the same as a TNetFile
   // (from which the former derives) except that the protocol is extended to
   // support dealing with new xrootd data server or xrootd load balancer
   // server.
   //
   // The "url" argument must be of the form
   //
   //   root://server1:port1[,server2:port2,...,serverN:portN]/pathfile,
   //
   // Note that this means that multiple servers (>= 1) can be specified in
   // the url. The connection will try to connect to the first server:port
   // and if that does not succeed, it will try the second one, and so on
   // until it finds a server that will respond.
   //
   // See the TNetFile documentation for the description of the other arguments.
   //
   // The creation consists of internal variable settings (most important is
   // the client's domain), creation of a TXUrl array containing all specified
   // urls (a single url is serverX:portX/pathfile), trying to connect to the
   // servers calling Connect() method, getting a valid access to the remote
   // server the client is connected to using GetAccessToSrv() method,
   // recognizing the remote server (if an old rootd the TNetFile's Create
   // method will be called).
   //
   // The options field of the URL can be used for the following purposes:
   //   a. open a non-ROOT generic file
   //      "root://server1:port1[,server2:port2,...]/pathfile?filetype=raw"
   //   b. re-check the environment variables
   //      "root://server1:port1[,server2:port2,...]/pathfile?checkenv"
   //   c. set the cache size (in bytes)
   //      "root://server1:port1[,server2:port2,...]/pathfile?cachesz=20000000"
   //   d. set the read-ahead size (in bytes)
   //      "root://server1:port1[,server2:port2,...]/pathfile?readaheadsz=100000"
   //   e. set the cache remove policy
   //      "root://server1:port1[,server2:port2,...]/pathfile?rmpolicy=1"
   //   f. set the max number of redirections
   //      "root://server1:port1[,server2:port2,...]/pathfile?mxredir=2"
   // (multiple options can be set concurrently)
   TUrl urlnoanchor(url);
   // Set debug level
   EnvPutInt(NAME_DEBUG, gEnv->GetValue("XNet.Debug", 0));

   // Set environment, if needed
   if (!fgInitDone || strstr(urlnoanchor.GetOptions(),"checkenv")) {
      SetEnv();
      fgInitDone = kTRUE;

      // Print the tag, if required (only once)
      if (gEnv->GetValue("XNet.PrintTAG",0) == 1)
         Info("TXNetFile","(eXtended TNetFile) %s",
              gROOT->GetVersion());
   }

   // Remove anchors from the URL!
   urlnoanchor.SetAnchor("");

   // Init mutex used in the asynchronous open machinery
   fInitMtx = (void *) new XrdSysRecMutex();

   if (gMonitoringWriter) {
      // Init the monitoring system
      if (!fOpenPhases) {
         fOpenPhases = new TList;
         fOpenPhases->SetOwner();
      }
      // Should not be null instead of "xrdopen" to init the thing ?
      gMonitoringWriter->SendFileOpenProgress(this, fOpenPhases, "xrdopen", kFALSE);
   }

   // Create an instance
   CreateXClient(urlnoanchor.GetUrl(), option, netopt, parallelopen);
}

//_____________________________________________________________________________
TXNetFile::~TXNetFile()
{
   // Destructor.

   if (IsOpen())
      Close(0);

   SafeDelete(fClient);
   XrdSysRecMutex *mtx = (XrdSysRecMutex *)fInitMtx;
   if (mtx) delete mtx;
   fInitMtx = 0;
}

//_____________________________________________________________________________
void TXNetFile::FormUrl(TUrl uu, TString &uus)
{
   // Form url for rootd socket.

   // Protocol
   uus = "root://";

   // User, if any
   if (strlen(uu.GetUser()) > 0) {
      uus += uu.GetUser();
      uus += "@";
   }

   // Host, if any
   if (strlen(uu.GetHost()) > 0) {
      uus += uu.GetHost();
   }

   // Port, if any
   if (uu.GetPort() > 0) {
      uus += ":";
      uus += uu.GetPort();
   }

   // End of string
   uus += "/";
}

//_____________________________________________________________________________
Int_t TXNetFile::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
   static const char *keys[6] = { "cachesz=", "readaheadsz=", "rmpolicy=",
                                  "mxredir=", "readaheadstrategy=", "readtrimblksz=" };
   Int_t fo = 0;
   TString s(opts);

   UInt_t i = 0;
   for (i = 0; i < (sizeof(keys)/sizeof(keys[0])); i++) {
      Int_t j = s.Index(keys[i]);
      if (j != kNPOS) {
         TString val(s(j+strlen(keys[i]), s.Length()));
         // Cut of non digits
         Int_t k = 0;
         while (k < val.Length())
            if (!TString(val(k++)).IsDigit())
               break;
         if (k < val.Length())
            val.Remove(--k);
         if (val.IsDigit()) {
            fo++;
            if (i == 0)
               cachesz = val.Atoi();
            else if (i == 1)
               readaheadsz = val.Atoi();
            else if (i == 2)
               rmpolicy = val.Atoi();
            else if (i == 3)
               mxredir = val.Atoi();
            else if (i == 4)
               rastrategy = val.Atoi();
            else if (i == 5)
               readtrimblksz = val.Atoi();
         }
      }
   }

   // Notify
   if (gDebug > 0)
      Info("ParseCacheOptions","found: cachesz = %d, readaheadsz = %d, "
           "rmpolicy = %d, mxredir = %d, rastrategy = %d, readtrimblksz = %d",
           cachesz, readaheadsz, rmpolicy, mxredir, rastrategy, readtrimblksz);

   // Done
   return fo;
}

//_____________________________________________________________________________
void TXNetFile::CreateXClient(const char *url, Option_t *option, Int_t netopt,
                              Bool_t parallelopen)
{
   // The real creation work is done here.

   Int_t cachesz = -1, readaheadsz = -1, rmpolicy = -1, mxredir = -1, np = 0;
   Int_t readaheadstrategy = -1, readtrimblksz = -1;

   fClient = 0;
   fNetopt = netopt;

   // Set the timeout (default 999999999 secs, i.e. far, far in the future)
   gSystem->Setenv("XRDCLIENTMAXWAIT", Form("%d",TFile::GetOpenTimeout()));

   if (GetOnlyStaged()) {
      // Check if the file is staged before opening it
      if (!fgFileStager || !(fgFileStager->Matches(url))) {
         SafeDelete(fgFileStager);
         fgFileStager = TFileStager::Open(url);
      }
      if (fgFileStager) {
         if (!(fgFileStager->IsStaged(url))) {
            ::Warning("TXNetFile","<%s> is not staged - StageOnly flag is set!",url);
            goto zombie;
         }
      }
   }

   // Init members
   fIsRootd = kFALSE;

   // The parallel open can be forced to true in the config
   if (gEnv->GetValue("XNet.ForceParallelOpen", 0))
      parallelopen = kTRUE;
   fAsyncOpenStatus = (parallelopen) ? kAOSInProgress : fAsyncOpenStatus ;

   Bool_t isRootd;
   isRootd = kFALSE;
   //
   // Setup a client instance
   fClient = new XrdClient(url);
   if (!fClient) {
      fAsyncOpenStatus = (parallelopen) ? kAOSFailure : fAsyncOpenStatus ;
      Error("CreateXClient","fatal error: new object creation failed -"
            " out of system resources.");
      gSystem->Abort();
      goto zombie;
   }

   // Get client (cache, redir) parameters, if any
   np = ParseOptions(TUrl(url).GetOptions(),
                     cachesz, readaheadsz, rmpolicy, mxredir,
                     readaheadstrategy, readtrimblksz);

   // Set max redir, if asked
   if (mxredir > 0) {
      if (fClient->GetClientConn()) {
         if (gDebug > 0)
            Info("CreateXClient", "setting maxredir = %d", mxredir);
         fClient->GetClientConn()->SetMaxRedirCnt(mxredir);
      }
      np--;
   }
   // Set the cache parameters, if any
   if (np > 0) {
      if (gDebug > 0)
         Info("CreateXClient", "setting cachesz = %d, readaheadsz = %d, "
                               "rmpolicy = %d",
                               cachesz, readaheadsz, rmpolicy);
      fClient->SetCacheParameters(cachesz, readaheadsz, rmpolicy);

      if (readaheadstrategy >= 0) {
         if (gDebug > 0)
            Info("CreateXClient", "setting readaheadstrategy = %d", readaheadstrategy);
         fClient->SetReadAheadStrategy(readaheadstrategy);
      }

      if (readtrimblksz >= 0) {
         if (gDebug > 0)
            Info("CreateXClient", "setting readtrimblksz = %d", readtrimblksz);
         fClient->SetBlockReadTrimming(readtrimblksz);
      }

   }

   //
   // Now try opening the file
   if (!Open(option, parallelopen)) {
      if (!fClient->IsOpen_wait()) {
         if (gDebug > 1)
            Info("CreateXClient", "remote file could not be open");

         // If the server is a rootd we need to create a TNetFile
         isRootd = (fClient->GetClientConn()->GetServerType() == kSTRootd);

         if (isRootd) {
            if (fgRootdBC) {

               Int_t sd = fClient->GetClientConn()->GetOpenSockFD();
               if (sd > -1) {
                  //
                  // Create a TSocket on the open connection
                  TSocket *s = new TSocket(sd);

                  s->SetOption(kNoBlock, 0);

                  // Find out the remote protocol (send the client protocol first)
                  Int_t rproto = GetRootdProtocol(s);
                  if (rproto < 0) {
                     Error("CreateXClient", "getting rootd server protocol");
                     goto zombie;
                  }

                  // Finalize TSocket initialization
                  s->SetRemoteProtocol(rproto);
                  TUrl uut((fClient->GetClientConn()
                                   ->GetCurrentUrl()).GetUrl().c_str());
                  TString uu;
                  FormUrl(uut,uu);

                  if (gDebug > 2)
                     Info("CreateXClient"," url: %s",uu.Data());
                  s->SetUrl(uu.Data());
                  s->SetService("rootd");
                  s->SetServType(TSocket::kROOTD);
                  //
                  // Set rootd flag
                  fIsRootd = kTRUE;
                  //
                  // Now we can check if we can create a TNetFile on the
                  // open connection
                  if (rproto > 13) {
                     //
                     // Remote support for reuse of open connection
                     TNetFile::Create(s, option, netopt);
                  } else {
                     //
                     // Open connection has been closed because could
                     // not be reused; TNetFile will open a new connection
                     TNetFile::Create(uu.Data(), option, netopt);
                  }

                  return;
               } else {
                  Error("CreateXClient", "rootd: underlying socket undefined");
                  goto zombie;
               }
            } else {
               if (gDebug > 0)
                  Info("CreateXClient", "rootd: fall back not enabled - closing");
               goto zombie;
            }
         } else {
            Error("CreateXClient", "open attempt failed on %s", fUrl.GetUrl());
            goto zombie;
         }
      }
   }

   return;

zombie:
   // error in file opening occured, make this object a zombie
   SafeDelete(fClient);
   MakeZombie();
   gDirectory = gROOT;
}

//_____________________________________________________________________________
Int_t TXNetFile::GetRootdProtocol(TSocket *s)
{
   // Find out the remote rootd protocol version.
   // Returns -1 in case of error.

   Int_t rproto = -1;

   UInt_t cproto = 0;
   Int_t len = sizeof(cproto);
   memcpy((char *)&cproto,
      Form(" %d", TSocket::GetClientProtocol()),len);
   Int_t ns = s->SendRaw(&cproto, len);
   if (ns != len) {
      ::Error("TXNetFile::GetRootdProtocol",
              "sending %d bytes to rootd server [%s:%d]",
              len, (s->GetInetAddress()).GetHostName(), s->GetPort());
      return -1;
   }

   // Get the remote protocol
   Int_t ibuf[2] = {0};
   len = sizeof(ibuf);
   Int_t nr = s->RecvRaw(ibuf, len);
   if (nr != len) {
      ::Error("TXNetFile::GetRootdProtocol",
              "reading %d bytes from rootd server [%s:%d]",
              len, (s->GetInetAddress()).GetHostName(), s->GetPort());
      return -1;
   }
   Int_t kind = net2host(ibuf[0]);
   if (kind == kROOTD_PROTOCOL) {
      rproto = net2host(ibuf[1]);
   } else {
      kind = net2host(ibuf[1]);
      if (kind == kROOTD_PROTOCOL) {
         len = sizeof(rproto);
         nr = s->RecvRaw(&rproto, len);
         if (nr != len) {
            ::Error("TXNetFile::GetRootdProtocol",
                    "reading %d bytes from rootd server [%s:%d]",
                    len, (s->GetInetAddress()).GetHostName(), s->GetPort());
            return -1;
         }
         rproto = net2host(rproto);
      }
   }
   if (gDebug > 2)
      ::Info("TXNetFile::GetRootdProtocol",
             "remote rootd: buf1: %d, buf2: %d rproto: %d",
             net2host(ibuf[0]),net2host(ibuf[1]),rproto);

   // We are done
   return rproto;
}

//_____________________________________________________________________________
Bool_t TXNetFile::Open(Option_t *option, Bool_t doitparallel)
{
   // The real creation work is done here.

   //
   // Parse options
   kXR_unt16 openOpt = 0;
   memset(&openOpt, 0, sizeof(openOpt));
   TString opt = option;
   opt.ToUpper();
   //
   // Check force, accepting 'f'/'F' for backward compatibility,
   // and special read syntax
   if (opt.BeginsWith("-") || opt.BeginsWith("F") || (opt == "+READ")) {
      opt.Remove(0,1);
      openOpt |= kXR_force;
   }
   //
   // Read flag
   Bool_t read = (opt == "READ");
   //
   // Create flag ("NEW" == "CREATE")
   Bool_t create = (opt == "CREATE" || opt == "NEW");
   //
   // Recreate flag
   Bool_t recreate = (opt == "RECREATE");
   //
   // Update flag
   Bool_t update = (opt == "UPDATE");
   //
   // Default is Read
   if (!create && !recreate && !update && !read) {
      read = kTRUE;
      opt = "READ";
   }
   //
   // Save effective options
   fOption = opt;
   if (create || update || recreate)
      fWritable = 1;
   //
   // Update requires the file existing: check that and switch to create,
   // if the file is not found.
   if (update) {
      if (gSystem->AccessPathName(fUrl.GetUrl(), kFileExists)) {
         update = kFALSE;
         create = kTRUE;
      }
      if (update) {
         if (gSystem->AccessPathName(fUrl.GetUrl(), kWritePermission)) {
            Error("Open", "no write permission, could not open file %s",
                          fUrl.GetUrl());
            fAsyncOpenStatus = (doitparallel) ? kAOSFailure : fAsyncOpenStatus ;
            return kFALSE;
         }
         openOpt |= kXR_open_updt;
      }
   }

   //
   // Create and Recreate are correlated
   if (create)
      openOpt |= kXR_new;
   if (recreate) {
      openOpt |= kXR_delete;
      create = kTRUE;
   }

   Bool_t mkpath = (gEnv->GetValue("XNet.Mkpath", 0) == 1) ? kTRUE : kFALSE;
   char *p = (char*)strstr(fUrl.GetOptions(), "mkpath=");
   if (p)
     mkpath = (*(p + strlen("mkpath=")) == '1') ? kTRUE : kFALSE;
   if (mkpath)
     openOpt |= kXR_mkpath;

   if (read)
      openOpt |= kXR_open_read;

   //
   // Set open mode to rw-r-r
   kXR_unt16 openMode = kXR_or | kXR_gr | kXR_ur | kXR_uw;

   //
   // Open file (FileOpenerThread disabled for the time being)
   if (!fClient->Open(openMode, openOpt, doitparallel)) {
      if (gDebug > 1)
         Info("Open", "remote file could not be open");
      fAsyncOpenStatus = (doitparallel) ? kAOSFailure : fAsyncOpenStatus ;
      return kFALSE;
   } else {
      // Initialize the file
      // If we are using the parallel open, the init phase is
      // performed later. In checking for the IsOpen or
      // asynchronously in a callback func
      if (!doitparallel) {
         // Mutex serialization is done inside
         Init(create);
         // If initialization failed close everything
         if (TFile::IsZombie()) {
            fClient->Close();
            // To avoid problems in final deletion of object not completely
            // initialized
            fWritable = 0;
            // Notify failure
            return kFALSE;
         }
      }
   }

   // We are done
   return kTRUE;
}

//_____________________________________________________________________________
Bool_t TXNetFile::ReadBuffer(char *buffer, Int_t bufferLength)
{
   // Override TNetFile::ReadBuffer to deal with the xrootd server.
   // Returns kTRUE in case of errors.

   if (IsZombie()) {
      Error("ReadBuffer", "ReadBuffer is not possible because object"
            " is in 'zombie' state");
      return kTRUE;
   }

   if (fIsRootd) {
      if (gDebug > 1)
         Info("ReadBuffer","Calling TNetFile::ReadBuffer");
      return TNetFile::ReadBuffer(buffer, bufferLength);
   }

   if (!IsOpen()) {
      Error("ReadBuffer","The remote file is not open");
      return kTRUE;
   }

   Bool_t result = kFALSE;

   if (bufferLength==0)
      return 0;

   // This returns:
   //  2 if errors
   //  1 it looks like the block has already been prefetched
   //  0 it looks like the block has not been prefetched
   // But we don't want it to return the buffer, to avoid recursion
   Int_t st = 0;

   //using the new method to read
   if (GetCacheRead() && GetCacheRead()->IsEnablePrefetching()) {
      st = ReadBufferViaCache(buffer, bufferLength);   //modify to "buffer" so that it work with the ne version!!!
      if (st == 1){
         fOffset -= bufferLength;
         return kFALSE;
      }
   }
   else{ //using the old method to read
   if (GetCacheRead() && GetCacheRead()->IsAsyncReading()) {
      st = ReadBufferViaCache(0, bufferLength);
      if (st == 1)
         fOffset -= bufferLength;
   } else {
      if (GetCacheRead()) {
         st = ReadBufferViaCache(buffer, bufferLength);
         if (st == 1)
            return kFALSE;
      }
   }
   }

   Double_t start = 0;
   if (gPerfStats) start = TTimeStamp();

   // Read from the remote xrootd
   Int_t nr = fClient->Read(buffer, fOffset, bufferLength);

   if (!nr)
      return kTRUE;

   if (gDebug > 1)
      Info("ReadBuffer", "%d bytes of data read from offset"
                         " %lld (%d requested)", nr, fOffset, bufferLength);

   fOffset += bufferLength;

     fBytesRead += nr;
     fReadCalls++;
#ifdef WIN32
     SetFileBytesRead(GetFileBytesRead() + nr);
     SetFileReadCalls(GetFileReadCalls() + 1);
#else
     fgBytesRead += nr;
     fgReadCalls++;
#endif

     if (gPerfStats)
        gPerfStats->FileReadEvent(this, bufferLength, start);

   if (gMonitoringWriter)
      gMonitoringWriter->SendFileReadProgress(this);

   return result;
}

//_____________________________________________________________________________
Bool_t TXNetFile::ReadBuffer(char *buffer, Long64_t pos, Int_t bufferLength)
{
   // Pass through to TNetFile implementation which will call back eventually
   // to our ReadBuffer with 2 arguments to deal with xrootd errors.

   return TNetFile::ReadBuffer(buffer, pos, bufferLength);
}

//______________________________________________________________________________
Bool_t TXNetFile::ReadBufferAsync(Long64_t offs, Int_t bufferLength)
{
   // Implementation dealing with the xrootd server.
   // Returns kTRUE in case of errors.
   // This is the same as TXNetFile::ReadBuffer but using the async
   // call from xrootd

   if (IsZombie()) {
      Error("ReadBuffer", "ReadBuffer is not possible because object"
            " is in 'zombie' state");
      return kTRUE;
   }

   if (fIsRootd) {
      if (gDebug > 1)
         Error("ReadBufferAsync","Not supported for rootd");
      return kTRUE;
   }

   if (!IsOpen()) {
      Error("ReadBuffer","The remote file is not open");
      return kTRUE;
   }

   Double_t start = 0;
   if (gPerfStats) start = TTimeStamp();

   Bool_t result = kFALSE;

   if (bufferLength==0)
      return 0;

   SynchronizeCacheSize();

   // Read for the remote xrootd
   // This doesnt return the number of bytes read...
   // and even if it did we dont want to update fBytesRead
   // because that would be updated in the real read
   XReqErrorType nr = fClient->Read_Async(offs+fArchiveOffset, bufferLength);

   if (nr != kOK)
      return kTRUE;

   fBytesRead += bufferLength;
   fReadCalls++;
#ifdef WIN32
   SetFileBytesRead(GetFileBytesRead() + bufferLength);
   SetFileReadCalls(GetFileReadCalls() + 1);
#else
   fgBytesRead += bufferLength;
   fgReadCalls++;
#endif

   if (gPerfStats)
      gPerfStats->FileReadEvent(this, bufferLength, start);

   if (gDebug > 1)
      Info("ReadBufferAsync", "%d bytes of data read request from offset"
                              " %lld", bufferLength, offs);
   return result;
}

//______________________________________________________________________________
Bool_t TXNetFile::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 length len[i].
   // Note that for nbuf=1, this call is equivalent to TFile::ReadBuffer
   // This function is overloaded by TNetFile, TWebFile, etc.
   // Returns kTRUE in case of failure.
   // Note: This is the overloading made in TXNetFile. If ReadBuffers
   // is supported by xrootd it will try to get the whole list from one single
   // call avoiding the latency of multiple calls

   if (IsZombie()) {
      Error("ReadBuffers", "ReadBuffers is not possible because object"
            " is in 'zombie' state");
      return kTRUE;
   }

   if (fIsRootd) {
      if (gDebug > 1)
         Info("ReadBuffers","Calling TNetFile::ReadBuffers");
      return TNetFile::ReadBuffers(buf, pos, len, nbuf);
   }

   if (!IsOpen()) {
      Error("ReadBuffers","The remote file is not open");
      return kTRUE;
   }

   Double_t start = 0;
   if (gPerfStats) start = TTimeStamp();

   if (fArchiveOffset) {
      for (Int_t i = 0; i < nbuf; i++)
         pos[i] += fArchiveOffset;
   }

   // A null buffer means that we want to use the async stuff
   //  hence we have to sync the cache size in XrdClient with the supposed
   //  size in TFile.
   if (!buf) {
      // Null buffer + 0 blocks means 'reset cache'
      if (!nbuf) ResetCache();
      SynchronizeCacheSize();
   }

   // Read for the remote xrootd
   Long64_t nr = fClient->ReadV(buf, pos, len, nbuf);

   if (gDebug > 1)
      Info("ReadBuffers", "response from ReadV(%d) nr: %lld", nbuf, nr);

   if (nr > 0) {

      if (gDebug > 1)
         Info("ReadBuffers", "%lld bytes of data read from a list of %d buffers",
              nr, nbuf);

      if (GetCacheRead() && GetCacheRead()->GetBufferSize() < nr)
         Info("ReadBuffers", "%lld bytes of data read with a smaller (%d) TFileCacheRead buffer size?",
              nr, GetCacheRead()->GetBufferSize());

      // Where should we leave the offset ?
      // fOffset += bufferLength;
      fBytesRead += nr;
      fReadCalls++;
#ifdef WIN32
      SetFileBytesRead(GetFileBytesRead() + nr);
      SetFileReadCalls(GetFileReadCalls() + 1);
#else
      fgBytesRead += nr;
      fgReadCalls++;
#endif

      if (gPerfStats) {
         fOffset = pos[0];
         gPerfStats->FileReadEvent(this, (Int_t)nr, start);
      }

      if (gMonitoringWriter)
         gMonitoringWriter->SendFileReadProgress(this);

      return kFALSE;
   }

   if (gDebug > 1)
      Info("ReadBuffers", "XrdClient->ReadV failed, executing TFile::ReadBuffers");

   // If it wasnt able to use the specialized call
   // then use the generic one that is a plain loop
   // of individual requests
   if (buf && nbuf)
      return TFile::ReadBuffers(buf, pos, len, nbuf);
   // If the async call was needed (buf == 0) and it got an error,
   // just return error
   else return kTRUE;
}

//_____________________________________________________________________________
Bool_t TXNetFile::WriteBuffer(const char *buffer, Int_t bufferLength)
{
   // Override TNetFile::WriteBuffer to deal with the xrootd server.
   // Returns kTRUE in case of errors.

   if (IsZombie()) {
      Error("WriteBuffer", "WriteBuffer is not possible because object"
            " is in 'zombie' state");
      return kTRUE;
   }

   if (!fWritable) {
      if (gDebug > 1)
         Info("WriteBuffer","file not writable");
      return kTRUE;
   }

   if (fIsRootd) {
      if (gDebug > 1)
         Info("WriteBuffer","Calling TNetFile::WriteBuffer");
      return TNetFile::WriteBuffer(buffer, bufferLength );
   }

   if (!IsOpen()) {
      Error("WriteBuffer","The remote file is not open");
      return kTRUE;
   }

   Int_t st;
   if ((st = WriteBufferViaCache(buffer, bufferLength))) {
      if (st == 2)
         return kTRUE;
      return kFALSE;
   }

   // Read for the remote xrootd
   if (!fClient->Write(buffer, fOffset, bufferLength)) {
      if (gDebug > 0)
         Info("WriteBuffer",
              "error writing %d bytes of data wrote to offset %lld",
              bufferLength , fOffset);
      return kTRUE;
   }

   if (gDebug > 1)
      Info("WriteBuffer", " %d bytes of data wrote to offset"
                         " %lld", bufferLength , fOffset);

   fOffset += bufferLength;
   fBytesWrite += bufferLength;
#ifdef WIN32
   SetFileBytesWritten(GetFileBytesWritten() + bufferLength);
#else
   fgBytesWrite += bufferLength;
#endif

   return kFALSE;
}

//_____________________________________________________________________________
void TXNetFile::Init(Bool_t create)
{
   // Initialize the file. Makes sure that the file is really open before
   // calling TFile::Init. It may block.

   if (fInitDone) {
      // TFile::Init already called once
      if (gDebug > 1)
         Info("Init","TFile::Init already called once");
      return;
   }

   if (fIsRootd) {
      if (gDebug > 1)
         Info("Init","rootd: calling directly TFile::Init");
      return TNetFile::Init(create);
   }

   if (fClient) {
      // A mutex serializes this very delicate section
      XrdSysMutexHelper m((XrdSysRecMutex *)fInitMtx);

      // To safely perform the Init() we must make sure that
      // the file is successfully open; this call may block
      if (fClient->IsOpen_wait()) {

         // Notify the monitoring system
         if (gMonitoringWriter)
            gMonitoringWriter->SendFileOpenProgress(this, fOpenPhases, "rootinit", kFALSE);

         // Avoid big transfers at this level
         bool usecachesave = fClient->UseCache(0);
         // Note that Init will trigger recursive calls
         TFile::Init(create);
         // so TFile::IsOpen() returns true when in TFile::~TFile
         fD = -2;
         // Restore requested behaviour
         fClient->UseCache(usecachesave);

            // Notify the monitoring system
         if (gMonitoringWriter)
            gMonitoringWriter->SendFileOpenProgress(this, fOpenPhases, "endopen", kTRUE);

         // Set the Endpoint Url we are now connected to. Unless there was some opaque info
         // which cannot be re-used
         if (fClient->GetClientConn() && fClient->GetClientConn()->fRedirOpaque.length() <= 0) {
            fEndpointUrl = fClient->GetClientConn()->GetCurrentUrl().GetUrl().c_str();
            // Check equivalence of initial and end-point Url to see whether we have
            // been redirected
            if (fEndpointUrl.GetPort() != fUrl.GetPort() ||
               strcmp(fEndpointUrl.GetHostFQDN(), fUrl.GetHostFQDN()))
               SetBit(TFile::kRedirected);
         }
      } else {
         if (gDebug > 0)
            Info("Init","open request failed!");
         SafeDelete(fClient);
         MakeZombie();
         gDirectory = gROOT;
      }
   }
}

//_____________________________________________________________________________
Bool_t TXNetFile::IsOpen() const
{
   // Return kTRUE if the file is open, kFALSE otherwise.

   if (fIsRootd) {
      if (gDebug > 1)
         Info("IsOpen","Calling TNetFile::IsOpen");
      return TNetFile::IsOpen();
   }

   if (!fClient)
      return kFALSE;

   // We are done
   return ((fClient && fInitDone) ? fClient->IsOpen() : kFALSE);
}

//_____________________________________________________________________________
TFile::EAsyncOpenStatus TXNetFile::GetAsyncOpenStatus()
{
   // Return status of asynchronous request

   if (fAsyncOpenStatus != TFile::kAOSNotAsync) {
      if (fClient->IsOpen_inprogress()) {
         return TFile::kAOSInProgress;
      } else {
         if (fClient->IsOpen())
            return TFile::kAOSSuccess;
         else
            return TFile::kAOSFailure;
      }
   }

   // Not asynchronous
   return TFile::kAOSNotAsync;
}

//_____________________________________________________________________________
Int_t TXNetFile::ReOpen(const Option_t *Mode)
{
   // Re-open the file (see TNetFile::ReOpen() or TFile::ReOpen()
   // for more details).

   if (fIsRootd) {
      if (gDebug > 1)
         Info("ReOpen","Calling TNetFile::ReOpen");
      return TNetFile::ReOpen(Mode);
   }

   return TFile::ReOpen(Mode);
}

//_____________________________________________________________________________
void TXNetFile::Close(const Option_t *opt)
{
   // Close the file (see TNetFile::Close() or TFile::Close()
   // for more details).

   if (fIsRootd) {
      if (gDebug > 1)
         Info("Close","Calling TNetFile::Close");
      TNetFile::Close(opt);
      return;
   }

   if (!fClient) return;

   TFile::Close(opt);

   fIsRootd = kFALSE;

   if (IsOpen())
      fClient->Close();

   fD = -1;  // so TFile::IsOpen() returns false when in TFile::~TFile
}

//_____________________________________________________________________________
void TXNetFile::Flush()
{
   // Flushes un-written data.
   if (IsZombie()) {
      Error("Flush", "Flush is not possible because object is"
            " in 'zombie' state");
      return;
   }

   if (!fWritable) {
      if (gDebug > 1)
         Info("Flush", "file not writable - do nothing");
      return;
   }

   if (fIsRootd) {
      if (gDebug > 1)
         Info("Flush","Calling TNetFile::Flush");
      TNetFile::Flush();
      return;
   }

   if (!IsOpen()) {
      Error("Flush","The remote file is not open");
      return;
   }

   FlushWriteCache();

   //
   // Flush via the remote xrootd
   fClient->Sync();
   if (gDebug > 1)
      Info("Flush", "XrdClient::Sync called.");
}

//_____________________________________________________________________________
Int_t TXNetFile::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).

   if (IsZombie()) {
      Error("SysStat", "SysStat is not possible because object is"
            " in 'zombie' state");
      *size = 0;
      return 1;
   }

   if (fIsRootd) {
      if (gDebug > 1)
         Info("SysStat", "calling TNetFile::SysStat");
      return TNetFile::SysStat(fd, id, size, flags, modtime);
   }

   // Return file stat information. The interface and return value is
   // identical to TSystem::GetPathInfo().
   struct XrdClientStatInfo stinfo;
   if (fClient && fClient->Stat(&stinfo)) {
      *id = (Long_t)(stinfo.id);
      *size = (Long64_t)(stinfo.size);
      *flags = (Long_t)(stinfo.flags);
      *modtime = (Long_t)(stinfo.modtime);
      if (gDebug > 1)
         Info("SysStat", "got stats = %ld %lld %ld %ld",
                         *id, *size, *flags, *modtime);
   } else {

      if (gDebug > 1) {
         if (!IsOpen()) Info("SysStat", "could not stat remote file. Not opened.");
         else
            Info("SysStat", "could not stat remote file");
      }


      *id = -1;
      return 1;
   }

   // We are done
   return 0;
}

//_____________________________________________________________________________
Int_t TXNetFile::SysClose(Int_t fd)
{
   // Override TNetFile::SysClose (see parent's method for more details).

   if (IsZombie()) {
      Error("SysClose", "SysClose is not possible because object is"
            " in 'zombie' state");
      return 0;
   }

   if (fIsRootd) {
      if (gDebug > 1)
         Info("SysClose","Calling TNetFile::SysClose");
      return TNetFile::SysClose(fd);
   }

   // Send close to remote xrootd
   if (IsOpen())
      fClient->Close();

   return 0;
}

//_____________________________________________________________________________
Int_t TXNetFile::SysOpen(const char* pathname, Int_t flags, UInt_t mode)
{
   // Override TNetFile::SysOpen (see parent's method for more details).

   if (fIsRootd) {
      if (gDebug > 1)
         Info("SysOpen", "Calling TNetFile::SysOpen");
      return TNetFile::SysOpen(pathname, flags, mode);
   }

   if (!fClient) {

      // Create an instance of XrdClient
      CreateXClient(fUrl.GetUrl(), fOption, fNetopt, kFALSE);

   } else {

      // url is not needed because already stored
      // fOption is set in TFile::ReOpen
      Open(fOption.Data(), kFALSE);
   }

   // If not successful, flag it
   if (!IsOpen())
      return -1;

   // This means ok for net files
   return -2;  // set as fD in ReOpen
}

//_____________________________________________________________________________
void TXNetFile::SetEnv()
{
   // Set the relevant environment variables

   // List of domains where redirection is allowed
   TString allowRE = gEnv->GetValue("XNet.RedirDomainAllowRE", "");
   if (allowRE.Length() > 0)
      EnvPutString(NAME_REDIRDOMAINALLOW_RE, allowRE.Data());

   // List of domains where redirection is denied
   TString denyRE  = gEnv->GetValue("XNet.RedirDomainDenyRE", "");
   if (denyRE.Length() > 0)
      EnvPutString(NAME_REDIRDOMAINDENY_RE, denyRE.Data());

   // List of domains where connection is allowed
   TString allowCO = gEnv->GetValue("XNet.ConnectDomainAllowRE", "");
   if (allowCO.Length() > 0)
      EnvPutString(NAME_CONNECTDOMAINALLOW_RE, allowCO.Data());

   // List of domains where connection is denied
   TString denyCO  = gEnv->GetValue("XNet.ConnectDomainDenyRE", "");
   if (denyCO.Length() > 0)
      EnvPutString(NAME_CONNECTDOMAINDENY_RE, denyCO.Data());

   // Connect Timeout
   Int_t connTO = gEnv->GetValue("XNet.ConnectTimeout",
                                  DFLT_CONNECTTIMEOUT);
   EnvPutInt(NAME_CONNECTTIMEOUT, connTO);

   // Reconnect Timeout
   Int_t recoTO = gEnv->GetValue("XNet.ReconnectWait",
                                  DFLT_RECONNECTWAIT);
   if (recoTO == DFLT_RECONNECTWAIT) {
      // Check also the old variable name
      recoTO = gEnv->GetValue("XNet.ReconnectTimeout",
                                  DFLT_RECONNECTWAIT);
   }
   EnvPutInt(NAME_RECONNECTWAIT, recoTO);

   // Request Timeout
   Int_t requTO = gEnv->GetValue("XNet.RequestTimeout",
                                  DFLT_REQUESTTIMEOUT);
   EnvPutInt(NAME_REQUESTTIMEOUT, requTO);

   // Max number of redirections
   Int_t maxRedir = gEnv->GetValue("XNet.MaxRedirectCount",
                                    DFLT_MAXREDIRECTCOUNT);
   EnvPutInt(NAME_MAXREDIRECTCOUNT, maxRedir);


   // Read ahead size
   Int_t rAheadsiz = gEnv->GetValue("XNet.ReadAheadSize",
                                     DFLT_READAHEADSIZE);
   EnvPutInt(NAME_READAHEADSIZE, rAheadsiz);


   // Cache size (<= 0 disables cache)
   Int_t rCachesiz = gEnv->GetValue("XNet.ReadCacheSize",
                                     DFLT_READCACHESIZE);

   EnvPutInt(NAME_READCACHESIZE, rCachesiz);

   // Max number of retries on first connect
   Int_t maxRetries = gEnv->GetValue("XNet.FirstConnectMaxCnt",
                                     DFLT_FIRSTCONNECTMAXCNT);
   EnvPutInt(NAME_FIRSTCONNECTMAXCNT, maxRetries);

   // Parallel stream count
   Int_t parStreamsCnt = gEnv->GetValue("XNet.ParStreamsPerPhyConn",
                                        DFLT_MULTISTREAMCNT);
   EnvPutInt(NAME_MULTISTREAMCNT, parStreamsCnt);

   // Change the TCP window size (0 means 'scaling' on some platforms)
   Int_t tcpWindowSize = gEnv->GetValue("XNet.DfltTcpWindowSize",
                                        DFLT_DFLTTCPWINDOWSIZE);
   EnvPutInt(NAME_DFLTTCPWINDOWSIZE, tcpWindowSize);

   // Change the transaction timeout
   Int_t transactionTimeout = gEnv->GetValue("XNet.TransactionTimeout",
                                             DFLT_TRANSACTIONTIMEOUT);
   EnvPutInt(NAME_TRANSACTIONTIMEOUT, transactionTimeout);

   // Whether to activate automatic rootd backward-compatibility
   // (We override XrdClient default)
   fgRootdBC = gEnv->GetValue("XNet.RootdFallback", 1);
   EnvPutInt(NAME_KEEPSOCKOPENIFNOTXRD, fgRootdBC);

   // Dynamic forwarding (SOCKS4)
   TString socks4Host = gEnv->GetValue("XNet.SOCKS4Host","");
   Int_t socks4Port = gEnv->GetValue("XNet.SOCKS4Port",-1);
   if (socks4Port > 0) {
      if (socks4Host.IsNull())
         // Default
         socks4Host = "127.0.0.1";
      EnvPutString(NAME_SOCKS4HOST, socks4Host.Data());
      EnvPutInt(NAME_SOCKS4PORT, socks4Port);
   }

   const char *cenv = 0;

   // For password-based authentication
   TString autolog = gEnv->GetValue("XSec.Pwd.AutoLogin","1");
   if (autolog.Length() > 0 &&
      (!(cenv = gSystem->Getenv("XrdSecPWDAUTOLOG")) || strlen(cenv) <= 0))
      gSystem->Setenv("XrdSecPWDAUTOLOG",autolog.Data());

   // Old style netrc file
   TString netrc;
   netrc.Form("%s/.rootnetrc",gSystem->HomeDirectory());
   gSystem->Setenv("XrdSecNETRC", netrc.Data());

   TString alogfile = gEnv->GetValue("XSec.Pwd.ALogFile","");
   if (alogfile.Length() > 0)
      gSystem->Setenv("XrdSecPWDALOGFILE",alogfile.Data());

   TString verisrv = gEnv->GetValue("XSec.Pwd.VerifySrv","1");
   if (verisrv.Length() > 0 &&
      (!(cenv = gSystem->Getenv("XrdSecPWDVERIFYSRV")) || strlen(cenv) <= 0))
      gSystem->Setenv("XrdSecPWDVERIFYSRV",verisrv.Data());

   TString srvpuk = gEnv->GetValue("XSec.Pwd.ServerPuk","");
   if (srvpuk.Length() > 0)
      gSystem->Setenv("XrdSecPWDSRVPUK",srvpuk.Data());

   // For GSI authentication
   TString cadir = gEnv->GetValue("XSec.GSI.CAdir","");
   if (cadir.Length() > 0)
      gSystem->Setenv("XrdSecGSICADIR",cadir.Data());

   TString crldir = gEnv->GetValue("XSec.GSI.CRLdir","");
   if (crldir.Length() > 0)
      gSystem->Setenv("XrdSecGSICRLDIR",crldir.Data());

   TString crlext = gEnv->GetValue("XSec.GSI.CRLextension","");
   if (crlext.Length() > 0)
      gSystem->Setenv("XrdSecGSICRLEXT",crlext.Data());

   TString ucert = gEnv->GetValue("XSec.GSI.UserCert","");
   if (ucert.Length() > 0)
      gSystem->Setenv("XrdSecGSIUSERCERT",ucert.Data());

   TString ukey = gEnv->GetValue("XSec.GSI.UserKey","");
   if (ukey.Length() > 0)
      gSystem->Setenv("XrdSecGSIUSERKEY",ukey.Data());

   TString upxy = gEnv->GetValue("XSec.GSI.UserProxy","");
   if (upxy.Length() > 0)
      gSystem->Setenv("XrdSecGSIUSERPROXY",upxy.Data());

   TString valid = gEnv->GetValue("XSec.GSI.ProxyValid","");
   if (valid.Length() > 0)
      gSystem->Setenv("XrdSecGSIPROXYVALID",valid.Data());

   TString deplen = gEnv->GetValue("XSec.GSI.ProxyForward","0");
   if (deplen.Length() > 0 &&
      (!(cenv = gSystem->Getenv("XrdSecGSIPROXYDEPLEN")) || strlen(cenv) <= 0))
      gSystem->Setenv("XrdSecGSIPROXYDEPLEN",deplen.Data());

   TString pxybits = gEnv->GetValue("XSec.GSI.ProxyKeyBits","");
   if (pxybits.Length() > 0)
      gSystem->Setenv("XrdSecGSIPROXYKEYBITS",pxybits.Data());

   TString crlcheck = gEnv->GetValue("XSec.GSI.CheckCRL","1");
   if (crlcheck.Length() > 0 &&
      (!(cenv = gSystem->Getenv("XrdSecGSICRLCHECK")) || strlen(cenv) <= 0))
      gSystem->Setenv("XrdSecGSICRLCHECK",crlcheck.Data());

   TString delegpxy = gEnv->GetValue("XSec.GSI.DelegProxy","0");
   if (delegpxy.Length() > 0 &&
      (!(cenv = gSystem->Getenv("XrdSecGSIDELEGPROXY")) || strlen(cenv) <= 0))
      gSystem->Setenv("XrdSecGSIDELEGPROXY",delegpxy.Data());

   TString signpxy = gEnv->GetValue("XSec.GSI.SignProxy","1");
   if (signpxy.Length() > 0 &&
      (!(cenv = gSystem->Getenv("XrdSecGSISIGNPROXY")) || strlen(cenv) <= 0))
      gSystem->Setenv("XrdSecGSISIGNPROXY",signpxy.Data());

   // Using ROOT mechanism to IGNORE SIGPIPE signal
   gSystem->IgnoreSignal(kSigPipe);
}

//_____________________________________________________________________________
void TXNetFile::SynchronizeCacheSize()
{
   // Synchronize the cache size
   // Alternative purging policy

   if (fClient == 0) return;

   fClient->UseCache(TRUE);
   Int_t size;
   Long64_t bytessubmitted, byteshit, misscount, readreqcnt;
   Float_t  missrate, bytesusefulness;
   int newbsz = -1;
   if (fClient->GetCacheInfo(size, bytessubmitted,
                             byteshit, misscount,
                             missrate, readreqcnt,
                             bytesusefulness) ) {

      // To allow for some space for outstanding data
      TFileCacheRead *cacheRead = GetCacheRead();
      if (cacheRead) {
         newbsz = GetBufferSize() / 2 * 3;
         newbsz = TMath::Max(newbsz, size);
      } else {
         newbsz = size;
      }

   }

   if (newbsz > 0)
      fClient->SetCacheParameters(newbsz, 0, XrdClientReadCache::kRmBlk_FIFO);
}

//_____________________________________________________________________________
void TXNetFile::ResetCache()
{
   // Reset the cache

   if (fClient)
      fClient->RemoveAllDataFromCache();
}

//______________________________________________________________________________
Int_t TXNetFile::GetBytesToPrefetch() const
{
   // Max number of bytes to prefetch.

   Int_t size;
   Long64_t bytessubmitted, byteshit, misscount, readreqcnt;
   Float_t  missrate, bytesusefulness;
   Int_t bytes = 0;
   if (fClient && fClient->GetCacheInfo(size, bytessubmitted,
                                        byteshit, misscount,
                                        missrate, readreqcnt,
                                        bytesusefulness) )
   bytes = size;
   return ((bytes < 0) ? 0 : bytes);
}

//______________________________________________________________________________
void TXNetFile::Print(Option_t *option) const
{
   // Print the local statistics.

   Printf("TXNetFile caching information:");

   Int_t size;
   Long64_t bytessubmitted, byteshit, misscount, readreqcnt;
   Float_t  missrate, bytesusefulness;

   if (fClient && fClient->GetCacheInfo(size, bytessubmitted,
                                        byteshit, misscount,
                                        missrate, readreqcnt,
                                        bytesusefulness)) {
      Printf(" Max size:                  %d",   size);
      Printf(" Bytes submitted:           %lld", bytessubmitted);
      Printf(" Bytes hit (estimation):    %lld", byteshit);
      Printf(" Miss count:                %lld", misscount);
      Printf(" Miss rate:                 %f",   missrate);
      Printf(" Read requests count:       %lld", readreqcnt);
      Printf(" Bytes usefulness:          %f\n", bytesusefulness);
   } else
      Printf(" -- No Xrd client instance allocated --\n");

   TFile::Print(option);
}
 TXNetFile.cxx:1
 TXNetFile.cxx:2
 TXNetFile.cxx:3
 TXNetFile.cxx:4
 TXNetFile.cxx:5
 TXNetFile.cxx:6
 TXNetFile.cxx:7
 TXNetFile.cxx:8
 TXNetFile.cxx:9
 TXNetFile.cxx:10
 TXNetFile.cxx:11
 TXNetFile.cxx:12
 TXNetFile.cxx:13
 TXNetFile.cxx:14
 TXNetFile.cxx:15
 TXNetFile.cxx:16
 TXNetFile.cxx:17
 TXNetFile.cxx:18
 TXNetFile.cxx:19
 TXNetFile.cxx:20
 TXNetFile.cxx:21
 TXNetFile.cxx:22
 TXNetFile.cxx:23
 TXNetFile.cxx:24
 TXNetFile.cxx:25
 TXNetFile.cxx:26
 TXNetFile.cxx:27
 TXNetFile.cxx:28
 TXNetFile.cxx:29
 TXNetFile.cxx:30
 TXNetFile.cxx:31
 TXNetFile.cxx:32
 TXNetFile.cxx:33
 TXNetFile.cxx:34
 TXNetFile.cxx:35
 TXNetFile.cxx:36
 TXNetFile.cxx:37
 TXNetFile.cxx:38
 TXNetFile.cxx:39
 TXNetFile.cxx:40
 TXNetFile.cxx:41
 TXNetFile.cxx:42
 TXNetFile.cxx:43
 TXNetFile.cxx:44
 TXNetFile.cxx:45
 TXNetFile.cxx:46
 TXNetFile.cxx:47
 TXNetFile.cxx:48
 TXNetFile.cxx:49
 TXNetFile.cxx:50
 TXNetFile.cxx:51
 TXNetFile.cxx:52
 TXNetFile.cxx:53
 TXNetFile.cxx:54
 TXNetFile.cxx:55
 TXNetFile.cxx:56
 TXNetFile.cxx:57
 TXNetFile.cxx:58
 TXNetFile.cxx:59
 TXNetFile.cxx:60
 TXNetFile.cxx:61
 TXNetFile.cxx:62
 TXNetFile.cxx:63
 TXNetFile.cxx:64
 TXNetFile.cxx:65
 TXNetFile.cxx:66
 TXNetFile.cxx:67
 TXNetFile.cxx:68
 TXNetFile.cxx:69
 TXNetFile.cxx:70
 TXNetFile.cxx:71
 TXNetFile.cxx:72
 TXNetFile.cxx:73
 TXNetFile.cxx:74
 TXNetFile.cxx:75
 TXNetFile.cxx:76
 TXNetFile.cxx:77
 TXNetFile.cxx:78
 TXNetFile.cxx:79
 TXNetFile.cxx:80
 TXNetFile.cxx:81
 TXNetFile.cxx:82
 TXNetFile.cxx:83
 TXNetFile.cxx:84
 TXNetFile.cxx:85
 TXNetFile.cxx:86
 TXNetFile.cxx:87
 TXNetFile.cxx:88
 TXNetFile.cxx:89
 TXNetFile.cxx:90
 TXNetFile.cxx:91
 TXNetFile.cxx:92
 TXNetFile.cxx:93
 TXNetFile.cxx:94
 TXNetFile.cxx:95
 TXNetFile.cxx:96
 TXNetFile.cxx:97
 TXNetFile.cxx:98
 TXNetFile.cxx:99
 TXNetFile.cxx:100
 TXNetFile.cxx:101
 TXNetFile.cxx:102
 TXNetFile.cxx:103
 TXNetFile.cxx:104
 TXNetFile.cxx:105
 TXNetFile.cxx:106
 TXNetFile.cxx:107
 TXNetFile.cxx:108
 TXNetFile.cxx:109
 TXNetFile.cxx:110
 TXNetFile.cxx:111
 TXNetFile.cxx:112
 TXNetFile.cxx:113
 TXNetFile.cxx:114
 TXNetFile.cxx:115
 TXNetFile.cxx:116
 TXNetFile.cxx:117
 TXNetFile.cxx:118
 TXNetFile.cxx:119
 TXNetFile.cxx:120
 TXNetFile.cxx:121
 TXNetFile.cxx:122
 TXNetFile.cxx:123
 TXNetFile.cxx:124
 TXNetFile.cxx:125
 TXNetFile.cxx:126
 TXNetFile.cxx:127
 TXNetFile.cxx:128
 TXNetFile.cxx:129
 TXNetFile.cxx:130
 TXNetFile.cxx:131
 TXNetFile.cxx:132
 TXNetFile.cxx:133
 TXNetFile.cxx:134
 TXNetFile.cxx:135
 TXNetFile.cxx:136
 TXNetFile.cxx:137
 TXNetFile.cxx:138
 TXNetFile.cxx:139
 TXNetFile.cxx:140
 TXNetFile.cxx:141
 TXNetFile.cxx:142
 TXNetFile.cxx:143
 TXNetFile.cxx:144
 TXNetFile.cxx:145
 TXNetFile.cxx:146
 TXNetFile.cxx:147
 TXNetFile.cxx:148
 TXNetFile.cxx:149
 TXNetFile.cxx:150
 TXNetFile.cxx:151
 TXNetFile.cxx:152
 TXNetFile.cxx:153
 TXNetFile.cxx:154
 TXNetFile.cxx:155
 TXNetFile.cxx:156
 TXNetFile.cxx:157
 TXNetFile.cxx:158
 TXNetFile.cxx:159
 TXNetFile.cxx:160
 TXNetFile.cxx:161
 TXNetFile.cxx:162
 TXNetFile.cxx:163
 TXNetFile.cxx:164
 TXNetFile.cxx:165
 TXNetFile.cxx:166
 TXNetFile.cxx:167
 TXNetFile.cxx:168
 TXNetFile.cxx:169
 TXNetFile.cxx:170
 TXNetFile.cxx:171
 TXNetFile.cxx:172
 TXNetFile.cxx:173
 TXNetFile.cxx:174
 TXNetFile.cxx:175
 TXNetFile.cxx:176
 TXNetFile.cxx:177
 TXNetFile.cxx:178
 TXNetFile.cxx:179
 TXNetFile.cxx:180
 TXNetFile.cxx:181
 TXNetFile.cxx:182
 TXNetFile.cxx:183
 TXNetFile.cxx:184
 TXNetFile.cxx:185
 TXNetFile.cxx:186
 TXNetFile.cxx:187
 TXNetFile.cxx:188
 TXNetFile.cxx:189
 TXNetFile.cxx:190
 TXNetFile.cxx:191
 TXNetFile.cxx:192
 TXNetFile.cxx:193
 TXNetFile.cxx:194
 TXNetFile.cxx:195
 TXNetFile.cxx:196
 TXNetFile.cxx:197
 TXNetFile.cxx:198
 TXNetFile.cxx:199
 TXNetFile.cxx:200
 TXNetFile.cxx:201
 TXNetFile.cxx:202
 TXNetFile.cxx:203
 TXNetFile.cxx:204
 TXNetFile.cxx:205
 TXNetFile.cxx:206
 TXNetFile.cxx:207
 TXNetFile.cxx:208
 TXNetFile.cxx:209
 TXNetFile.cxx:210
 TXNetFile.cxx:211
 TXNetFile.cxx:212
 TXNetFile.cxx:213
 TXNetFile.cxx:214
 TXNetFile.cxx:215
 TXNetFile.cxx:216
 TXNetFile.cxx:217
 TXNetFile.cxx:218
 TXNetFile.cxx:219
 TXNetFile.cxx:220
 TXNetFile.cxx:221
 TXNetFile.cxx:222
 TXNetFile.cxx:223
 TXNetFile.cxx:224
 TXNetFile.cxx:225
 TXNetFile.cxx:226
 TXNetFile.cxx:227
 TXNetFile.cxx:228
 TXNetFile.cxx:229
 TXNetFile.cxx:230
 TXNetFile.cxx:231
 TXNetFile.cxx:232
 TXNetFile.cxx:233
 TXNetFile.cxx:234
 TXNetFile.cxx:235
 TXNetFile.cxx:236
 TXNetFile.cxx:237
 TXNetFile.cxx:238
 TXNetFile.cxx:239
 TXNetFile.cxx:240
 TXNetFile.cxx:241
 TXNetFile.cxx:242
 TXNetFile.cxx:243
 TXNetFile.cxx:244
 TXNetFile.cxx:245
 TXNetFile.cxx:246
 TXNetFile.cxx:247
 TXNetFile.cxx:248
 TXNetFile.cxx:249
 TXNetFile.cxx:250
 TXNetFile.cxx:251
 TXNetFile.cxx:252
 TXNetFile.cxx:253
 TXNetFile.cxx:254
 TXNetFile.cxx:255
 TXNetFile.cxx:256
 TXNetFile.cxx:257
 TXNetFile.cxx:258
 TXNetFile.cxx:259
 TXNetFile.cxx:260
 TXNetFile.cxx:261
 TXNetFile.cxx:262
 TXNetFile.cxx:263
 TXNetFile.cxx:264
 TXNetFile.cxx:265
 TXNetFile.cxx:266
 TXNetFile.cxx:267
 TXNetFile.cxx:268
 TXNetFile.cxx:269
 TXNetFile.cxx:270
 TXNetFile.cxx:271
 TXNetFile.cxx:272
 TXNetFile.cxx:273
 TXNetFile.cxx:274
 TXNetFile.cxx:275
 TXNetFile.cxx:276
 TXNetFile.cxx:277
 TXNetFile.cxx:278
 TXNetFile.cxx:279
 TXNetFile.cxx:280
 TXNetFile.cxx:281
 TXNetFile.cxx:282
 TXNetFile.cxx:283
 TXNetFile.cxx:284
 TXNetFile.cxx:285
 TXNetFile.cxx:286
 TXNetFile.cxx:287
 TXNetFile.cxx:288
 TXNetFile.cxx:289
 TXNetFile.cxx:290
 TXNetFile.cxx:291
 TXNetFile.cxx:292
 TXNetFile.cxx:293
 TXNetFile.cxx:294
 TXNetFile.cxx:295
 TXNetFile.cxx:296
 TXNetFile.cxx:297
 TXNetFile.cxx:298
 TXNetFile.cxx:299
 TXNetFile.cxx:300
 TXNetFile.cxx:301
 TXNetFile.cxx:302
 TXNetFile.cxx:303
 TXNetFile.cxx:304
 TXNetFile.cxx:305
 TXNetFile.cxx:306
 TXNetFile.cxx:307
 TXNetFile.cxx:308
 TXNetFile.cxx:309
 TXNetFile.cxx:310
 TXNetFile.cxx:311
 TXNetFile.cxx:312
 TXNetFile.cxx:313
 TXNetFile.cxx:314
 TXNetFile.cxx:315
 TXNetFile.cxx:316
 TXNetFile.cxx:317
 TXNetFile.cxx:318
 TXNetFile.cxx:319
 TXNetFile.cxx:320
 TXNetFile.cxx:321
 TXNetFile.cxx:322
 TXNetFile.cxx:323
 TXNetFile.cxx:324
 TXNetFile.cxx:325
 TXNetFile.cxx:326
 TXNetFile.cxx:327
 TXNetFile.cxx:328
 TXNetFile.cxx:329
 TXNetFile.cxx:330
 TXNetFile.cxx:331
 TXNetFile.cxx:332
 TXNetFile.cxx:333
 TXNetFile.cxx:334
 TXNetFile.cxx:335
 TXNetFile.cxx:336
 TXNetFile.cxx:337
 TXNetFile.cxx:338
 TXNetFile.cxx:339
 TXNetFile.cxx:340
 TXNetFile.cxx:341
 TXNetFile.cxx:342
 TXNetFile.cxx:343
 TXNetFile.cxx:344
 TXNetFile.cxx:345
 TXNetFile.cxx:346
 TXNetFile.cxx:347
 TXNetFile.cxx:348
 TXNetFile.cxx:349
 TXNetFile.cxx:350
 TXNetFile.cxx:351
 TXNetFile.cxx:352
 TXNetFile.cxx:353
 TXNetFile.cxx:354
 TXNetFile.cxx:355
 TXNetFile.cxx:356
 TXNetFile.cxx:357
 TXNetFile.cxx:358
 TXNetFile.cxx:359
 TXNetFile.cxx:360
 TXNetFile.cxx:361
 TXNetFile.cxx:362
 TXNetFile.cxx:363
 TXNetFile.cxx:364
 TXNetFile.cxx:365
 TXNetFile.cxx:366
 TXNetFile.cxx:367
 TXNetFile.cxx:368
 TXNetFile.cxx:369
 TXNetFile.cxx:370
 TXNetFile.cxx:371
 TXNetFile.cxx:372
 TXNetFile.cxx:373
 TXNetFile.cxx:374
 TXNetFile.cxx:375
 TXNetFile.cxx:376
 TXNetFile.cxx:377
 TXNetFile.cxx:378
 TXNetFile.cxx:379
 TXNetFile.cxx:380
 TXNetFile.cxx:381
 TXNetFile.cxx:382
 TXNetFile.cxx:383
 TXNetFile.cxx:384
 TXNetFile.cxx:385
 TXNetFile.cxx:386
 TXNetFile.cxx:387
 TXNetFile.cxx:388
 TXNetFile.cxx:389
 TXNetFile.cxx:390
 TXNetFile.cxx:391
 TXNetFile.cxx:392
 TXNetFile.cxx:393
 TXNetFile.cxx:394
 TXNetFile.cxx:395
 TXNetFile.cxx:396
 TXNetFile.cxx:397
 TXNetFile.cxx:398
 TXNetFile.cxx:399
 TXNetFile.cxx:400
 TXNetFile.cxx:401
 TXNetFile.cxx:402
 TXNetFile.cxx:403
 TXNetFile.cxx:404
 TXNetFile.cxx:405
 TXNetFile.cxx:406
 TXNetFile.cxx:407
 TXNetFile.cxx:408
 TXNetFile.cxx:409
 TXNetFile.cxx:410
 TXNetFile.cxx:411
 TXNetFile.cxx:412
 TXNetFile.cxx:413
 TXNetFile.cxx:414
 TXNetFile.cxx:415
 TXNetFile.cxx:416
 TXNetFile.cxx:417
 TXNetFile.cxx:418
 TXNetFile.cxx:419
 TXNetFile.cxx:420
 TXNetFile.cxx:421
 TXNetFile.cxx:422
 TXNetFile.cxx:423
 TXNetFile.cxx:424
 TXNetFile.cxx:425
 TXNetFile.cxx:426
 TXNetFile.cxx:427
 TXNetFile.cxx:428
 TXNetFile.cxx:429
 TXNetFile.cxx:430
 TXNetFile.cxx:431
 TXNetFile.cxx:432
 TXNetFile.cxx:433
 TXNetFile.cxx:434
 TXNetFile.cxx:435
 TXNetFile.cxx:436
 TXNetFile.cxx:437
 TXNetFile.cxx:438
 TXNetFile.cxx:439
 TXNetFile.cxx:440
 TXNetFile.cxx:441
 TXNetFile.cxx:442
 TXNetFile.cxx:443
 TXNetFile.cxx:444
 TXNetFile.cxx:445
 TXNetFile.cxx:446
 TXNetFile.cxx:447
 TXNetFile.cxx:448
 TXNetFile.cxx:449
 TXNetFile.cxx:450
 TXNetFile.cxx:451
 TXNetFile.cxx:452
 TXNetFile.cxx:453
 TXNetFile.cxx:454
 TXNetFile.cxx:455
 TXNetFile.cxx:456
 TXNetFile.cxx:457
 TXNetFile.cxx:458
 TXNetFile.cxx:459
 TXNetFile.cxx:460
 TXNetFile.cxx:461
 TXNetFile.cxx:462
 TXNetFile.cxx:463
 TXNetFile.cxx:464
 TXNetFile.cxx:465
 TXNetFile.cxx:466
 TXNetFile.cxx:467
 TXNetFile.cxx:468
 TXNetFile.cxx:469
 TXNetFile.cxx:470
 TXNetFile.cxx:471
 TXNetFile.cxx:472
 TXNetFile.cxx:473
 TXNetFile.cxx:474
 TXNetFile.cxx:475
 TXNetFile.cxx:476
 TXNetFile.cxx:477
 TXNetFile.cxx:478
 TXNetFile.cxx:479
 TXNetFile.cxx:480
 TXNetFile.cxx:481
 TXNetFile.cxx:482
 TXNetFile.cxx:483
 TXNetFile.cxx:484
 TXNetFile.cxx:485
 TXNetFile.cxx:486
 TXNetFile.cxx:487
 TXNetFile.cxx:488
 TXNetFile.cxx:489
 TXNetFile.cxx:490
 TXNetFile.cxx:491
 TXNetFile.cxx:492
 TXNetFile.cxx:493
 TXNetFile.cxx:494
 TXNetFile.cxx:495
 TXNetFile.cxx:496
 TXNetFile.cxx:497
 TXNetFile.cxx:498
 TXNetFile.cxx:499
 TXNetFile.cxx:500
 TXNetFile.cxx:501
 TXNetFile.cxx:502
 TXNetFile.cxx:503
 TXNetFile.cxx:504
 TXNetFile.cxx:505
 TXNetFile.cxx:506
 TXNetFile.cxx:507
 TXNetFile.cxx:508
 TXNetFile.cxx:509
 TXNetFile.cxx:510
 TXNetFile.cxx:511
 TXNetFile.cxx:512
 TXNetFile.cxx:513
 TXNetFile.cxx:514
 TXNetFile.cxx:515
 TXNetFile.cxx:516
 TXNetFile.cxx:517
 TXNetFile.cxx:518
 TXNetFile.cxx:519
 TXNetFile.cxx:520
 TXNetFile.cxx:521
 TXNetFile.cxx:522
 TXNetFile.cxx:523
 TXNetFile.cxx:524
 TXNetFile.cxx:525
 TXNetFile.cxx:526
 TXNetFile.cxx:527
 TXNetFile.cxx:528
 TXNetFile.cxx:529
 TXNetFile.cxx:530
 TXNetFile.cxx:531
 TXNetFile.cxx:532
 TXNetFile.cxx:533
 TXNetFile.cxx:534
 TXNetFile.cxx:535
 TXNetFile.cxx:536
 TXNetFile.cxx:537
 TXNetFile.cxx:538
 TXNetFile.cxx:539
 TXNetFile.cxx:540
 TXNetFile.cxx:541
 TXNetFile.cxx:542
 TXNetFile.cxx:543
 TXNetFile.cxx:544
 TXNetFile.cxx:545
 TXNetFile.cxx:546
 TXNetFile.cxx:547
 TXNetFile.cxx:548
 TXNetFile.cxx:549
 TXNetFile.cxx:550
 TXNetFile.cxx:551
 TXNetFile.cxx:552
 TXNetFile.cxx:553
 TXNetFile.cxx:554
 TXNetFile.cxx:555
 TXNetFile.cxx:556
 TXNetFile.cxx:557
 TXNetFile.cxx:558
 TXNetFile.cxx:559
 TXNetFile.cxx:560
 TXNetFile.cxx:561
 TXNetFile.cxx:562
 TXNetFile.cxx:563
 TXNetFile.cxx:564
 TXNetFile.cxx:565
 TXNetFile.cxx:566
 TXNetFile.cxx:567
 TXNetFile.cxx:568
 TXNetFile.cxx:569
 TXNetFile.cxx:570
 TXNetFile.cxx:571
 TXNetFile.cxx:572
 TXNetFile.cxx:573
 TXNetFile.cxx:574
 TXNetFile.cxx:575
 TXNetFile.cxx:576
 TXNetFile.cxx:577
 TXNetFile.cxx:578
 TXNetFile.cxx:579
 TXNetFile.cxx:580
 TXNetFile.cxx:581
 TXNetFile.cxx:582
 TXNetFile.cxx:583
 TXNetFile.cxx:584
 TXNetFile.cxx:585
 TXNetFile.cxx:586
 TXNetFile.cxx:587
 TXNetFile.cxx:588
 TXNetFile.cxx:589
 TXNetFile.cxx:590
 TXNetFile.cxx:591
 TXNetFile.cxx:592
 TXNetFile.cxx:593
 TXNetFile.cxx:594
 TXNetFile.cxx:595
 TXNetFile.cxx:596
 TXNetFile.cxx:597
 TXNetFile.cxx:598
 TXNetFile.cxx:599
 TXNetFile.cxx:600
 TXNetFile.cxx:601
 TXNetFile.cxx:602
 TXNetFile.cxx:603
 TXNetFile.cxx:604
 TXNetFile.cxx:605
 TXNetFile.cxx:606
 TXNetFile.cxx:607
 TXNetFile.cxx:608
 TXNetFile.cxx:609
 TXNetFile.cxx:610
 TXNetFile.cxx:611
 TXNetFile.cxx:612
 TXNetFile.cxx:613
 TXNetFile.cxx:614
 TXNetFile.cxx:615
 TXNetFile.cxx:616
 TXNetFile.cxx:617
 TXNetFile.cxx:618
 TXNetFile.cxx:619
 TXNetFile.cxx:620
 TXNetFile.cxx:621
 TXNetFile.cxx:622
 TXNetFile.cxx:623
 TXNetFile.cxx:624
 TXNetFile.cxx:625
 TXNetFile.cxx:626
 TXNetFile.cxx:627
 TXNetFile.cxx:628
 TXNetFile.cxx:629
 TXNetFile.cxx:630
 TXNetFile.cxx:631
 TXNetFile.cxx:632
 TXNetFile.cxx:633
 TXNetFile.cxx:634
 TXNetFile.cxx:635
 TXNetFile.cxx:636
 TXNetFile.cxx:637
 TXNetFile.cxx:638
 TXNetFile.cxx:639
 TXNetFile.cxx:640
 TXNetFile.cxx:641
 TXNetFile.cxx:642
 TXNetFile.cxx:643
 TXNetFile.cxx:644
 TXNetFile.cxx:645
 TXNetFile.cxx:646
 TXNetFile.cxx:647
 TXNetFile.cxx:648
 TXNetFile.cxx:649
 TXNetFile.cxx:650
 TXNetFile.cxx:651
 TXNetFile.cxx:652
 TXNetFile.cxx:653
 TXNetFile.cxx:654
 TXNetFile.cxx:655
 TXNetFile.cxx:656
 TXNetFile.cxx:657
 TXNetFile.cxx:658
 TXNetFile.cxx:659
 TXNetFile.cxx:660
 TXNetFile.cxx:661
 TXNetFile.cxx:662
 TXNetFile.cxx:663
 TXNetFile.cxx:664
 TXNetFile.cxx:665
 TXNetFile.cxx:666
 TXNetFile.cxx:667
 TXNetFile.cxx:668
 TXNetFile.cxx:669
 TXNetFile.cxx:670
 TXNetFile.cxx:671
 TXNetFile.cxx:672
 TXNetFile.cxx:673
 TXNetFile.cxx:674
 TXNetFile.cxx:675
 TXNetFile.cxx:676
 TXNetFile.cxx:677
 TXNetFile.cxx:678
 TXNetFile.cxx:679
 TXNetFile.cxx:680
 TXNetFile.cxx:681
 TXNetFile.cxx:682
 TXNetFile.cxx:683
 TXNetFile.cxx:684
 TXNetFile.cxx:685
 TXNetFile.cxx:686
 TXNetFile.cxx:687
 TXNetFile.cxx:688
 TXNetFile.cxx:689
 TXNetFile.cxx:690
 TXNetFile.cxx:691
 TXNetFile.cxx:692
 TXNetFile.cxx:693
 TXNetFile.cxx:694
 TXNetFile.cxx:695
 TXNetFile.cxx:696
 TXNetFile.cxx:697
 TXNetFile.cxx:698
 TXNetFile.cxx:699
 TXNetFile.cxx:700
 TXNetFile.cxx:701
 TXNetFile.cxx:702
 TXNetFile.cxx:703
 TXNetFile.cxx:704
 TXNetFile.cxx:705
 TXNetFile.cxx:706
 TXNetFile.cxx:707
 TXNetFile.cxx:708
 TXNetFile.cxx:709
 TXNetFile.cxx:710
 TXNetFile.cxx:711
 TXNetFile.cxx:712
 TXNetFile.cxx:713
 TXNetFile.cxx:714
 TXNetFile.cxx:715
 TXNetFile.cxx:716
 TXNetFile.cxx:717
 TXNetFile.cxx:718
 TXNetFile.cxx:719
 TXNetFile.cxx:720
 TXNetFile.cxx:721
 TXNetFile.cxx:722
 TXNetFile.cxx:723
 TXNetFile.cxx:724
 TXNetFile.cxx:725
 TXNetFile.cxx:726
 TXNetFile.cxx:727
 TXNetFile.cxx:728
 TXNetFile.cxx:729
 TXNetFile.cxx:730
 TXNetFile.cxx:731
 TXNetFile.cxx:732
 TXNetFile.cxx:733
 TXNetFile.cxx:734
 TXNetFile.cxx:735
 TXNetFile.cxx:736
 TXNetFile.cxx:737
 TXNetFile.cxx:738
 TXNetFile.cxx:739
 TXNetFile.cxx:740
 TXNetFile.cxx:741
 TXNetFile.cxx:742
 TXNetFile.cxx:743
 TXNetFile.cxx:744
 TXNetFile.cxx:745
 TXNetFile.cxx:746
 TXNetFile.cxx:747
 TXNetFile.cxx:748
 TXNetFile.cxx:749
 TXNetFile.cxx:750
 TXNetFile.cxx:751
 TXNetFile.cxx:752
 TXNetFile.cxx:753
 TXNetFile.cxx:754
 TXNetFile.cxx:755
 TXNetFile.cxx:756
 TXNetFile.cxx:757
 TXNetFile.cxx:758
 TXNetFile.cxx:759
 TXNetFile.cxx:760
 TXNetFile.cxx:761
 TXNetFile.cxx:762
 TXNetFile.cxx:763
 TXNetFile.cxx:764
 TXNetFile.cxx:765
 TXNetFile.cxx:766
 TXNetFile.cxx:767
 TXNetFile.cxx:768
 TXNetFile.cxx:769
 TXNetFile.cxx:770
 TXNetFile.cxx:771
 TXNetFile.cxx:772
 TXNetFile.cxx:773
 TXNetFile.cxx:774
 TXNetFile.cxx:775
 TXNetFile.cxx:776
 TXNetFile.cxx:777
 TXNetFile.cxx:778
 TXNetFile.cxx:779
 TXNetFile.cxx:780
 TXNetFile.cxx:781
 TXNetFile.cxx:782
 TXNetFile.cxx:783
 TXNetFile.cxx:784
 TXNetFile.cxx:785
 TXNetFile.cxx:786
 TXNetFile.cxx:787
 TXNetFile.cxx:788
 TXNetFile.cxx:789
 TXNetFile.cxx:790
 TXNetFile.cxx:791
 TXNetFile.cxx:792
 TXNetFile.cxx:793
 TXNetFile.cxx:794
 TXNetFile.cxx:795
 TXNetFile.cxx:796
 TXNetFile.cxx:797
 TXNetFile.cxx:798
 TXNetFile.cxx:799
 TXNetFile.cxx:800
 TXNetFile.cxx:801
 TXNetFile.cxx:802
 TXNetFile.cxx:803
 TXNetFile.cxx:804
 TXNetFile.cxx:805
 TXNetFile.cxx:806
 TXNetFile.cxx:807
 TXNetFile.cxx:808
 TXNetFile.cxx:809
 TXNetFile.cxx:810
 TXNetFile.cxx:811
 TXNetFile.cxx:812
 TXNetFile.cxx:813
 TXNetFile.cxx:814
 TXNetFile.cxx:815
 TXNetFile.cxx:816
 TXNetFile.cxx:817
 TXNetFile.cxx:818
 TXNetFile.cxx:819
 TXNetFile.cxx:820
 TXNetFile.cxx:821
 TXNetFile.cxx:822
 TXNetFile.cxx:823
 TXNetFile.cxx:824
 TXNetFile.cxx:825
 TXNetFile.cxx:826
 TXNetFile.cxx:827
 TXNetFile.cxx:828
 TXNetFile.cxx:829
 TXNetFile.cxx:830
 TXNetFile.cxx:831
 TXNetFile.cxx:832
 TXNetFile.cxx:833
 TXNetFile.cxx:834
 TXNetFile.cxx:835
 TXNetFile.cxx:836
 TXNetFile.cxx:837
 TXNetFile.cxx:838
 TXNetFile.cxx:839
 TXNetFile.cxx:840
 TXNetFile.cxx:841
 TXNetFile.cxx:842
 TXNetFile.cxx:843
 TXNetFile.cxx:844
 TXNetFile.cxx:845
 TXNetFile.cxx:846
 TXNetFile.cxx:847
 TXNetFile.cxx:848
 TXNetFile.cxx:849
 TXNetFile.cxx:850
 TXNetFile.cxx:851
 TXNetFile.cxx:852
 TXNetFile.cxx:853
 TXNetFile.cxx:854
 TXNetFile.cxx:855
 TXNetFile.cxx:856
 TXNetFile.cxx:857
 TXNetFile.cxx:858
 TXNetFile.cxx:859
 TXNetFile.cxx:860
 TXNetFile.cxx:861
 TXNetFile.cxx:862
 TXNetFile.cxx:863
 TXNetFile.cxx:864
 TXNetFile.cxx:865
 TXNetFile.cxx:866
 TXNetFile.cxx:867
 TXNetFile.cxx:868
 TXNetFile.cxx:869
 TXNetFile.cxx:870
 TXNetFile.cxx:871
 TXNetFile.cxx:872
 TXNetFile.cxx:873
 TXNetFile.cxx:874
 TXNetFile.cxx:875
 TXNetFile.cxx:876
 TXNetFile.cxx:877
 TXNetFile.cxx:878
 TXNetFile.cxx:879
 TXNetFile.cxx:880
 TXNetFile.cxx:881
 TXNetFile.cxx:882
 TXNetFile.cxx:883
 TXNetFile.cxx:884
 TXNetFile.cxx:885
 TXNetFile.cxx:886
 TXNetFile.cxx:887
 TXNetFile.cxx:888
 TXNetFile.cxx:889
 TXNetFile.cxx:890
 TXNetFile.cxx:891
 TXNetFile.cxx:892
 TXNetFile.cxx:893
 TXNetFile.cxx:894
 TXNetFile.cxx:895
 TXNetFile.cxx:896
 TXNetFile.cxx:897
 TXNetFile.cxx:898
 TXNetFile.cxx:899
 TXNetFile.cxx:900
 TXNetFile.cxx:901
 TXNetFile.cxx:902
 TXNetFile.cxx:903
 TXNetFile.cxx:904
 TXNetFile.cxx:905
 TXNetFile.cxx:906
 TXNetFile.cxx:907
 TXNetFile.cxx:908
 TXNetFile.cxx:909
 TXNetFile.cxx:910
 TXNetFile.cxx:911
 TXNetFile.cxx:912
 TXNetFile.cxx:913
 TXNetFile.cxx:914
 TXNetFile.cxx:915
 TXNetFile.cxx:916
 TXNetFile.cxx:917
 TXNetFile.cxx:918
 TXNetFile.cxx:919
 TXNetFile.cxx:920
 TXNetFile.cxx:921
 TXNetFile.cxx:922
 TXNetFile.cxx:923
 TXNetFile.cxx:924
 TXNetFile.cxx:925
 TXNetFile.cxx:926
 TXNetFile.cxx:927
 TXNetFile.cxx:928
 TXNetFile.cxx:929
 TXNetFile.cxx:930
 TXNetFile.cxx:931
 TXNetFile.cxx:932
 TXNetFile.cxx:933
 TXNetFile.cxx:934
 TXNetFile.cxx:935
 TXNetFile.cxx:936
 TXNetFile.cxx:937
 TXNetFile.cxx:938
 TXNetFile.cxx:939
 TXNetFile.cxx:940
 TXNetFile.cxx:941
 TXNetFile.cxx:942
 TXNetFile.cxx:943
 TXNetFile.cxx:944
 TXNetFile.cxx:945
 TXNetFile.cxx:946
 TXNetFile.cxx:947
 TXNetFile.cxx:948
 TXNetFile.cxx:949
 TXNetFile.cxx:950
 TXNetFile.cxx:951
 TXNetFile.cxx:952
 TXNetFile.cxx:953
 TXNetFile.cxx:954
 TXNetFile.cxx:955
 TXNetFile.cxx:956
 TXNetFile.cxx:957
 TXNetFile.cxx:958
 TXNetFile.cxx:959
 TXNetFile.cxx:960
 TXNetFile.cxx:961
 TXNetFile.cxx:962
 TXNetFile.cxx:963
 TXNetFile.cxx:964
 TXNetFile.cxx:965
 TXNetFile.cxx:966
 TXNetFile.cxx:967
 TXNetFile.cxx:968
 TXNetFile.cxx:969
 TXNetFile.cxx:970
 TXNetFile.cxx:971
 TXNetFile.cxx:972
 TXNetFile.cxx:973
 TXNetFile.cxx:974
 TXNetFile.cxx:975
 TXNetFile.cxx:976
 TXNetFile.cxx:977
 TXNetFile.cxx:978
 TXNetFile.cxx:979
 TXNetFile.cxx:980
 TXNetFile.cxx:981
 TXNetFile.cxx:982
 TXNetFile.cxx:983
 TXNetFile.cxx:984
 TXNetFile.cxx:985
 TXNetFile.cxx:986
 TXNetFile.cxx:987
 TXNetFile.cxx:988
 TXNetFile.cxx:989
 TXNetFile.cxx:990
 TXNetFile.cxx:991
 TXNetFile.cxx:992
 TXNetFile.cxx:993
 TXNetFile.cxx:994
 TXNetFile.cxx:995
 TXNetFile.cxx:996
 TXNetFile.cxx:997
 TXNetFile.cxx:998
 TXNetFile.cxx:999
 TXNetFile.cxx:1000
 TXNetFile.cxx:1001
 TXNetFile.cxx:1002
 TXNetFile.cxx:1003
 TXNetFile.cxx:1004
 TXNetFile.cxx:1005
 TXNetFile.cxx:1006
 TXNetFile.cxx:1007
 TXNetFile.cxx:1008
 TXNetFile.cxx:1009
 TXNetFile.cxx:1010
 TXNetFile.cxx:1011
 TXNetFile.cxx:1012
 TXNetFile.cxx:1013
 TXNetFile.cxx:1014
 TXNetFile.cxx:1015
 TXNetFile.cxx:1016
 TXNetFile.cxx:1017
 TXNetFile.cxx:1018
 TXNetFile.cxx:1019
 TXNetFile.cxx:1020
 TXNetFile.cxx:1021
 TXNetFile.cxx:1022
 TXNetFile.cxx:1023
 TXNetFile.cxx:1024
 TXNetFile.cxx:1025
 TXNetFile.cxx:1026
 TXNetFile.cxx:1027
 TXNetFile.cxx:1028
 TXNetFile.cxx:1029
 TXNetFile.cxx:1030
 TXNetFile.cxx:1031
 TXNetFile.cxx:1032
 TXNetFile.cxx:1033
 TXNetFile.cxx:1034
 TXNetFile.cxx:1035
 TXNetFile.cxx:1036
 TXNetFile.cxx:1037
 TXNetFile.cxx:1038
 TXNetFile.cxx:1039
 TXNetFile.cxx:1040
 TXNetFile.cxx:1041
 TXNetFile.cxx:1042
 TXNetFile.cxx:1043
 TXNetFile.cxx:1044
 TXNetFile.cxx:1045
 TXNetFile.cxx:1046
 TXNetFile.cxx:1047
 TXNetFile.cxx:1048
 TXNetFile.cxx:1049
 TXNetFile.cxx:1050
 TXNetFile.cxx:1051
 TXNetFile.cxx:1052
 TXNetFile.cxx:1053
 TXNetFile.cxx:1054
 TXNetFile.cxx:1055
 TXNetFile.cxx:1056
 TXNetFile.cxx:1057
 TXNetFile.cxx:1058
 TXNetFile.cxx:1059
 TXNetFile.cxx:1060
 TXNetFile.cxx:1061
 TXNetFile.cxx:1062
 TXNetFile.cxx:1063
 TXNetFile.cxx:1064
 TXNetFile.cxx:1065
 TXNetFile.cxx:1066
 TXNetFile.cxx:1067
 TXNetFile.cxx:1068
 TXNetFile.cxx:1069
 TXNetFile.cxx:1070
 TXNetFile.cxx:1071
 TXNetFile.cxx:1072
 TXNetFile.cxx:1073
 TXNetFile.cxx:1074
 TXNetFile.cxx:1075
 TXNetFile.cxx:1076
 TXNetFile.cxx:1077
 TXNetFile.cxx:1078
 TXNetFile.cxx:1079
 TXNetFile.cxx:1080
 TXNetFile.cxx:1081
 TXNetFile.cxx:1082
 TXNetFile.cxx:1083
 TXNetFile.cxx:1084
 TXNetFile.cxx:1085
 TXNetFile.cxx:1086
 TXNetFile.cxx:1087
 TXNetFile.cxx:1088
 TXNetFile.cxx:1089
 TXNetFile.cxx:1090
 TXNetFile.cxx:1091
 TXNetFile.cxx:1092
 TXNetFile.cxx:1093
 TXNetFile.cxx:1094
 TXNetFile.cxx:1095
 TXNetFile.cxx:1096
 TXNetFile.cxx:1097
 TXNetFile.cxx:1098
 TXNetFile.cxx:1099
 TXNetFile.cxx:1100
 TXNetFile.cxx:1101
 TXNetFile.cxx:1102
 TXNetFile.cxx:1103
 TXNetFile.cxx:1104
 TXNetFile.cxx:1105
 TXNetFile.cxx:1106
 TXNetFile.cxx:1107
 TXNetFile.cxx:1108
 TXNetFile.cxx:1109
 TXNetFile.cxx:1110
 TXNetFile.cxx:1111
 TXNetFile.cxx:1112
 TXNetFile.cxx:1113
 TXNetFile.cxx:1114
 TXNetFile.cxx:1115
 TXNetFile.cxx:1116
 TXNetFile.cxx:1117
 TXNetFile.cxx:1118
 TXNetFile.cxx:1119
 TXNetFile.cxx:1120
 TXNetFile.cxx:1121
 TXNetFile.cxx:1122
 TXNetFile.cxx:1123
 TXNetFile.cxx:1124
 TXNetFile.cxx:1125
 TXNetFile.cxx:1126
 TXNetFile.cxx:1127
 TXNetFile.cxx:1128
 TXNetFile.cxx:1129
 TXNetFile.cxx:1130
 TXNetFile.cxx:1131
 TXNetFile.cxx:1132
 TXNetFile.cxx:1133
 TXNetFile.cxx:1134
 TXNetFile.cxx:1135
 TXNetFile.cxx:1136
 TXNetFile.cxx:1137
 TXNetFile.cxx:1138
 TXNetFile.cxx:1139
 TXNetFile.cxx:1140
 TXNetFile.cxx:1141
 TXNetFile.cxx:1142
 TXNetFile.cxx:1143
 TXNetFile.cxx:1144
 TXNetFile.cxx:1145
 TXNetFile.cxx:1146
 TXNetFile.cxx:1147
 TXNetFile.cxx:1148
 TXNetFile.cxx:1149
 TXNetFile.cxx:1150
 TXNetFile.cxx:1151
 TXNetFile.cxx:1152
 TXNetFile.cxx:1153
 TXNetFile.cxx:1154
 TXNetFile.cxx:1155
 TXNetFile.cxx:1156
 TXNetFile.cxx:1157
 TXNetFile.cxx:1158
 TXNetFile.cxx:1159
 TXNetFile.cxx:1160
 TXNetFile.cxx:1161
 TXNetFile.cxx:1162
 TXNetFile.cxx:1163
 TXNetFile.cxx:1164
 TXNetFile.cxx:1165
 TXNetFile.cxx:1166
 TXNetFile.cxx:1167
 TXNetFile.cxx:1168
 TXNetFile.cxx:1169
 TXNetFile.cxx:1170
 TXNetFile.cxx:1171
 TXNetFile.cxx:1172
 TXNetFile.cxx:1173
 TXNetFile.cxx:1174
 TXNetFile.cxx:1175
 TXNetFile.cxx:1176
 TXNetFile.cxx:1177
 TXNetFile.cxx:1178
 TXNetFile.cxx:1179
 TXNetFile.cxx:1180
 TXNetFile.cxx:1181
 TXNetFile.cxx:1182
 TXNetFile.cxx:1183
 TXNetFile.cxx:1184
 TXNetFile.cxx:1185
 TXNetFile.cxx:1186
 TXNetFile.cxx:1187
 TXNetFile.cxx:1188
 TXNetFile.cxx:1189
 TXNetFile.cxx:1190
 TXNetFile.cxx:1191
 TXNetFile.cxx:1192
 TXNetFile.cxx:1193
 TXNetFile.cxx:1194
 TXNetFile.cxx:1195
 TXNetFile.cxx:1196
 TXNetFile.cxx:1197
 TXNetFile.cxx:1198
 TXNetFile.cxx:1199
 TXNetFile.cxx:1200
 TXNetFile.cxx:1201
 TXNetFile.cxx:1202
 TXNetFile.cxx:1203
 TXNetFile.cxx:1204
 TXNetFile.cxx:1205
 TXNetFile.cxx:1206
 TXNetFile.cxx:1207
 TXNetFile.cxx:1208
 TXNetFile.cxx:1209
 TXNetFile.cxx:1210
 TXNetFile.cxx:1211
 TXNetFile.cxx:1212
 TXNetFile.cxx:1213
 TXNetFile.cxx:1214
 TXNetFile.cxx:1215
 TXNetFile.cxx:1216
 TXNetFile.cxx:1217
 TXNetFile.cxx:1218
 TXNetFile.cxx:1219
 TXNetFile.cxx:1220
 TXNetFile.cxx:1221
 TXNetFile.cxx:1222
 TXNetFile.cxx:1223
 TXNetFile.cxx:1224
 TXNetFile.cxx:1225
 TXNetFile.cxx:1226
 TXNetFile.cxx:1227
 TXNetFile.cxx:1228
 TXNetFile.cxx:1229
 TXNetFile.cxx:1230
 TXNetFile.cxx:1231
 TXNetFile.cxx:1232
 TXNetFile.cxx:1233
 TXNetFile.cxx:1234
 TXNetFile.cxx:1235
 TXNetFile.cxx:1236
 TXNetFile.cxx:1237
 TXNetFile.cxx:1238
 TXNetFile.cxx:1239
 TXNetFile.cxx:1240
 TXNetFile.cxx:1241
 TXNetFile.cxx:1242
 TXNetFile.cxx:1243
 TXNetFile.cxx:1244
 TXNetFile.cxx:1245
 TXNetFile.cxx:1246
 TXNetFile.cxx:1247
 TXNetFile.cxx:1248
 TXNetFile.cxx:1249
 TXNetFile.cxx:1250
 TXNetFile.cxx:1251
 TXNetFile.cxx:1252
 TXNetFile.cxx:1253
 TXNetFile.cxx:1254
 TXNetFile.cxx:1255
 TXNetFile.cxx:1256
 TXNetFile.cxx:1257
 TXNetFile.cxx:1258
 TXNetFile.cxx:1259
 TXNetFile.cxx:1260
 TXNetFile.cxx:1261
 TXNetFile.cxx:1262
 TXNetFile.cxx:1263
 TXNetFile.cxx:1264
 TXNetFile.cxx:1265
 TXNetFile.cxx:1266
 TXNetFile.cxx:1267
 TXNetFile.cxx:1268
 TXNetFile.cxx:1269
 TXNetFile.cxx:1270
 TXNetFile.cxx:1271
 TXNetFile.cxx:1272
 TXNetFile.cxx:1273
 TXNetFile.cxx:1274
 TXNetFile.cxx:1275
 TXNetFile.cxx:1276
 TXNetFile.cxx:1277
 TXNetFile.cxx:1278
 TXNetFile.cxx:1279
 TXNetFile.cxx:1280
 TXNetFile.cxx:1281
 TXNetFile.cxx:1282
 TXNetFile.cxx:1283
 TXNetFile.cxx:1284
 TXNetFile.cxx:1285
 TXNetFile.cxx:1286
 TXNetFile.cxx:1287
 TXNetFile.cxx:1288
 TXNetFile.cxx:1289
 TXNetFile.cxx:1290
 TXNetFile.cxx:1291
 TXNetFile.cxx:1292
 TXNetFile.cxx:1293
 TXNetFile.cxx:1294
 TXNetFile.cxx:1295
 TXNetFile.cxx:1296
 TXNetFile.cxx:1297
 TXNetFile.cxx:1298
 TXNetFile.cxx:1299
 TXNetFile.cxx:1300
 TXNetFile.cxx:1301
 TXNetFile.cxx:1302
 TXNetFile.cxx:1303
 TXNetFile.cxx:1304
 TXNetFile.cxx:1305
 TXNetFile.cxx:1306
 TXNetFile.cxx:1307
 TXNetFile.cxx:1308
 TXNetFile.cxx:1309
 TXNetFile.cxx:1310
 TXNetFile.cxx:1311
 TXNetFile.cxx:1312
 TXNetFile.cxx:1313
 TXNetFile.cxx:1314
 TXNetFile.cxx:1315
 TXNetFile.cxx:1316
 TXNetFile.cxx:1317
 TXNetFile.cxx:1318
 TXNetFile.cxx:1319
 TXNetFile.cxx:1320
 TXNetFile.cxx:1321
 TXNetFile.cxx:1322
 TXNetFile.cxx:1323
 TXNetFile.cxx:1324
 TXNetFile.cxx:1325
 TXNetFile.cxx:1326
 TXNetFile.cxx:1327
 TXNetFile.cxx:1328
 TXNetFile.cxx:1329
 TXNetFile.cxx:1330
 TXNetFile.cxx:1331
 TXNetFile.cxx:1332
 TXNetFile.cxx:1333
 TXNetFile.cxx:1334
 TXNetFile.cxx:1335
 TXNetFile.cxx:1336
 TXNetFile.cxx:1337
 TXNetFile.cxx:1338
 TXNetFile.cxx:1339
 TXNetFile.cxx:1340
 TXNetFile.cxx:1341
 TXNetFile.cxx:1342
 TXNetFile.cxx:1343
 TXNetFile.cxx:1344
 TXNetFile.cxx:1345
 TXNetFile.cxx:1346
 TXNetFile.cxx:1347
 TXNetFile.cxx:1348
 TXNetFile.cxx:1349
 TXNetFile.cxx:1350
 TXNetFile.cxx:1351
 TXNetFile.cxx:1352
 TXNetFile.cxx:1353
 TXNetFile.cxx:1354
 TXNetFile.cxx:1355
 TXNetFile.cxx:1356
 TXNetFile.cxx:1357
 TXNetFile.cxx:1358
 TXNetFile.cxx:1359
 TXNetFile.cxx:1360
 TXNetFile.cxx:1361
 TXNetFile.cxx:1362
 TXNetFile.cxx:1363
 TXNetFile.cxx:1364
 TXNetFile.cxx:1365
 TXNetFile.cxx:1366
 TXNetFile.cxx:1367
 TXNetFile.cxx:1368
 TXNetFile.cxx:1369
 TXNetFile.cxx:1370
 TXNetFile.cxx:1371
 TXNetFile.cxx:1372
 TXNetFile.cxx:1373
 TXNetFile.cxx:1374
 TXNetFile.cxx:1375
 TXNetFile.cxx:1376
 TXNetFile.cxx:1377
 TXNetFile.cxx:1378
 TXNetFile.cxx:1379
 TXNetFile.cxx:1380
 TXNetFile.cxx:1381
 TXNetFile.cxx:1382
 TXNetFile.cxx:1383
 TXNetFile.cxx:1384
 TXNetFile.cxx:1385
 TXNetFile.cxx:1386
 TXNetFile.cxx:1387
 TXNetFile.cxx:1388
 TXNetFile.cxx:1389
 TXNetFile.cxx:1390
 TXNetFile.cxx:1391
 TXNetFile.cxx:1392
 TXNetFile.cxx:1393
 TXNetFile.cxx:1394
 TXNetFile.cxx:1395
 TXNetFile.cxx:1396
 TXNetFile.cxx:1397
 TXNetFile.cxx:1398
 TXNetFile.cxx:1399
 TXNetFile.cxx:1400
 TXNetFile.cxx:1401
 TXNetFile.cxx:1402
 TXNetFile.cxx:1403
 TXNetFile.cxx:1404
 TXNetFile.cxx:1405
 TXNetFile.cxx:1406
 TXNetFile.cxx:1407
 TXNetFile.cxx:1408
 TXNetFile.cxx:1409
 TXNetFile.cxx:1410
 TXNetFile.cxx:1411
 TXNetFile.cxx:1412
 TXNetFile.cxx:1413
 TXNetFile.cxx:1414
 TXNetFile.cxx:1415
 TXNetFile.cxx:1416
 TXNetFile.cxx:1417
 TXNetFile.cxx:1418
 TXNetFile.cxx:1419
 TXNetFile.cxx:1420
 TXNetFile.cxx:1421
 TXNetFile.cxx:1422
 TXNetFile.cxx:1423
 TXNetFile.cxx:1424
 TXNetFile.cxx:1425
 TXNetFile.cxx:1426
 TXNetFile.cxx:1427
 TXNetFile.cxx:1428
 TXNetFile.cxx:1429
 TXNetFile.cxx:1430
 TXNetFile.cxx:1431
 TXNetFile.cxx:1432
 TXNetFile.cxx:1433
 TXNetFile.cxx:1434
 TXNetFile.cxx:1435
 TXNetFile.cxx:1436
 TXNetFile.cxx:1437
 TXNetFile.cxx:1438
 TXNetFile.cxx:1439
 TXNetFile.cxx:1440
 TXNetFile.cxx:1441
 TXNetFile.cxx:1442
 TXNetFile.cxx:1443
 TXNetFile.cxx:1444
 TXNetFile.cxx:1445
 TXNetFile.cxx:1446
 TXNetFile.cxx:1447
 TXNetFile.cxx:1448
 TXNetFile.cxx:1449
 TXNetFile.cxx:1450
 TXNetFile.cxx:1451
 TXNetFile.cxx:1452
 TXNetFile.cxx:1453
 TXNetFile.cxx:1454