merging files

From: chiara zampolli <Chiara.Zampolli_at_bo.infn.it>
Date: Tue, 31 Jan 2006 12:51:09 +0000


Dear rooters,

     for my analysis I would need to merge some files together (if I simply use one event, i.e. one file, I do have too little entries). TChains are useful in case the objects to be merged are TTrees, hadd is meant to be used in case one has to merge histograms, but in my case, the file only contain a TObjArray. So, I would like to add the entrues of the TObjArrays from severla files. The only idea I have, is to read the arrays from each file, and to build a huge array adding from time to time the entries from the new array I am considering.

     Is there any more elegant way to do that?

     Moreover, in case I would have to chain some files with trees, being these trees very complicated, the TChain algo which I can see from the How To's web page is sufficient or do I have to specify the branches, leaves.... when chaining the trees?

     Thank you for your help.
     Cheers,
          chiara
Received on Tue Jan 31 2006 - 12:42:07 MET

This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:31:57 MET