32static constexpr char const *
kNTupleFileName =
"ntpl018_low_precision_floats.root";
36 std::vector<float> fPt;
37 std::vector<double> fE;
49 auto fieldReal16 = std::make_unique<ROOT::RField<float>>(
"myReal16");
54 auto fieldReal32Trunc = std::make_unique<ROOT::RField<float>>(
"myReal32Trunc");
61 auto fieldReal32Quant = std::make_unique<ROOT::RField<float>>(
"myReal32Quant");
70 auto fieldEvents = std::make_unique<ROOT::RField<Event>>(
"myEvents");
84 std::cout <<
"Setting field " <<
field.GetQualifiedFieldName() <<
" to truncated.\n";
87 std::cout <<
"Setting field " <<
field.GetQualifiedFieldName() <<
" to truncated.\n";
95 const auto &
entry = model->GetDefaultEntry();
105 for (
int i = 0; i <
kNEvents; i++) {
121 const auto &
entry =
reader->GetModel().GetDefaultEntry();
127 for (
auto idx :
reader->GetEntryRange()) {
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
R__EXTERN TRandom * gRandom
Classes with dictionaries that can be inspected by TClass.
static std::unique_ptr< RNTupleModel > Create()
static std::unique_ptr< RNTupleReader > Open(std::string_view ntupleName, std::string_view storage, const ROOT::RNTupleReadOptions &options=ROOT::RNTupleReadOptions())
Open an RNTuple for reading.
static std::unique_ptr< RNTupleWriter > Recreate(std::unique_ptr< ROOT::RNTupleModel > model, std::string_view ntupleName, std::string_view storage, const ROOT::RNTupleWriteOptions &options=ROOT::RNTupleWriteOptions())
Creates an RNTupleWriter backed by storage, overwriting it if one with the same URI exists.
virtual void SetSeed(ULong_t seed=0)
Set the random generator seed.
Double_t Rndm() override
Machine independent random number generator.