Re: [ROOT] Making a chain from a file list.

From: Rene Brun (Rene.Brun@cern.ch)
Date: Thu Apr 29 2004 - 12:44:04 MEST


Hi Drew,

Assuming that you have Myclass.h and Myclass.C (the two files generated
by MakeClass) and a TChain chain object, do
root > .L Myclass.C
root > Myclass a(&chain)
root > a.Loop()
root > chain.Delete()

Rene Brun

Drew Alton wrote:
> 
> Hello,
>    I am running over a large number of root-tuples and skimming out the
> events I want to keep.
>    Given the number of files and events I have I want to keep some
> separations.
>    My general plan is to chain a list of files from the same data set,
> use MakeClass to make a class, which will skim out the ones of interest
> to me.  Then repeat it for each data set.  Since all the data sets have
> the same format, the same make class could be used, except that the .h
> file will have the wrong list of root tuples.  In the past I've just
> changed this by hand, but it occures to me that it ought to be possible
> at run time to read a file which contains the list of files to chain
> together.
>    Has anyone ever done this...have any examples?
>    Thanks for the help.
>                                               -Drew



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:07 MET