Chiara,
This cannot be done in a general way. TObjArray could be "summed" in
several ways
-adding the objects from each array and making a new big array, ie
if each TObjArray has N entries and you have 100 files, the final
TObjArray will have 100*N entries.
-adding object I from each TObjArray to a new TObjArray of same length,
you get a TObjArray of length N.
etc
So, you must provide an iterator with your own algorithm.
Rene brun
On Tue, 31
Jan 2006, chiara zampolli wrote:
> 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 - 18:04:01 MET
This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:31:57 MET