Skip to content

Commit

Permalink
[ntuple] Add test for RFieldToken usage with parallel writer
Browse files Browse the repository at this point in the history
  • Loading branch information
hahnjo committed Sep 26, 2024
1 parent c1dd9b0 commit 6eed7f9
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tree/ntuple/v7/test/ntuple_parallel_writer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,20 @@ TEST(RNTupleParallelWriter, Basics)
}
}

TEST(RNTupleParallelWriter, Tokens)
{
FileRaii fileGuard("test_ntuple_parallel_tokens.root");

auto model = RNTupleModel::CreateBare();
model->MakeField<float>("pt");
auto token = model->GetToken("pt");

auto writer = RNTupleParallelWriter::Recreate(std::move(model), "f", fileGuard.GetPath());
auto context = writer->CreateFillContext();
auto entry = context->CreateEntry();
auto pt = entry->GetPtr<float>(token);
}

TEST(RNTupleParallelWriter, Staged)
{
FileRaii fileGuard("test_ntuple_parallel_staged.root");
Expand Down

0 comments on commit 6eed7f9

Please sign in to comment.