Problem with merging trees via hadd

From: Michael Boehler <michael.boehler_at_cern.ch>
Date: Tue, 15 May 2012 19:43:49 +0200


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 Tue May 15 2012 - 19:43:55 CEST

This archive was generated by hypermail 2.2.0 : Tue May 15 2012 - 23:50:01 CEST