> Hi Valeri, > > On Mon, 12 Mar 2001 12:14:00 -0500 > "Valeri Fine (Faine)" <fine@bnl.gov> wrote > concerning ": Re: [ROOT] Request for iteration on TSystemDirectory": > > What about: > > > > http://root.cern.ch/root/htmldoc/TFileSet.html > > I did take a look at it, but then I got confused because I looked at > TFileIter (which I thaught was the right iterator for TFileSet). Well > thanks anyway. > > > One can iterate it using > > > > http://root.cern.ch/root/htmldoc/TDataSetIter.html > > > > the way you described. > Hello Christian I can not test version 3 at the moment. However with version 2.25 it works: ******************************************* * * * W E L C O M E to R O O T * * * * Version 2.25/01 8 August 2000 * * * * You are welcome to visit our Web site * * http://root.cern.ch * * * ******************************************* root.exe [13] TString a("~/public/expert") root.exe [14] TFileSet fs(a) root.exe [15] fs.ls(8) 0 - expert directory 1 - expert/Jeff directory 2 - expert/Jeff/SavePrim.C file 2 - expert/Jeff/myTestFile.C file 1 - expert/C++Fun directory 2 - expert/C++Fun/base1.h file 2 - expert/C++Fun/base2.cxx file 1 - expert/Leaks directory I'll test version 3 as soon as BNL computers are back to do something useful. Can you test your example with that version now ? Valeri > > root> gSystem->Load("libStar.so"); > root> TString home("/home/group/user") > root> TFileSet myHome(home) > > it hangs! That is, nothing happens. ROOT/CINT doen't do anything (I > let it sit there for at least ~30 minutes). Even if I do > > root> TFileSet myhome("/home/group/user", "foo", kFALSE) > > nothing (and I really mean nothing!) happens. What's up? > > I also tried to compile some code using TFileSet: > > #include <TString.h> > #include <TFileSet.h> > #include <TDataSetIter.h> > #include <TSystem.h> > #include <iostream> > > int foo() > { > TString home("/home/group/user"); > TFileSet myHome(home); > > cout << "Dir: " << myHome.GetName() << endl; > > TDataSetIter next(&myHome); > TObject* o = 0; > while((o = next.Next())) > cout << o->GetName() << endl; > > return 0; > } > > (I substitued proper group and user name of course.) > > Am I doing something wrong? > > Yours, > > Christian ----------------------------------------------------------- > Holm Christensen Phone: (+45) 35 35 96 91 > Sankt Hansgade 23, 1. th. Office: (+45) 353 25 305 > DK-2200 Copenhagen N Web: www.nbi.dk/~cholm > Denmark Email: cholm@nbi.dk >
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:39 MET