A TNetFile is like a normal TFile except that it reads and writes its data via a rootd server (for more on the rootd daemon see the source files in root/rootd/src/).
TNetFile file names are in standard URL format with protocol "root" or "roots". The following are valid TNetFile URL's:
root://hpbrun.cern.ch/root/hsimple.rootroot://pcna49a:5151/~na49/data/run821.rootroot://pcna49d.cern.ch:5050//v1/data/run810.rootThe only difference with the well known httpd URL's is that the root of the remote file tree is the user's home directory. Therefore an absolute pathname requires a // after the host or port specifier (see last example). Further the expansion of the standard shell characters, like ~, $, .., are handled as expected. TNetFile (actually TUrl) uses 1094 as default port for rootd.
Connecting to a rootd requires the remote user id and password. TNetFile allows three ways for you to provide your login: Setting it globally via the static functions:
~/.netrc file (same file as used by ftp)If the protocol is specified as "rootk" kerberos5 will be used for authentication.
The rootd daemon lives in the directory $ROOTSYS/bin. It can be started either via inetd or by hand from the command line (no need to be super user).