61 auto eventId =
entry->GetPtr<std::uint32_t>(
"eventId");
68 auto d =
static_cast<double>(gen()) / generator::max();
69 *
rndm =
static_cast<float>(
d);
80 std::cout <<
"Thread #" <<
id <<
" wrote events #" <<
eventIdStart <<
" - #"
90 std::cout <<
" === Writing with staged cluster committing ===" << std::endl;
93 auto model = RNTupleModel::CreateBare();
94 model->MakeField<std::uint32_t>(
"eventId");
95 model->MakeField<
float>(
"rndm");
101 RNTupleWriteOptions options;
102 options.SetApproxZippedClusterSize(32'000);
107 std::vector<std::thread>
threads;
132 auto eventId =
entry->GetPtr<std::uint32_t>(
"eventId");
135 auto rndm =
entry->GetPtr<
float>(
"rndm");
140 auto d =
static_cast<double>(gen()) / generator::max();
141 *
rndm =
static_cast<float>(
d);
154 std::cout <<
"Thread #" <<
id <<
" wrote events #" <<
firstEvent <<
" - #" <<
lastEvent <<
" as entries #"
170 std::cout <<
"Thread #" <<
id <<
" wrote events #" <<
firstEvent <<
" - #" <<
lastEvent <<
" as entries #"
179 std::cout <<
"\n === ... with sequencing in blocks of " <<
kNEventsPerBlock <<
" events ===" << std::endl;
182 auto model = RNTupleModel::CreateBare();
183 model->MakeField<std::uint32_t>(
"eventId");
184 model->MakeField<
float>(
"rndm");
191 RNTupleWriteOptions options;
192 options.SetApproxZippedClusterSize(32'000);
197 std::vector<std::thread>
threads;
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
The RNTupleModel encapulates the schema of an ntuple.
A writer to fill an RNTuple from multiple contexts.
Common user-tunable settings for storing ntuples.
std::uint64_t NTupleSize_t
Integer type long enough to hold the maximum number of entries in a column.
void FillData(BinData &dv, const TH1 *hist, TF1 *func=nullptr)
fill the data vector from a TH1.