diff --git a/tree/dataframe/src/RDFSnapshotHelpers.cxx b/tree/dataframe/src/RDFSnapshotHelpers.cxx index 02f1f2e438882..ec06e521cb935 100644 --- a/tree/dataframe/src/RDFSnapshotHelpers.cxx +++ b/tree/dataframe/src/RDFSnapshotHelpers.cxx @@ -1035,7 +1035,7 @@ struct SnapshotOutputWriter { { if (!fBranchToBitmaskMapping.empty()) { fFile->WriteObject(&fBranchToBitmaskMapping, - (std::string{"R_rdf_branchToBitmaskMapping_"} + fTree->GetName()).c_str()); + (std::string{"R_rdf_column_to_bitmask_mapping_"} + fTree->GetName()).c_str()); } if (fTree) { // use AutoSave to flush TTree contents because TTree::Write writes in gDirectory, not in fDirectory diff --git a/tree/dataframe/src/RDataFrame.cxx b/tree/dataframe/src/RDataFrame.cxx index bcd63dc8e6a71..ba19560d1b143 100644 --- a/tree/dataframe/src/RDataFrame.cxx +++ b/tree/dataframe/src/RDataFrame.cxx @@ -1271,10 +1271,10 @@ dataset as a `std::uin64_t`. For every 64 columns, a new bitmask column is added For each column that gets varied, the nominal and all variation columns are each assigned a bit to denote whether their entries are valid. A mapping of column names to the corresponding bitmask is placed in the same file as the output -dataset, with a name that follows the pattern `"R_rdf_branchToBitmaskMapping_"`. It is of type +dataset, with a name that follows the pattern `"R_rdf_column_to_bitmask_mapping_"`. It is of type `std::unordered_map>`, and maps a column name to the name of the bitmask column and the index of the relevant bit. For example, in the same file as the dataset "Events" there would be -an object named `R_rdf_branchToBitmaskMapping_Events`. This object for example would describe a connection such as: +an object named `R_rdf_column_to_bitmask_mapping_Events`. This object for example would describe a connection such as: ~~~ muon_pt --> (R_rdf_mask_Events_0, 42) diff --git a/tree/dataframe/src/RTTreeDS.cxx b/tree/dataframe/src/RTTreeDS.cxx index 502abfbddcc2d..824ff39c565a4 100644 --- a/tree/dataframe/src/RTTreeDS.cxx +++ b/tree/dataframe/src/RTTreeDS.cxx @@ -522,7 +522,7 @@ ROOT::Internal::RDF::RTTreeDS::CreateColumnReader(unsigned int /*slot*/, std::st if (TDirectory *treeDir = treeReader->GetTree()->GetDirectory(); treeDir) { using Map_t = std::unordered_map>; const std::string bitmaskMapName = - std::string{"R_rdf_branchToBitmaskMapping_"} + treeReader->GetTree()->GetName(); + std::string{"R_rdf_column_to_bitmask_mapping_"} + treeReader->GetTree()->GetName(); if (Map_t const *columnMaskMap = treeDir->Get(bitmaskMapName.c_str()); columnMaskMap) { if (auto it = columnMaskMap->find(std::string(col)); it != columnMaskMap->end()) { colReader = std::make_unique(*treeReader, std::move(colReader), it->second.first, diff --git a/tree/dataframe/test/dataframe_snapshotWithVariations.cxx b/tree/dataframe/test/dataframe_snapshotWithVariations.cxx index ab69fc11fb45e..f7aa7e3088e20 100644 --- a/tree/dataframe/test/dataframe_snapshotWithVariations.cxx +++ b/tree/dataframe/test/dataframe_snapshotWithVariations.cxx @@ -219,7 +219,7 @@ TEST(RDFVarySnapshot, Bitmask) ASSERT_NE(branch, nullptr); auto *branchToIndexMap = file.Get>>( - ("R_rdf_branchToBitmaskMapping_" + treename).c_str()); + ("R_rdf_column_to_bitmask_mapping_" + treename).c_str()); ASSERT_NE(branchToIndexMap, nullptr); for (const auto branchName : {"x", "y", "x__xVar_0", "x__xVar_1", "y__xVar_0", "y__xVar_0"}) { ASSERT_NE(branchToIndexMap->find(branchName), branchToIndexMap->end()); @@ -339,8 +339,8 @@ TEST(RDFVarySnapshot, TwoVariationsInSameFile) auto snap2 = rdf.Filter(cuts2, {"x", "y"}).Snapshot(treename2, filename, {"x", "y"}, options); std::unique_ptr file{TFile::Open(filename)}; - EXPECT_NE(file->GetKey(("R_rdf_branchToBitmaskMapping_" + treename1).c_str()), nullptr); - EXPECT_NE(file->GetKey(("R_rdf_branchToBitmaskMapping_" + treename2).c_str()), nullptr); + EXPECT_NE(file->GetKey(("R_rdf_column_to_bitmask_mapping_" + treename1).c_str()), nullptr); + EXPECT_NE(file->GetKey(("R_rdf_column_to_bitmask_mapping_" + treename2).c_str()), nullptr); // In Windows, an exception is thrown as expected, but it cannot be caught for the time being: #if !defined(_MSC_VER) || defined(R__ENABLE_BROKEN_WIN_TESTS)