diff --git a/tree/ntuple/inc/ROOT/RField/RFieldSequenceContainer.hxx b/tree/ntuple/inc/ROOT/RField/RFieldSequenceContainer.hxx index 82f685bde14e7..e4bc41dafc61b 100644 --- a/tree/ntuple/inc/ROOT/RField/RFieldSequenceContainer.hxx +++ b/tree/ntuple/inc/ROOT/RField/RFieldSequenceContainer.hxx @@ -27,14 +27,12 @@ namespace ROOT { +class RSoAField; + namespace Detail { class RFieldVisitor; } // namespace Detail -namespace Experimental { -class RSoAField; -} - namespace Internal { std::unique_ptr CreateEmulatedVectorField(std::string_view fieldName, std::unique_ptr itemField, std::string_view emulatedFromType); @@ -117,7 +115,7 @@ public: /// The type-erased field for a RVec class RRVecField : public RFieldBase { friend class RArrayAsRVecField; // to use the RRVecDeleter and to call ResizeRVec() - friend class ROOT::Experimental::RSoAField; // to call ResizeRVec() + friend class ROOT::RSoAField; // to call ResizeRVec() // Ensures that the RVec pointed to by rvec has at least nItems valid elements // Returns the possibly new "begin pointer" of the RVec, i.e. the pointer to the data area. diff --git a/tree/ntuple/inc/ROOT/RField/RFieldSoA.hxx b/tree/ntuple/inc/ROOT/RField/RFieldSoA.hxx index ddc844cc17049..308c2b6ff5469 100644 --- a/tree/ntuple/inc/ROOT/RField/RFieldSoA.hxx +++ b/tree/ntuple/inc/ROOT/RField/RFieldSoA.hxx @@ -32,8 +32,6 @@ class TClass; namespace ROOT { -namespace Experimental { - /// The SoA field provides I/O for an in-memory SoA layout linked to an on-disk collection of the underlying record. /// As a concrete example, for an underlying record type /// \code{.cpp} @@ -147,7 +145,6 @@ public: TClass *GetSoAClass() const { return fClass; } }; -} // namespace Experimental } // namespace ROOT #endif // ROOT_RField_SoA diff --git a/tree/ntuple/inc/ROOT/RFieldVisitor.hxx b/tree/ntuple/inc/ROOT/RFieldVisitor.hxx index 01bca5bf7a49b..99106afa6bed2 100644 --- a/tree/ntuple/inc/ROOT/RFieldVisitor.hxx +++ b/tree/ntuple/inc/ROOT/RFieldVisitor.hxx @@ -92,7 +92,7 @@ public: virtual void VisitVectorField(const ROOT::RVectorField &field) { VisitField(field); } virtual void VisitVectorBoolField(const ROOT::RField> &field) { VisitField(field); } virtual void VisitRVecField(const ROOT::RRVecField &field) { VisitField(field); } - virtual void VisitSoAField(const ROOT::Experimental::RSoAField &field) { VisitField(field); } + virtual void VisitSoAField(const ROOT::RSoAField &field) { VisitField(field); } }; // class RFieldVisitor } // namespace Detail @@ -238,7 +238,7 @@ public: void VisitNullableField(const ROOT::RNullableField &field) final; void VisitEnumField(const ROOT::REnumField &field) final; void VisitAtomicField(const ROOT::RAtomicField &field) final; - void VisitSoAField(const ROOT::Experimental::RSoAField &field) final; + void VisitSoAField(const ROOT::RSoAField &field) final; }; // clang-format off diff --git a/tree/ntuple/src/RFieldBase.cxx b/tree/ntuple/src/RFieldBase.cxx index 4762beeeceef8..0b7c981ead8ee 100644 --- a/tree/ntuple/src/RFieldBase.cxx +++ b/tree/ntuple/src/RFieldBase.cxx @@ -505,7 +505,7 @@ ROOT::RFieldBase::Create(const std::string &fieldName, const std::string &typeNa // situation we rely on field emulation instead. else if (cl->GetState() >= TClass::kInterpreted) { if (!ROOT::Internal::GetRNTupleSoARecord(cl).empty()) { - result = std::make_unique(fieldName, typeName); + result = std::make_unique(fieldName, typeName); } else if (ROOT::Internal::GetRNTupleSerializationMode(cl) == ROOT::Internal::ERNTupleSerializationMode::kForceStreamerMode) { result = std::make_unique(fieldName, typeName); diff --git a/tree/ntuple/src/RFieldMeta.cxx b/tree/ntuple/src/RFieldMeta.cxx index 57fa885b20cd8..8358f1274f1be 100644 --- a/tree/ntuple/src/RFieldMeta.cxx +++ b/tree/ntuple/src/RFieldMeta.cxx @@ -689,7 +689,7 @@ void ROOT::RClassField::AcceptVisitor(ROOT::Detail::RFieldVisitor &visitor) cons //------------------------------------------------------------------------------ -ROOT::Experimental::RSoAField::RSoAField(std::string_view fieldName, const RSoAField &source) +ROOT::RSoAField::RSoAField(std::string_view fieldName, const RSoAField &source) : ROOT::RRuleField(fieldName, source.GetTypeName(), source.fClass, ROOT::ENTupleStructure::kCollection), fSoAMemberOffsets(source.fSoAMemberOffsets) { @@ -702,12 +702,12 @@ ROOT::Experimental::RSoAField::RSoAField(std::string_view fieldName, const RSoAF fLockSplitFields = std::make_unique(); } -ROOT::Experimental::RSoAField::RSoAField(std::string_view fieldName, std::string_view className) +ROOT::RSoAField::RSoAField(std::string_view fieldName, std::string_view className) : RSoAField(fieldName, EnsureValidClass(className)) { } -void ROOT::Experimental::RSoAField::GraftNestedMemberFields( +void ROOT::RSoAField::GraftNestedMemberFields( const RSoAField &nestedSoA, std::size_t offsetInParent, const std::function &fnRecordFieldFinder) { @@ -742,7 +742,7 @@ void ROOT::Experimental::RSoAField::GraftNestedMemberFields( } } -void ROOT::Experimental::RSoAField::CollectRecordMemberFields() +void ROOT::RSoAField::CollectRecordMemberFields() { // Build a map of all subfields (nested) of the underlying record type. Map the fully qualified name of the // subfields to their field pointer, so that we can later match the subfields of the SoA class to their corresponding @@ -892,14 +892,9 @@ void ROOT::Experimental::RSoAField::CollectRecordMemberFields() fRules.emplace_back(RRule{r, 0}); } -ROOT::Experimental::RSoAField::RSoAField(std::string_view fieldName, TClass *clSoA) +ROOT::RSoAField::RSoAField(std::string_view fieldName, TClass *clSoA) : ROOT::RRuleField(fieldName, GetRenormalizedTypeName(clSoA->GetName()), clSoA, ROOT::ENTupleStructure::kCollection) { - static std::once_flag once; - std::call_once(once, []() { - R__LOG_WARNING(ROOT::Internal::NTupleLog()) << "The SoA field is experimental and still under development."; - }); - EnsureValidUserClass(fClass, *this, "RSoAField"); const auto recordTypeName = ROOT::Internal::GetRNTupleSoARecord(fClass); if (recordTypeName.empty()) { @@ -931,12 +926,12 @@ ROOT::Experimental::RSoAField::RSoAField(std::string_view fieldName, TClass *clS fLockSplitFields = std::make_unique(); } -std::unique_ptr ROOT::Experimental::RSoAField::CloneImpl(std::string_view newName) const +std::unique_ptr ROOT::RSoAField::CloneImpl(std::string_view newName) const { return std::unique_ptr(new RSoAField(newName, *this)); } -const ROOT::RFieldBase::RColumnRepresentations &ROOT::Experimental::RSoAField::GetColumnRepresentations() const +const ROOT::RFieldBase::RColumnRepresentations &ROOT::RSoAField::GetColumnRepresentations() const { static RColumnRepresentations representations({{ENTupleColumnType::kSplitIndex64}, {ENTupleColumnType::kIndex64}, @@ -946,17 +941,17 @@ const ROOT::RFieldBase::RColumnRepresentations &ROOT::Experimental::RSoAField::G return representations; } -void ROOT::Experimental::RSoAField::GenerateColumns() +void ROOT::RSoAField::GenerateColumns() { GenerateColumnsImpl(); } -void ROOT::Experimental::RSoAField::GenerateColumns(const ROOT::RNTupleDescriptor &desc) +void ROOT::RSoAField::GenerateColumns(const ROOT::RNTupleDescriptor &desc) { GenerateColumnsImpl(desc); } -std::size_t ROOT::Experimental::RSoAField::AppendImpl(const void *from) +std::size_t ROOT::RSoAField::AppendImpl(const void *from) { const std::size_t nSoAMembers = fSoAMemberOffsets.size(); @@ -998,7 +993,7 @@ std::size_t ROOT::Experimental::RSoAField::AppendImpl(const void *from) return nbytes + fPrincipalColumn->GetElement()->GetPackedSize(); } -void ROOT::Experimental::RSoAField::ReadGlobalImpl(ROOT::NTupleSize_t globalIndex, void *to) +void ROOT::RSoAField::ReadGlobalImpl(ROOT::NTupleSize_t globalIndex, void *to) { // Read collection info for this entry ROOT::NTupleSize_t N; @@ -1036,8 +1031,7 @@ void ROOT::Experimental::RSoAField::ReadGlobalImpl(ROOT::NTupleSize_t globalInde } } -std::unique_ptr -ROOT::Experimental::RSoAField::BeforeConnectPageSource(ROOT::Internal::RPageSource & /*pageSource*/) +std::unique_ptr ROOT::RSoAField::BeforeConnectPageSource(ROOT::Internal::RPageSource & /*pageSource*/) { // Most of the heavy lifting is done by the actual subfields that map onto the on-disk AoS schema. // In the SoA field itself, we only need to take care of the in-memory part of the rule processing. @@ -1069,27 +1063,25 @@ ROOT::Experimental::RSoAField::BeforeConnectPageSource(ROOT::Internal::RPageSour return nullptr; } -void ROOT::Experimental::RSoAField::ReconcileOnDiskField(const RNTupleDescriptor &desc) +void ROOT::RSoAField::ReconcileOnDiskField(const RNTupleDescriptor &desc) { EnsureMatchingOnDiskField(desc, kDiffTypeName | kDiffTypeVersion).ThrowOnError(); } -void ROOT::Experimental::RSoAField::ConstructValue(void *where) const +void ROOT::RSoAField::ConstructValue(void *where) const { fClass->New(where); } -ROOT::Experimental::RSoAField::RSoADeleter::RSoADeleter(TClass *cl) : RDeleter(cl->GetClassAlignment()), fSoAClass(cl) -{ -} +ROOT::RSoAField::RSoADeleter::RSoADeleter(TClass *cl) : RDeleter(cl->GetClassAlignment()), fSoAClass(cl) {} -void ROOT::Experimental::RSoAField::RSoADeleter::operator()(void *objPtr, bool dtorOnly) +void ROOT::RSoAField::RSoADeleter::operator()(void *objPtr, bool dtorOnly) { fSoAClass->Destructor(objPtr, true /* dtorOnly */); RDeleter::operator()(objPtr, dtorOnly); } -void ROOT::Experimental::RSoAField::ReconstructSplitFields() const +void ROOT::RSoAField::ReconstructSplitFields() const { std::lock_guard lockGuard(*fLockSplitFields); if (fSplitFields) @@ -1118,7 +1110,7 @@ void ROOT::Experimental::RSoAField::ReconstructSplitFields() const } } -std::vector ROOT::Experimental::RSoAField::SplitValue(const RValue &value) const +std::vector ROOT::RSoAField::SplitValue(const RValue &value) const { ReconstructSplitFields(); const auto nSplitFields = fSplitFields->size(); @@ -1133,29 +1125,29 @@ std::vector ROOT::Experimental::RSoAField::SplitValue( return values; } -std::size_t ROOT::Experimental::RSoAField::GetValueSize() const +std::size_t ROOT::RSoAField::GetValueSize() const { return fClass->GetClassSize(); } -std::uint32_t ROOT::Experimental::RSoAField::GetTypeVersion() const +std::uint32_t ROOT::RSoAField::GetTypeVersion() const { return fClass->GetClassVersion(); } -std::uint32_t ROOT::Experimental::RSoAField::GetTypeChecksum() const +std::uint32_t ROOT::RSoAField::GetTypeChecksum() const { return fClass->GetCheckSum(); } -std::size_t ROOT::Experimental::RSoAField::GetAlignment() const +std::size_t ROOT::RSoAField::GetAlignment() const { const auto align = fClass->GetClassAlignment(); EnsureValidAlignment(align); return align; } -const std::type_info *ROOT::Experimental::RSoAField::GetPolymorphicTypeInfo() const +const std::type_info *ROOT::RSoAField::GetPolymorphicTypeInfo() const { // TODO(jblomer): factor out bool polymorphic = fClass->ClassProperty() & kClassHasVirtual; @@ -1165,7 +1157,7 @@ const std::type_info *ROOT::Experimental::RSoAField::GetPolymorphicTypeInfo() co return fClass->GetTypeInfo(); } -void ROOT::Experimental::RSoAField::AcceptVisitor(ROOT::Detail::RFieldVisitor &visitor) const +void ROOT::RSoAField::AcceptVisitor(ROOT::Detail::RFieldVisitor &visitor) const { visitor.VisitSoAField(*this); } diff --git a/tree/ntuple/src/RFieldVisitor.cxx b/tree/ntuple/src/RFieldVisitor.cxx index 05e34fab35743..959851b54f39e 100644 --- a/tree/ntuple/src/RFieldVisitor.cxx +++ b/tree/ntuple/src/RFieldVisitor.cxx @@ -408,7 +408,7 @@ void ROOT::Internal::RPrintValueVisitor::VisitRVecField(const ROOT::RRVecField & PrintCollection(field); } -void ROOT::Internal::RPrintValueVisitor::VisitSoAField(const ROOT::Experimental::RSoAField &field) +void ROOT::Internal::RPrintValueVisitor::VisitSoAField(const ROOT::RSoAField &field) { PrintRecord(field); } diff --git a/tree/ntuple/src/RPageStorageFile.cxx b/tree/ntuple/src/RPageStorageFile.cxx index 7fdb8f4a400eb..2c257083a5415 100644 --- a/tree/ntuple/src/RPageStorageFile.cxx +++ b/tree/ntuple/src/RPageStorageFile.cxx @@ -105,7 +105,7 @@ void ROOT::Internal::RPageSinkFile::UpdateSchema(const ROOT::Internal::RNTupleMo cl = classField->GetClass(); } else if (auto streamerField = dynamic_cast(field)) { cl = streamerField->GetClass(); - } else if (auto soaField = dynamic_cast(field)) { + } else if (auto soaField = dynamic_cast(field)) { cl = soaField->GetSoAClass(); } if (!cl) diff --git a/tree/ntuple/test/ntuple_emulated.cxx b/tree/ntuple/test/ntuple_emulated.cxx index 8d4b1a1f1d019..f47d90ebc35ba 100644 --- a/tree/ntuple/test/ntuple_emulated.cxx +++ b/tree/ntuple/test/ntuple_emulated.cxx @@ -925,10 +925,6 @@ TEST(RNTupleEmulated, EmulatedFields_SoA) // The child process writes the file and exits, but the file must be preserved to be read by the parent. fileGuard.PreserveFile(); - ROOT::TestSupport::CheckDiagsRAII diagRAII; - diagRAII.requiredDiag(kWarning, "[ROOT.NTuple]", "The SoA field is experimental and still under development.", - true /* matchFullMessage */); - ASSERT_TRUE(gInterpreter->Declare(R"( struct EmulatedRecord { int fX; diff --git a/tree/ntuple/test/ntuple_evolution_soa.cxx b/tree/ntuple/test/ntuple_evolution_soa.cxx index 07aeb94abaa8a..3f400a87afa01 100644 --- a/tree/ntuple/test/ntuple_evolution_soa.cxx +++ b/tree/ntuple/test/ntuple_evolution_soa.cxx @@ -33,10 +33,6 @@ TEST(RNTupleEvolutionSoA, RemovedMember) // The child process writes the file and exits, but the file must be preserved to be read by the parent. fileGuard.PreserveFile(); - ROOT::TestSupport::CheckDiagsRAII diagRAII; - diagRAII.requiredDiag(kWarning, "[ROOT.NTuple]", "The SoA field is experimental and still under development.", - true /* matchFullMessage */); - ASSERT_TRUE(gInterpreter->Declare(R"( struct RemovedMemberRecord { int fInt1; @@ -84,10 +80,6 @@ struct RemovedMemberSoA { )")); MakeSoALink("RemovedMemberRecord", "RemovedMemberSoA"); - ROOT::TestSupport::CheckDiagsRAII diagRAII; - diagRAII.requiredDiag(kWarning, "[ROOT.NTuple]", "The SoA field is experimental and still under development.", - true /* matchFullMessage */); - auto reader = ROOT::RNTupleReader::Open("ntpl", fileGuard.GetPath()); ASSERT_EQ(2, reader->GetNEntries()); diff --git a/tree/ntuple/test/ntuple_soa.cxx b/tree/ntuple/test/ntuple_soa.cxx index d70c30ba08f92..97521c0975b8a 100644 --- a/tree/ntuple/test/ntuple_soa.cxx +++ b/tree/ntuple/test/ntuple_soa.cxx @@ -22,8 +22,6 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" -using ROOT::Experimental::RSoAField; - TEST(RNTuple, SoADict) { auto cl = TClass::GetClass("Record"); @@ -45,71 +43,67 @@ TEST(RNTuple, SoADict) TEST(RNTuple, SoACheck) { - ROOT::TestSupport::CheckDiagsRAII diagRAII; - diagRAII.requiredDiag(kWarning, "[ROOT.NTuple]", "The SoA field is experimental and still under development.", - true /* matchFullMessage */); - try { - auto f = std::make_unique("f", "Record"); + auto f = std::make_unique("f", "Record"); FAIL() << "creating SoA field for untagged class should fail"; } catch (const ROOT::RException &e) { EXPECT_THAT(e.what(), ::testing::HasSubstr("not marked with the rntupleSoARecord dictionary option")); } try { - auto f = std::make_unique("f", "SoAUnknownRecord"); + auto f = std::make_unique("f", "SoAUnknownRecord"); FAIL() << "creating SoA field with unknown underlying record type should fail"; } catch (const ROOT::RException &e) { EXPECT_THAT(e.what(), ::testing::HasSubstr("invalid record type of SoA field SoAUnknownRecord")); } try { - auto f = std::make_unique("f", "SoAVersionMismatch"); + auto f = std::make_unique("f", "SoAVersionMismatch"); FAIL() << "creating SoA field with a class version different from the underlying record type's should fail"; } catch (const ROOT::RException &e) { EXPECT_THAT(e.what(), ::testing::HasSubstr("version mismatch between SoA type and underlying record type")); } try { - auto f = std::make_unique("f", "SoAUnversioned"); + auto f = std::make_unique("f", "SoAUnversioned"); FAIL() << "creating unversioned SoA field should fail"; } catch (const ROOT::RException &e) { EXPECT_THAT(e.what(), ::testing::HasSubstr("is transient or unversioned")); } try { - auto f = std::make_unique("f", "SoASimpleBadArray"); + auto f = std::make_unique("f", "SoASimpleBadArray"); FAIL() << "creating SoA field with arrays should fail"; } catch (const ROOT::RException &e) { EXPECT_THAT(e.what(), ::testing::HasSubstr("unsupported array type in SoA class: fY")); } try { - auto f = std::make_unique("f", "SoASimpleBadType"); + auto f = std::make_unique("f", "SoASimpleBadType"); FAIL() << "creating SoA field with vectors instead of RVecs should fail"; } catch (const ROOT::RException &e) { EXPECT_THAT(e.what(), ::testing::HasSubstr("invalid field type in SoA class: std::vector")); } try { - auto f = std::make_unique("f", "SoASimpleUnexpectedMember"); + auto f = std::make_unique("f", "SoASimpleUnexpectedMember"); FAIL() << "creating SoA field with an unexpected member should fail"; } catch (const ROOT::RException &e) { EXPECT_THAT(e.what(), ::testing::HasSubstr("unexpected SoA member: fZ")); } try { - auto f = std::make_unique("f", "SoASimpleMissingMember"); + auto f = std::make_unique("f", "SoASimpleMissingMember"); FAIL() << "creating SoA field with a missing member should fail"; } catch (const ROOT::RException &e) { EXPECT_THAT(e.what(), ::testing::HasSubstr("missing SoA members")); } try { - auto f = std::make_unique("f", "SoASimpleWrongMember"); + auto f = std::make_unique("f", "SoASimpleWrongMember"); FAIL() << "creating SoA field with a member of wrong type should fail"; } catch (const ROOT::RException &e) { EXPECT_THAT(e.what(), ::testing::HasSubstr("SoA member type mismatch: fY (double [Double32_t] vs. float)")); } { - EXPECT_NO_THROW(auto f = std::make_unique("f", "SoASimple")); + EXPECT_NO_THROW(auto f = std::make_unique("f", "SoASimple")); } try { @@ -126,7 +120,7 @@ TEST(RNTuple, SoADescriptor) { auto model = ROOT::RNTupleModel::Create(); - auto f1 = std::make_unique("f1", "SoA"); + auto f1 = std::make_unique("f1", "SoA"); EXPECT_TRUE(f1->GetTraits() & ROOT::RFieldBase::kTraitSoACollection); model->AddField(std::move(f1)); auto f2 = ROOT::RFieldBase::Create("f2", "SoA").Unwrap(); @@ -162,7 +156,7 @@ TEST(RNTuple, SoAStreamerInfo) ROOT::TestSupport::FileRaii fileGuard("test_ntuple_soa_streamer_info.root"); auto model = ROOT::RNTupleModel::Create(); - model->AddField(std::make_unique("f", "SoASimple")); + model->AddField(std::make_unique("f", "SoASimple")); auto writer = ROOT::RNTupleWriter::Recreate(std::move(model), "ntpl", fileGuard.GetPath()); writer.reset(); @@ -176,7 +170,7 @@ TEST(RNTuple, SoAEmpty) { auto model = ROOT::RNTupleModel::Create(); - model->AddField(std::make_unique("f", "SoA")); + model->AddField(std::make_unique("f", "SoA")); auto writer = ROOT::RNTupleWriter::Recreate(std::move(model), "ntpl", fileGuard.GetPath()); writer->Fill(); writer->CommitCluster(); @@ -198,7 +192,7 @@ TEST(RNTuple, SoASimple) { auto model = ROOT::RNTupleModel::Create(); - model->AddField(std::make_unique("f", "SoASimple")); + model->AddField(std::make_unique("f", "SoASimple")); auto writer = ROOT::RNTupleWriter::Recreate(std::move(model), "ntpl", fileGuard.GetPath()); auto soa = writer->GetModel().GetDefaultEntry().GetPtr("f"); soa->fX.push_back(1.0); @@ -242,7 +236,7 @@ TEST(RNTuple, SoASimpleSwapped) { auto model = ROOT::RNTupleModel::Create(); - model->AddField(std::make_unique("f", "SoASimpleSwapped")); + model->AddField(std::make_unique("f", "SoASimpleSwapped")); auto writer = ROOT::RNTupleWriter::Recreate(std::move(model), "ntpl", fileGuard.GetPath()); auto soa = writer->GetModel().GetDefaultEntry().GetPtr("f"); soa->fX.push_back(1.0); @@ -264,8 +258,8 @@ TEST(RNTuple, SoABasicWriteRead) { auto model = ROOT::RNTupleModel::Create(); - model->AddField(std::make_unique("simple", "SoASimple")); - model->AddField(std::make_unique("empty", "SoA")); + model->AddField(std::make_unique("simple", "SoASimple")); + model->AddField(std::make_unique("empty", "SoA")); auto writer = ROOT::RNTupleWriter::Recreate(std::move(model), "ntpl", fileGuard.GetPath()); auto simpleSoA = writer->GetModel().GetDefaultEntry().GetPtr("simple"); @@ -316,7 +310,7 @@ TEST(RNTuple, SoAReadAdopted) { auto model = ROOT::RNTupleModel::Create(); - model->AddField(std::make_unique("simple", "SoASimple")); + model->AddField(std::make_unique("simple", "SoASimple")); auto writer = ROOT::RNTupleWriter::Recreate(std::move(model), "ntpl", fileGuard.GetPath()); auto simpleSoA = writer->GetModel().GetDefaultEntry().GetPtr("simple"); @@ -353,7 +347,7 @@ TEST(RNTuple, SoAReadComplex) { auto model = ROOT::RNTupleModel::Create(); - model->AddField(std::make_unique("complex", "SoAComplex")); + model->AddField(std::make_unique("complex", "SoAComplex")); auto writer = ROOT::RNTupleWriter::Recreate(std::move(model), "ntpl", fileGuard.GetPath()); auto complexSoA = writer->GetModel().GetDefaultEntry().GetPtr("complex"); @@ -418,8 +412,8 @@ TEST(RNTuple, SoAShow) { auto model = ROOT::RNTupleModel::Create(); - model->AddField(std::make_unique("simple", "SoASimple")); - model->AddField(std::make_unique("empty", "SoA")); + model->AddField(std::make_unique("simple", "SoASimple")); + model->AddField(std::make_unique("empty", "SoA")); auto writer = ROOT::RNTupleWriter::Recreate(std::move(model), "ntpl", fileGuard.GetPath()); auto simpleSoA = writer->GetModel().GetDefaultEntry().GetPtr("simple"); @@ -470,14 +464,14 @@ TEST(RNTuple, SoANested) { auto model = ROOT::RNTupleModel::Create(); try { - model->AddField(std::make_unique("dot", "SoADotBadNestedType")); + model->AddField(std::make_unique("dot", "SoADotBadNestedType")); FAIL() << "SoADotBadNestedType should fail"; } catch (const ROOT::RException &e) { EXPECT_THAT(e.what(), testing::HasSubstr("nested SoA field fProperties [SoA] does not match underlying type " "RecordProperties")); } - model->AddField(std::make_unique("dot", "SoADot")); + model->AddField(std::make_unique("dot", "SoADot")); auto writer = ROOT::RNTupleWriter::Recreate(std::move(model), "ntpl", fileGuard.GetPath()); auto dotSoA = writer->GetModel().GetDefaultEntry().GetPtr("dot"); dotSoA->fX = {1.0, 2.0}; @@ -517,21 +511,21 @@ TEST(RNTuple, SoADerived) auto model = ROOT::RNTupleModel::Create(); try { - model->AddField(std::make_unique("x", "SoADerivedFail1")); + model->AddField(std::make_unique("x", "SoADerivedFail1")); FAIL() << "SoADerivedFail1 should fail"; } catch (const ROOT::RException &e) { EXPECT_THAT(e.what(), testing::HasSubstr("inheritance of SoA class x does not match its underlying record type")); } try { - model->AddField(std::make_unique("x", "SoADerivedFail2")); + model->AddField(std::make_unique("x", "SoADerivedFail2")); FAIL() << "SoADerivedFail2 should fail"; } catch (const ROOT::RException &e) { EXPECT_THAT(e.what(), testing::HasSubstr("missing SoA members")); } - model->AddField(std::make_unique("derived", "SoADerived")); - model->AddField(std::make_unique("multi", "SoADerivedMulti")); + model->AddField(std::make_unique("derived", "SoADerived")); + model->AddField(std::make_unique("multi", "SoADerivedMulti")); auto writer = ROOT::RNTupleWriter::Recreate(std::move(model), "ntpl", fileGuard.GetPath()); auto derivedSoA = writer->GetModel().GetDefaultEntry().GetPtr("derived"); @@ -594,7 +588,7 @@ TEST(RNTuple, SoARename) { auto model = ROOT::RNTupleModel::Create(); - model->AddField(std::make_unique("leaf", "SoALeafOld")); + model->AddField(std::make_unique("leaf", "SoALeafOld")); auto writer = ROOT::RNTupleWriter::Recreate(std::move(model), "ntpl", fileGuard.GetPath()); auto leafSoA = writer->GetModel().GetDefaultEntry().GetPtr("leaf"); @@ -607,7 +601,7 @@ TEST(RNTuple, SoARename) { auto model = ROOT::RNTupleModel::Create(); - model->AddField(std::make_unique("leaf", "SoALeafNew")); + model->AddField(std::make_unique("leaf", "SoALeafNew")); auto reader = ROOT::RNTupleReader::Open(std::move(model), "ntpl", fileGuard.GetPath()); // We cannot use "Show()" because that will reconstruct the original model as a display model, it will not @@ -632,7 +626,7 @@ TEST(RNTuple, SoARename) { auto model = ROOT::RNTupleModel::Create(); - model->AddField(std::make_unique("leaf", "SoALeafNewNoRenameRule")); + model->AddField(std::make_unique("leaf", "SoALeafNewNoRenameRule")); auto reader = ROOT::RNTupleReader::Open(std::move(model), "ntpl", fileGuard.GetPath()); // We cannot use "Show()" because that will reconstruct the original model as a display model, it will not @@ -657,7 +651,7 @@ TEST(RNTuple, SoARename) { auto model = ROOT::RNTupleModel::Create(); - model->AddField(std::make_unique("leaf", "SoALeafLikeNew")); + model->AddField(std::make_unique("leaf", "SoALeafLikeNew")); try { auto reader = ROOT::RNTupleReader::Open(std::move(model), "ntpl", fileGuard.GetPath()); FAIL() << "mismatch in underlying record field should fail"; @@ -674,8 +668,8 @@ TEST(RNTuple, SoARuleFailures) { auto model = ROOT::RNTupleModel::Create(); - model->AddField(std::make_unique("source", "SoARuleFailSource")); - model->AddField(std::make_unique("target", "SoARuleFailSource")); + model->AddField(std::make_unique("source", "SoARuleFailSource")); + model->AddField(std::make_unique("target", "SoARuleFailSource")); auto writer = ROOT::RNTupleWriter::Recreate(std::move(model), "ntpl", fileGuard.GetPath()); } @@ -703,7 +697,7 @@ TEST(RNTuple, SoAWholeObjectRule) { auto model = ROOT::RNTupleModel::Create(); - model->AddField(std::make_unique("outer", "SoAOuter")); + model->AddField(std::make_unique("outer", "SoAOuter")); auto writer = ROOT::RNTupleWriter::Recreate(std::move(model), "ntpl", fileGuard.GetPath()); auto outerSoA = writer->GetModel().GetDefaultEntry().GetPtr("outer"); diff --git a/tutorials/io/ntuple/ntpl020_soa.C b/tutorials/io/ntuple/ntpl020_soa.C index 7cf1ab0deb558..fe49d398d2896 100644 --- a/tutorials/io/ntuple/ntpl020_soa.C +++ b/tutorials/io/ntuple/ntpl020_soa.C @@ -7,9 +7,6 @@ /// An RNTuple SoA class consists of persistent members of type `RVec` corresponding to /// and underlying record type, as shown in this tutorial. /// -/// NOTE: The RNTuple SoA I/O is still experimental at this point. -/// Functionality and interface are subject to changes. -/// /// \macro_code /// /// \date April 2026