Streamer type error when using RDataFrame Snapshot

Hi,

I’m trying to save some information using the Snapshot method in RDataFrame, but only a few of the events end up being saved. The following error is displayed when I run:

Warning in <TTree::CopyEntries>: The export branch and the import branch do not have the same streamer type. (The branch name is triggerMap.first.)

I believe the problematic line is:

trigger_map.Snapshot( "triggerList", output_filename, {"triggerMap", "runNumber", "eventNumber", "mcEventWeight"}, ROOT::RDF::RSnapshotOptions("UPDATE", ROOT::kZLIB, 1, 0, 99, false));

…where triggerMap is a std::map<std::string, double> of trigger names and SFs.

Any information that could help me narrow down what exactly my problem might be would be greatly appreciated.

Cheers,
James

Reading through this thread, and in particular this post, it looks like this may be a known issue. The solution for now seems to be to disable multi-threading. When I do that, everything seems to work. If anyone could confirm this is the situation, that’d be useful.

Hi James,
welcome to the ROOT forum!

Well done tracking down that thread, indeed that might be it. The underlying bug should be fixed in ROOT master. Could you check this is the case e.g. using a nightly ROOT build from lxplus (source /cvmfs/sft.cern.ch/lcg/views/dev3/latest/x86_64-centos7-gcc8-dbg/setup.sh)?

Cheers,
Enrico

Hi Enrico,

Thank you for the response and suggestion - it worked! Can I ask, is this part of ROOT version 6.20/04 or not yet part of an official release?

Cheers,
James

Hi,
the fix was merged in ROOT quite recently, on the 13th of April, so it’s not yet part of any ROOT release (you can see the ticket here and the relevant pull request here). It will be included in the upcoming ROOT v6.22 and I actually had just asked whether we can backport it to v6.20 so it will be part of v6.20/06.

Cheers,
Enrico

Cool, sounds good. Cheers for the help!

James

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