We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Using RNTupleView<void>, it is possible to write the following code:
RNTupleView<void>
#include <ROOT/RNTupleModel.hxx> #include <ROOT/RNTupleReader.hxx> #include <ROOT/RNTupleWriter.hxx> #include <ROOT/RNTupleView.hxx> #include <iostream> void ntuple_view_void() { { auto model = ROOT::RNTupleModel::Create(); *model->MakeField<float>("px") = 42.0f; auto writer = ROOT::RNTupleWriter::Recreate(std::move(model), "ntpl", "void.root"); writer->Fill(); } auto reader = ROOT::RNTupleReader::Open("ntpl", "void.root"); auto view = reader->GetView<void>("px"); view(0); auto value = view.GetValue().GetRef<double>(); std::cout << "value = " << value << "\n"; }
This should throw when trying to get a double reference to a float object.
double
float
The text was updated successfully, but these errors were encountered:
GetView<void>
hahnjo
silverweed
No branches or pull requests
Using
RNTupleView<void>
, it is possible to write the following code:This should throw when trying to get a
double
reference to afloat
object.The text was updated successfully, but these errors were encountered: