Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ntuple] expose RNTuple(Un)ownedView instead of RNTupleView<T, bool> #16363

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
5 changes: 3 additions & 2 deletions gui/browsable/src/RFieldProvider.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,9 @@ class RFieldProvider : public RProvider {
}
}

template<typename T>
void FillHistogramImpl(const ROOT::Experimental::RFieldBase &field, ROOT::Experimental::RNTupleView<T, false> &view)
template <typename T>
void
FillHistogramImpl(const ROOT::Experimental::RFieldBase &field, ROOT::Experimental::RNTupleUnownedView<T> &view)
{
std::string title = "Drawing of RField "s + field.GetFieldName();

Expand Down
12 changes: 6 additions & 6 deletions tree/ntuple/v7/inc/ROOT/RNTupleReader.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -276,27 +276,27 @@ public:
/// }
/// ~~~
template <typename T>
RNTupleView<T, false> GetView(std::string_view fieldName)
RNTupleUnownedView<T> GetView(std::string_view fieldName)
{
return GetView<T>(RetrieveFieldId(fieldName));
}

template <typename T>
RNTupleView<T, true> GetView(std::string_view fieldName, std::shared_ptr<T> objPtr)
RNTupleOwnedView<T> GetView(std::string_view fieldName, std::shared_ptr<T> objPtr)
{
return GetView<T>(RetrieveFieldId(fieldName), objPtr);
}

template <typename T>
RNTupleView<T, false> GetView(DescriptorId_t fieldId)
RNTupleUnownedView<T> GetView(DescriptorId_t fieldId)
{
return RNTupleView<T, false>(fieldId, fSource.get());
return RNTupleUnownedView<T>(fieldId, fSource.get());
}

template <typename T>
RNTupleView<T, true> GetView(DescriptorId_t fieldId, std::shared_ptr<T> objPtr)
RNTupleOwnedView<T> GetView(DescriptorId_t fieldId, std::shared_ptr<T> objPtr)
{
return RNTupleView<T, true>(fieldId, fSource.get(), objPtr);
return RNTupleOwnedView<T>(fieldId, fSource.get(), objPtr);
}

/// Raises an exception if:
Expand Down
Loading
Loading