Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Wiki Markup
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; root\[1\]&nbsp; TChain \*ch = new TChain(<TreeName>)

Wiki Markup
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; root\[2\]&nbsp; ch->Add("root://<xrootdSrv>//test/testtree1.root)

Wiki Markup
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; root\[3\]&nbsp; ch->Add("root://<xrootdSrv>//test/testtree2.root)

Wiki Markup
&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; root\[4\]&nbsp; ch->Add("root://<xrootdSrv>//test/testtree3.root)

It is also allowed to use a wildcard (*) after the last '/' in the file name for the Add function of TChain. For example:
       ch->Add("root://<xrootdSrv>//test/test*.root)
would first do a dirlist of the directory /test/ and then add to the chain all files that match test*.root. In order for this to work with xrootd the cluster has to be setup properly. The Add() function will fist stat the directory (in the example above /test) followed by a dirlist (if dir exist). If the client is connected to a xrootd server there should be no problem. However, if the client is connected to a xrootd manager, the manager will redirect the client for the stat command but the client will go back to the manager to issue the dirlist. Therefore the manager has to be setup to return a valid directory listing.