34 auto model = RNTupleModel::Create();
36 auto fldVpx = model->MakeField<std::vector<float>>(
"vpx");
37 auto fldVpy = model->MakeField<std::vector<float>>(
"vpy");
38 auto fldVpz = model->MakeField<std::vector<float>>(
"vpz");
39 auto fldN = model->MakeField<std::uint64_t>(
"vn");
49 for (
int j = 0;
j < *
fldN; ++
j) {
52 pz = px * px + py * py;
63void Read(
const std::vector<RNTupleOpenSpec> &
ntuples)
65 auto c =
new TCanvas(
"c",
"RNTupleProcessor Example", 200, 10, 700, 500);
66 TH1F hPx(
"h",
"This is the px distribution", 100, -4, 4);
69 auto model = RNTupleModel::Create();
70 auto ptrPx = model->MakeField<std::vector<float>>(
"vpx");
81 if (
processor->GetLocalEntryNumber() == 0) {
82 std::cout <<
"Processing " <<
ntuples.at(
processor->GetCurrentNTupleNumber()).fNTupleName <<
" ("
83 <<
processor->GetNEntriesProcessed() <<
" total entries processed so far)" << std::endl;
100 std::vector<RNTupleOpenSpec>
ntuples = {
101 {
"ntuple1",
"ntuple1.root"}, {
"ntuple2",
"ntuple2.root"}, {
"ntuple3",
"ntuple3.root"}};
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
R__EXTERN TRandom * gRandom
The RNTupleModel encapulates the schema of an ntuple.
Interface for iterating over entries of RNTuples and vertically concatenated RNTuples (chains).
An RNTuple that gets filled with entries (data) and writes them to storage.
1-D histogram with a float per channel (see TH1 documentation)
virtual void Rannor(Float_t &a, Float_t &b)
Return 2 numbers distributed following a gaussian with mean=0 and sigma=1.
virtual UInt_t Integer(UInt_t imax)
Returns a random integer uniformly distributed on the interval [ 0, imax-1 ].
Used to specify the underlying RNTuples in RNTupleProcessor and RNTupleReader::OpenFriends()