root icon indicating copy to clipboard operation
root copied to clipboard

hadd doesn't recompress for different algorithm at same level

Open dkpoult opened this issue 3 years ago • 2 comments

  • [x] Checked for duplicates

Describe the bug

When changing the compression settings using hadd, using the same compression level used by the input file won't trigger a recompression of the branches in the output file, even with a different algorithm.

ie. Passing -f301 with a 101 compressed input file results in a "301" compressed file but with 101 compressed branches.

Expected behavior

I would expect the output file's branches to be recompressed with the provided compression algorithm.

ie. Passing -f301 with a 101 compressed input file results in a genuine 301 compressed file with 301 compressed branches.

To Reproduce

  1. Get the compression settings of any .root file, for example the 101 compressed dimuon dataset.
  2. Run hadd and change the compression to a different algorithm of the same level, for example 101 -> 201 or 403 -> 303: hadd -f201 fake_dimuon_201.root orig_dimuon_101.root
  3. You can validate the weird behaviour by performing an intermediate conversion: hadd -f202 real_202_out.root orig_dimuon_101.root -> hadd -f201 real_dimuon_201.root real_dimuon_202.root

Setup

  1. ROOT Version 6.27/01
  2. Linux CentOS 8 + Linux Debian 11
  3. Built from source

Additional context

dkpoult avatar Aug 24 '22 09:08 dkpoult

You should also be able work around this issue the -O option

pcanal avatar Aug 24 '22 12:08 pcanal

Just confirming that the -O works

dkpoult avatar Aug 25 '22 09:08 dkpoult