Re: [ROOT] Loading en masse

From: Rene Brun (Rene.Brun@cern.ch)
Date: Fri Sep 21 2001 - 16:51:17 MEST


This is a variant of my previous script

{
   //Load all ROOT scripts (*.C) in the current directory
   void *dirp = gSystem->OpenDirectory(".");
   const char *afile;
   char aline[256];
   while(afile = gSystem->GetDirEntry(dirp)) {
      if (strstr(afile,".C")) {
         printf("file: %s\n",afile);
         sprintf(aline,".L %s",afile);
         gROOT->ProcessLine(aline);
      }
   }
}


Rene Brun


On Fri, 21 Sep 2001, [iso-8859-1] Lindelöf David wrote:

> At 03:20 PM 21-09-01 +0200, Rene Brun wrote:
> >Hi David,
> >
> >A short example showing how to connect all files in the current directory.
> >See Directory tools in the class TSystem.
> 
> I was rather looking for a way to load all macros in a given directory (and 
> its subdirectories). Any trivial way of doing that?
> 
> Cheers,
> 
> David Lindelöf
> 



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:51:00 MET