File System Control in Root

Hi,

I am currently trying to combine the results of running an analysis script on ultiple input files, each of which results in the creation of a .root file in a separate directory. Is there any way from within Root to loop over the operating system’s directory structure?

Thanks.

Yes, use the TSystem class
root.cern.ch/root/htmldoc//TSystem.html
root.cern.ch/root/htmldoc//TUnixSystem.html

where TUnixSystem is a TSystem and the singleton pointed by gSystem.

In particular look at

//---- Directories virtual void *OpenDirectory(const char *name); virtual void FreeDirectory(void *dirp); virtual const char *GetDirEntry(void *dirp); virtual void *GetDirPtr() const { return 0; }

Rene