Hi, On Wed, 14 Aug 2002 14:42:26 -0300 Luiz Martins Mundim Filho <mundim@uerj.br> wrote concerning "Re: [ROOT] TChain::Add with wildcards in 3.03/07": > As of some time ago, there's an alternative approach to doing this: TChain* chain = new TChain("Tree", "A Tree"); TSystemDirectory* dataDir = new TSystemDirectory("data", Form("%s/data", gSystem->HomeDirectory())); TList* contents = dataDir->GetListOfFiles(); TIter next(contents); TSystemFile* file; while ((file = (TSystemFile*)next())) { if (file->IsDirectory()) continue; // Here one can do all sorts of fancy tests, using regular // expressions, checking access privileges, file sizes, and god // knows what if (TString(file->GetName()).EndsWidth(".root")) chain->Add(Form("%s/%s", file->GetTitle(), file->GetName())); } The functionality was introduced into CVS at 2002-07-31, but I'm afraid that I haven't got the faintest idea of what that corresponds to in terms of version numbers. Grab the CVS head :-) Yours, ____ | Christian Holm Christensen |_| | ------------------------------------------------------------- | | Address: Sankt Hansgade 23, 1. th. Phone: (+45) 35 35 96 91 _| DK-2200 Copenhagen N Cell: (+45) 24 61 85 91 _| Denmark Office: (+45) 353 25 305 ____| Email: cholm@nbi.dk Web: www.nbi.dk/~cholm | |
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:04 MET