14 # include "TDirectory.h"
15 # include "StFileIter.h"
19 int Ls(TDirectory *dir,
const char *pattern=
"*", Bool_t wildcard=kTRUE)
22 if (!dir) dir = gDirectory;
25 TRegexp cmp(pattern,wildcard);
28 while (key = iter.NextEventKey()) {
29 const char *name = key->GetName();
30 Ssiz_t test = cmp.Index(name,&len);
31 if ((test>=0) && len) {
32 Printf(
"- %s class: %s", name, key->GetClassName());
36 Printf(
" ------------");
37 Printf(
" %d object%s ha%s been found", counter
38 , ((counter>1) ?
"s" :
"")
39 , ((counter>1) ?
"ve":
"s")
50 int Ls(
const char *pattern=
"*", Bool_t wildcard=kTRUE)
52 return Ls(gDirectory,pattern, wildcard);