...
The second recipe below works for ROOT version 5.16 but not for 5.18. Please see this Root Talk discussion for a method that works with 5.18. http://root.cern.ch/phpBB2/viewtopic.php?t=4857&highlight=tfileinfo+createlist
in particular the response posted by user ganis on Wed Jan 23, 2008 13:04
...
Here is a technique as described in ROOT-talk (http://root.cern.ch/phpBB2/viewtopic.php?t=4857&highlight=&sid=621b9582641b9fcb3f9c4af806442fb5).
1. Create a file containing a list of desired xrootd files.
...
Code Block |
---|
root [0] TChain *c = new TChain("MeritTuple") root [1] TList *filelist = TFileInfo::CreateList("filelist.txt") root [2] c.AddFileInfoList(filelist) (Int_t)(1) root [3] delete filelist |
...
The "root \ [1\]" line must refer to the file created in the previous step, including a full file path if it is not in your current working directory.
Voila!
3. Now you can work with the TChain as expected, e.g.,
...