RDataFrame snapshot a tree with different cycle numbers in TDirectory


Dear experts,
With and without using multithreading, RDF Snapshot a tree with different cycle numbers “Z0;2” and “Z0;1” in TDirectory “NTuple” will create different root files.

using ROOT::RDataFrame;
void snapshot(){
    //ROOT::EnableImplicitMT();
    RDataFrame d("NTuple/Z0","4.4T_decay_pi_x1_part2.root");
    auto dr = d.Filter("abs(x)<30");
    dr.Snapshot("NTuple/Z0", "ss_noMT.root");
    return;
}

Without multithreading, there are NTuple/Z0 and Z0 in the output file. Why an additional tree Z0 is stored?
With multithreading, there is only NTuple/Z0 in the output file, which is what I want.
The input root file can be found here:
http://ihepbox.ihep.ac.cn/ihepbox/index.php/s/8zNkipeoH7sJaf5

ROOT Version: root6.20.04
Platform: SL7
Compiler: gcc4.8.5


1 Like

Hi @Yeung,
welcome to the ROOT forum and thank you for the report with a simple reproducer. This is now https://sft.its.cern.ch/jira/browse/ROOT-10790

I will take a look as soon as possible. Please ping us here or on the jira ticket if you don’t hear back within a week.
Cheers,
Enrico

1 Like

Hi,
the problem has been fixed in ROOT master and the fix will be available in the upcoming ROOT v6.22.
Let me know if you need a backport of the fix to v6.20 too.

Cheers,
Enrico

Many thanks! I will wait for v6.22.

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