Re: hadd: "too many open files"

From: Vladimir Savinov <vps3_at_pitt.edu>
Date: Sat, 6 Aug 2011 17:22:08 -0400


Valeri,
does this script also merge TTrees?
And, also, do you know why hadd needs to keep all files open until the end of merging?
thanks,
v

On 8/6/2011 4:13 PM, Fine, Valeri wrote:
>
> There is no need to open all files to merge it.
>
> For example STAR experiment uses the MergeHistogramFile.C attached.
>
> ( it can be found on afs
>
> /afs/rhic.bnl.gov/star/packages/DEV/StRoot/macros/analysis/MergeHistogramFile.C
> )
>
> The script opens the input files one by one. Been compiled with
> ACliC it works much faster than the regular 'hadd"
>
> .
>
> Best regards , Valeri Fine
>
> -----------------------------------
>
> Brookhaven National Laboratory
>
> Upton, NY 11973
>
> Phone +1-631-344-7806
>
> *From:*owner-roottalk_at_root.cern.ch
> [mailto:owner-roottalk_at_root.cern.ch] *On Behalf Of *Noel Dawe
> *Sent:* Saturday, August 06, 2011 6:19 AM
> *To:* roottalk_at_cern.ch
> *Subject:* [ROOT] hadd: "too many open files"
>
> I don't know why hadd needs to open all the files at the same time but
> probably a better way to write this tool would be to never open more
> than two files at once: copy the first file to the destination and
> keep it open, then pop off the next file, open it, merge it into the
> first, close it, then pop off the next file and open it, etc...
>
> Noel
>
Received on Sat Aug 06 2011 - 23:22:18 CEST

This archive was generated by hypermail 2.2.0 : Mon Aug 08 2011 - 05:50:01 CEST