RNtuple change compression

Hi.

I’m converting TTree to RNtuples using this tutorial
https://root.cern/doc/master/ntpl008__import_8C.html
It works, and also able to run RootDataFrame on the converted RNtuples :slight_smile: .

I tried to change the compression scheme adding the following but it seems not to be effective , i.e. it always write with the defaults.

   auto writeOptions = importer->GetWriteOptions();
   writeOptions.SetCompression(404);
   importer->SetWriteOptions(writeOptions);

I’m using the ROOT 6.35.01

Original open data nanoAOD
https://xrootd-local.unl.edu:1094//store/user/AGC/nanoAOD/TT_TuneCUETP8M1_13TeV-powheg-pythia8/cmsopendata2015_ttbar_19980_PU25nsData2015v1_76X_mcRun2_asymptotic_v12_ext3-v1_00000_0000.root

_file0->GetCompressionSettings()
(int) 1
 _file0->GetCompressionAlgorithm()
(int) 0
_file0->GetCompressionLevel()
(int) 1
_file0->GetCompressionFactor()
(float) 2.88449f

when converted RNTUPLES

_file0->GetCompressionSettings()
(int) 101
_file0->GetCompressionAlgorithm()
(int) 1
_file0->GetCompressionLevel()
(int) 1
_file0->GetCompressionFactor()
(float) 3.75138f

What I’m missing ?

Thanks
Maria

The result of _file0->GetCompression* returns the default compression settings for any object that will be stored in the file. In order to get the compression settings for objects that have already been stored in the file you need to interogate the key or the TTree object of the RNTuple itself.

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