Hi Phil,
In your macro/program, you can do:
gSystem->Exec("ls *.root > root.files");
then, open the system file root.files, read line by line
and call TChain::Add for each file.
I will add support for wildcarding in TChain::Add in the next version.
If you still have problems in implementing this logic, please
contact me and I will send you the few lines to do the work.
Rene Brun
On Fri, 18 Feb 2000, Philip M Borawski wrote:
> Could somebody please post an example of chaining over a large number of
> files without having to list each file manually with
>
> TChain chain("h1");
> chain.Add("rootfile1.root");
> chain.Add("rootfile2.root");
>
> I am a fairly new C++ and ROOT user and am having difficulty understanding
> how to do this efficently...is it easier to write the filenames to a file
> and just use C++ to read the strings in or can you use ROOT to read
> straight from the directory? Perhaps with GetListOfFiles? Any working
> example would help me immensely...
>
> Thank you.
>
> -phil
>
>
>
>
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:19 MET