Merging Root Files with same internal structures

Hi
I am trying to merge root files with the same internal structure using hadd.

hadd -f BT.root Tree*.root

However when this runs all that happens is that all my files are attached

Attaching file Tree1.root as _file1

My output file is not overwritten.
Any ideas?


ROOT Version: 6.2
Platform: Windows 10
Compiler: gcc


It works for me:

% ls hhh*.root
hhh1.root	hhh2.root	hhh3.root

% hadd HHH.root hhh*.root
hadd Target file: HHH.root
hadd compression setting for all output: 1
hadd Source file 1: hhh1.root
hadd Source file 2: hhh2.root
hadd Source file 3: hhh3.root
hadd Target path: HHH.root:/
hadd Target path: HHH.root:/subdir

% ls -l HHH.root hhh*.root
-rw-r--r--  1 couet  staff  1216412 Aug 24 08:59 HHH.root
-rw-r--r--  1 couet  staff   416070 Aug 24 08:58 hhh1.root
-rw-r--r--  1 couet  staff   416070 Aug 24 08:58 hhh2.root
-rw-r--r--  1 couet  staff   416070 Aug 24 08:58 hhh3.root
% 

Hi @JoshPBR ,
and welcome to the ROOT forum!
I cannot reproduce the problem either, I can use hadd -f to overwrite an existing file.
Is your ROOT version really 6.2? If so, you might want to update to a newer version.

Otherwise we’ll need a way to reproduce the issue, maybe you could try to reproduce the problem on LXPLUS or in a Docker container.

Cheers,
Enrico

This would be part of the expected output if you had written something like

root -f BT.root Tree*.root

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.