Skip to content

Commit d31feae

Browse files
committed
Apply suggestions from code review
Co-authored by: Jakob Blomer <[email protected]>
1 parent 86a14fc commit d31feae

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

root/tree/dataframe/RNTupleDSBenchmarks.cxx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,7 @@ auto Dataframe(DF &frame)
5858

5959
static void BM_RNTupleDS_LHCB(benchmark::State &state)
6060
{
61-
auto model = ROOT::Experimental::RNTupleModel::Create();
62-
auto ntuple =
63-
ROOT::Experimental::RNTupleReader::Open(std::move(model), "DecayTree", RB::GetDataDir() + "/B2HHH~none.ntuple");
61+
auto ntuple = ROOT::Experimental::RNTupleReader::Open("DecayTree", RB::GetDataDir() + "/B2HHH~none.ntuple");
6462
const Long64_t nEntries = ntuple->GetNEntries() * (state.range(0) / 100.);
6563

6664
auto df = ROOT::Experimental::MakeNTupleDataFrame("DecayTree", RB::GetDataDir() + "/B2HHH~none.ntuple");

root/tree/tree/RNTupleLHCBBenchmarks.cxx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ static void BM_RNTuple_LHCB(benchmark::State &state)
2323
using RNTupleReader = ROOT::Experimental::RNTupleReader;
2424
using RNTupleModel = ROOT::Experimental::RNTupleModel;
2525

26-
auto model = RNTupleModel::Create();
27-
auto ntuple = RNTupleReader::Open(std::move(model), "DecayTree", RB::GetDataDir() + "/B2HHH~none.ntuple");
26+
auto ntuple = RNTupleReader::Open("DecayTree", RB::GetDataDir() + "/B2HHH~none.ntuple");
2827
auto viewH1IsMuon = ntuple->GetView<int>("H1_isMuon");
2928
auto viewH2IsMuon = ntuple->GetView<int>("H2_isMuon");
3029
auto viewH3IsMuon = ntuple->GetView<int>("H3_isMuon");
@@ -54,8 +53,6 @@ static void BM_RNTuple_LHCB(benchmark::State &state)
5453
for (auto _ : state) {
5554
hMass->Reset();
5655
for (auto i = 0ll; i < nEntries; ++i) {
57-
ntuple->LoadEntry(i);
58-
5956
if (viewH1IsMuon(i) || viewH2IsMuon(i) || viewH3IsMuon(i)) {
6057
continue;
6158
}

0 commit comments

Comments
 (0)