34constexpr const char *kFileName =
"ntpl020_soa.root";
61 for (
auto nPoints : {100, 500, 1000, 10000}) {
84 auto canvas =
new TCanvas(
"c",
"", 1200, 1200);
92 for (
auto i :
reader->GetEntryRange()) {
94 auto memory = std::make_unique<float[]>(
N * 2);
103 graph->SetTitle((std::to_string(
N) +
" Points").c_str());
104 graph->SetMarkerStyle(29);
105 graph->SetMarkerSize(1);
106 graph->SetMarkerColor(
kRed);
119 float approxPI = 4.0 *
static_cast<float>(
hits) /
static_cast<float>(
N);
120 std::cout <<
"Approximated PI with " <<
N <<
" points to " <<
approxPI << std::endl;
132 cl->CreateAttributeMap();
133 cl->GetAttributeMap()->AddProperty(
"rntuple.SoARecord",
"PointRecord");
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t points
R__EXTERN TRandom * gRandom
static RResult< std::unique_ptr< RFieldBase > > Create(const std::string &fieldName, const std::string &typeName, const ROOT::RCreateFieldOptions &options, const ROOT::RNTupleDescriptor *desc, ROOT::DescriptorId_t fieldId)
Factory method to resurrect a field from the stored on-disk type information.
static std::unique_ptr< RNTupleModel > CreateBare()
Creates a "bare model", i.e. an RNTupleModel with no default entry.
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.
A "std::vector"-like collection of values implementing handy operation to analyse them.
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
A TGraph is an object made of two arrays X and Y with npoints each.
virtual void RndmArray(Int_t n, Float_t *array)
Return an array of n random numbers uniformly distributed in ]0,1[.
T Sum(const RVec< T > &v, const T zero=T(0))
Sum elements of an RVec.