34 auto h1 = std::make_shared<TH1F>(
"h1",
"Example histogram", 100, -3, 3);
35 h1->SetDirectory(
nullptr);
37 for (
int i = 0; i < 10000; i++)
41 auto hint1 = std::make_shared<TH1F>(
"hint1",
"h1 bins integral", 100, -3, 3);
42 hint1->SetDirectory(
nullptr);
45 for (
int i = 1; i <= 100; i++) {
46 sum +=
h1->GetBinContent(i);
47 hint1->SetBinContent(i,
sum);
49 hint1->SetLineColor(
kRed);
50 hint1->GetYaxis()->SetAxisColor(
kRed);
51 hint1->GetYaxis()->SetLabelColor(
kRed);
float Float_t
Float 4 bytes (float).
static std::shared_ptr< RCanvas > Create(const std::string &title)
Create new canvas instance.
Provides v7 drawing facilities for TObject types (TGraph, TH1, TH2, etc).
Namespace for ROOT features in testing.
static uint64_t sum(uint64_t i)