Type name error after RNTuple Merging


Hello ! Here is a summary of my problem.
Objective : merging several RNTuples in a single RNTuple to ease analysis.
Method : I use the TFileMerger.
Success : The output RNTuple is readable (by a TBrowser for instance).
Problem : whenever I try to do some actual analysis of the output RNTuple (using the method described in the RNTuple ntpl010_skim tutorial, to add computed fields/make cuts…), something breaks.
More precisely (after rigorous investigation), it is when using the ROOT::RNTupleReader::GetModel().
Error thrawn :
```
root [2] addIsEventWW4Jets(“temp_xs_merged_e189_d2.tree.root”)
Treating temp_xs_merged_e189_d2.tree.root…
Error in <TRint::HandleTermInput()>: ROOT::RException caught: incompatible type name for field _0: ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D>> vs. ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D > >
At:
virtual void ROOT::RClassField::BeforeConnectPageSource(ROOT::Internal::RPageSource&) [/root/parts/root/src/tree/ntuple/src/RFieldMeta.cxx:440]
```**
Presumed analysis** : From what I understand this is due to a change in what c++ allowed between versions in the function templates syntax. (“>>” not allowed and replaced by “> >”, then allowed in a lated version).

Does anyone have a solution for that ? Be it another way to merge RNTuples, a system-wide or script-wide fix for this specific error,…
Thanks in advance !

ROOT Version: 6.36.04
Platform: Ubuntu 26.04 (24.04)
Compiler: C++ 13.3.0


Welcome to the ROOT Forum!
Maybe @jblomer or @pcanal can help you with that

1 Like

This looks like an issue with type name normalization. Could it be that the input files were produced with ROOT v6.34? Later ROOT versions do workaround the 6.34 type name issue but perhaps merging the files breaks the workaround. @silverweed Can you take a look?

Would it be possible to give us access to the input files?

1 Like

Here is the shared folder from my CERNBox, containing all the files I am merging, and to which you should have access if I understood how it works correctly : ```https://cernbox.cern.ch/s/D6eYOmxeaeHZzuz``` (sorry, as a new user the forum doesn’t let me share links)
Regarding the version of root used, I created the files using delphi-nanoaod scripts, on CERN’s cluster lxplus, which should use ROOT 6.38.04.

Thank you! From what I can see, files were indeed produced with ROOT v6.34.

I think I see the error in the RNTuple merger that explains the problem. We’ll most likely create a github issue and fix it in the RNTuple merging code. We’ll keep you posted.

Thanks a lot !