Skip to content

Commit

Permalink
[ntuple] Allow RNTupleModel::GetToken before Freeze
Browse files Browse the repository at this point in the history
This already works when going via GetDefaultEntry() and is very
convenient to get tokens while building the fields.
  • Loading branch information
hahnjo committed Sep 26, 2024
1 parent 9f776ab commit c1dd9b0
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions tree/ntuple/v7/src/RNTupleModel.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -423,9 +423,6 @@ std::unique_ptr<ROOT::Experimental::REntry> ROOT::Experimental::RNTupleModel::Cr

ROOT::Experimental::REntry::RFieldToken ROOT::Experimental::RNTupleModel::GetToken(std::string_view fieldName) const
{
if (!IsFrozen())
throw RException(R__FAIL("invalid attempt to get field token of unfrozen model"));

const auto &topLevelFields = fFieldZero->GetSubFields();
auto it = std::find_if(topLevelFields.begin(), topLevelFields.end(),
[&fieldName](const RFieldBase *f) { return f->GetFieldName() == fieldName; });
Expand Down

0 comments on commit c1dd9b0

Please sign in to comment.