Re: [ROOT] Request for iteration on TSystemDirectory

From: Christian Holm Christensen (cholm@hehi03.nbi.dk)
Date: Mon Mar 12 2001 - 20:57:33 MET


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.

Uh. When I do 

  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