Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion tree/dataframe/src/RDFSnapshotHelpers.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -971,8 +971,13 @@ void ROOT::Internal::RDF::UntypedSnapshotRNTupleHelper::Finalize()
fFillContexts.clear();
// Then destroy the RNTupleParallelWriter and write the metadata.
fWriter.reset();
// Finally, close the output TFile to ensure it's properly written to disk. We don't destroy it to avoid triggering
// a warning about the lazy Snapshot not being triggered
fOutputFile->Close();

// We can now set the data source of the loop manager for the RDataFrame that is returned by the Snapshot call.
fOutputLoopManager->SetDataSource(std::make_unique<ROOT::RDF::RNTupleDS>(fDirName + "/" + fNTupleName, fFileName));
const auto fullNTupleName = fDirName.empty() ? fNTupleName : fDirName + '/' + fNTupleName;
fOutputLoopManager->SetDataSource(std::make_unique<ROOT::RDF::RNTupleDS>(fullNTupleName, fFileName));
}

/**
Expand Down
Loading