diff --git a/tree/dataframe/src/RForestDS.cxx b/tree/dataframe/src/RForestDS.cxx index bea55835dc1f5d345d764b7787cb4f8b95a86e3a..654a33d930280a3304e58ec83f64d3ff293ab608 100644 --- a/tree/dataframe/src/RForestDS.cxx +++ b/tree/dataframe/src/RForestDS.cxx @@ -66,7 +66,7 @@ RDataSource::Record_t RForestDS::GetColumnReadersImpl(std::string_view name, con } bool RForestDS::SetEntry(unsigned int /*slot*/, ULong64_t entryIndex) { - fForest->GetEntry(entryIndex, fEntry.get()); + fForest->SetEntry(entryIndex, fEntry.get()); return true; } diff --git a/tree/forest/v7/inc/ROOT/RForest.hxx b/tree/forest/v7/inc/ROOT/RForest.hxx index b09fa36b54e90f8033d6d245eb3d5f31a1dc1801..a972857e4eebb5fc2c9badc1c671bbac875eeb98 100644 --- a/tree/forest/v7/inc/ROOT/RForest.hxx +++ b/tree/forest/v7/inc/ROOT/RForest.hxx @@ -103,9 +103,9 @@ public: /// Analogous to Fill(), fills the default entry of the model. Returns false at the end of the forest. /// On I/O errors, raises an expection. - void GetEntry(ForestSize_t index) { GetEntry(index, fModel->GetDefaultEntry()); } + void SetEntry(ForestSize_t index) { SetEntry(index, fModel->GetDefaultEntry()); } /// Fills a user provided entry after checking that the entry has been instantiated from the forest model - void GetEntry(ForestSize_t index, RForestEntry* entry) { + void SetEntry(ForestSize_t index, RForestEntry* entry) { for (auto& value : *entry) { value.GetField()->Read(index, &value); } diff --git a/tree/forest/v7/test/forest.cxx b/tree/forest/v7/test/forest.cxx index 5fa84477d97642475436cb376802814b2980af77..07b748c69afcb0c6abff1d1e3b3a46cf2d755ecd 100644 --- a/tree/forest/v7/test/forest.cxx +++ b/tree/forest/v7/test/forest.cxx @@ -117,7 +117,7 @@ TEST(RForest, WriteRead) RInputForest forest(std::move(modelRead), std::make_unique<RPageSourceRoot>("f", "test.root")); EXPECT_EQ(1U, forest.GetNEntries()); - forest.GetEntry(0); + forest.SetEntry(0); EXPECT_EQ(42.0, *rdPt); EXPECT_EQ(7.0, *rdEnergy); @@ -173,7 +173,7 @@ TEST(RForest, Clusters) RInputForest forest(std::move(modelRead), std::make_unique<RPageSourceRoot>("f", "test.root")); EXPECT_EQ(3U, forest.GetNEntries()); - forest.GetEntry(0); + forest.SetEntry(0); EXPECT_EQ(42.0, *rdPt); EXPECT_STREQ("xyz", rdTag->c_str()); EXPECT_EQ(3U, rdNnlo->size()); @@ -186,12 +186,12 @@ TEST(RForest, Clusters) EXPECT_EQ(4.0, (*rdNnlo)[2][2]); EXPECT_EQ(8.0, (*rdNnlo)[2][3]); - forest.GetEntry(1); + forest.SetEntry(1); EXPECT_EQ(24.0, *rdPt); EXPECT_STREQ("", rdTag->c_str()); EXPECT_TRUE(rdNnlo->empty()); - forest.GetEntry(2); + forest.SetEntry(2); EXPECT_EQ(12.0, *rdPt); EXPECT_STREQ("12345", rdTag->c_str()); EXPECT_EQ(1U, rdNnlo->size()); @@ -384,7 +384,7 @@ TEST(RForest, RealWorld1) double chksumRead = 0.0; auto forest = RInputForest::Create(std::move(modelRead), "f", "test.root"); for (unsigned int i = 0; i < forest->GetNEntries(); ++i) { - forest->GetEntry(i); + forest->SetEntry(i); chksumRead += double(rdEvent) + rdEnergy; for (auto t : rdTimes) chksumRead += t; for (auto ind : rdIndices) chksumRead += double(ind);