Re: Problem with merging trees via hadd

From: Michael Boehler <michael.boehler_at_cern.ch>
Date: Wed, 16 May 2012 09:45:25 +0200


Hi Philippe,

On 05/15/2012 08:12 PM, Philippe Canal wrote:
> Hi Michaeal,
>
> > the files are stored on the lxplus machine 247 in the tmp dir:
> /tmp/boehlerm
>
> However, I am unable to open the directory:
> scp: /tmp/boehlerm: Permission denied
you should have access now.
>
> > I saw, that the highest cycle version differes from the file in
> output_0001 to output_0002 and output_0003.
>
> That is controlled by the way the file were produce is usually
> directly related the amount of data in the (final version of) the TTree.
I was running some jobs on the GRID which were producing these root files, so I didn't explicitly steer the size.
>
> > but the entries in output_0001/ZmumuNp5_pt20.root are missing in the
> merged file.
>
> This is odd, I will need the files to try to reproduce this problem.

They should be available.
Thanks for your help.

Cheers,

      Michael

>
> Cheers,
> Philippe.
>
>
> On 5/15/12 12:57 PM, Michael Boehler wrote:
>> Hi Philippe,
>>
>> On 05/15/2012 07:48 PM, Philippe Canal wrote:
>>> Hi Michael,
>>>
>>> How did the merge fails?
>> The number of entries in the trees of the merged file (newFile.root)
>> does not match with my control histograms in the directory.
>>> (The instances are 'cycles' or backup copies of the TTree meta-data
>>> and hadd will ignore all but the highest cycle version).
>>
>> I saw, that the highest cycle version differes from the file in
>> output_0001 to output_0002 and output_0003.
>>
>> If the first file in hadd newFile.root file1.root file2.root
>> file3.root has another cycle number compared to the other files, the
>> trees are not merged.
>> (the tree in the merged file only contains the entries from file1.root ).
>>
>> If the first file is output_0002/ZmumuNp5_pt20.root for example,
>> which has the same cycle number as output_0003/ZmumuNp5_pt20.root,
>> the newfile has exactly the same number of entries in the tree as
>> output_0002/ZmumuNp5_pt20.root + output_0003/ZmumuNp5_pt20.root, but
>> the entries in output_0001/ZmumuNp5_pt20.root are missing in the
>> merged file.
>>
>>
>> Thanks for any help.
>>
>> Cheers,
>> Michael
>>
>>
>>>
>>> Cheers,
>>> Philippe.
>>>
>>> On 5/15/12 12:43 PM, Michael Boehler wrote:
>>>> Dear RootTalkers,
>>>>
>>>> I have the following problem:
>>>>
>>>> I'm trying to merge (three) root files with a directory with
>>>> histograms and trees via hadd.
>>>>
>>>> hadd newFile.root output_0001/ZmumuNp5_pt20.root
>>>> output_0002/ZmumuNp5_pt20.root output_0003/ZmumuNp5_pt20.root
>>>>
>>>>
>>>> The content of the files is listed below. The files have different
>>>> instances of the trees e.g. tau;26 in output_0001 and tau;17 in
>>>> output_0002.
>>>> The histogram merging is working perfectly. But the trees can only
>>>> be merged if the number behind ; is the same.
>>>>
>>>> First I was working with ROOT530. But also checking the *Pro*,
>>>> version 5.32/03
>>>> <http://root.cern.ch/drupal/content/production-version-532> didn't
>>>> solve this problem.
>>>> Is this a known problem? Is there any quick solution to solve this
>>>> problem?
>>>>
>>>> Thanks for any help.
>>>>
>>>> Cheers,
>>>> Michael
>>>>
>>>>
>>>>
>>>>
>>>> [lxplus247] /tmp/boehlerm > root -l output_0001/ZmumuNp5_pt20.root
>>>> root [0]
>>>> Attaching file output_0001/ZmumuNp5_pt20.root as _file0...
>>>> root [1] .ls
>>>> TFile** output_0001/ZmumuNp5_pt20.root
>>>> TFile* output_0001/ZmumuNp5_pt20.root
>>>> KEY: TDirectoryFile histos;1 histos
>>>> KEY: TTree tau;26 physics
>>>> KEY: TTree tau;25 physics
>>>> KEY: TTree tmvatree;1 tmvatree
>>>> KEY: TTree tauinfo;1 tauinfo
>>>>
>>>>
>>>> [lxplus247] /tmp/boehlerm > root -l output_0002/ZmumuNp5_pt20.root
>>>> root [0]
>>>> Attaching file output_0002/ZmumuNp5_pt20.root as _file0...
>>>> root [1] .ls
>>>> TFile** output_0002/ZmumuNp5_pt20.root
>>>> TFile* output_0002/ZmumuNp5_pt20.root
>>>> KEY: TDirectoryFile histos;1 histos
>>>> KEY: TTree tau;17 physics
>>>> KEY: TTree tau;16 physics
>>>> KEY: TTree tmvatree;1 tmvatree
>>>> KEY: TTree tauinfo;1 tauinfo
>>>>
>>>>
>>>> [lxplus247] /tmp/boehlerm > root -l output_0003/ZmumuNp5_pt20.root
>>>> root [0]
>>>> Attaching file output_0003/ZmumuNp5_pt20.root as _file0...
>>>> root [1] .ls
>>>> TFile** output_0003/ZmumuNp5_pt20.root
>>>> TFile* output_0003/ZmumuNp5_pt20.root
>>>> KEY: TDirectoryFile histos;1 histos
>>>> KEY: TTree tau;17 physics
>>>> KEY: TTree tau;16 physics
>>>> KEY: TTree tmvatree;1 tmvatree
>>>> KEY: TTree tauinfo;1 tauinfo
>>>>
>>>>
>>>> the files are stored on the lxplus machine 247 in the tmp dir:
>>>> /tmp/boehlerm
>>>>
>>
Received on Wed May 16 2012 - 09:45:39 CEST

This archive was generated by hypermail 2.2.0 : Thu May 17 2012 - 05:50:02 CEST