Illustrate use of the TH1::GetCumulative method.
#include <cassert>
#include <cmath>
{
TH1*
h =
new TH1D(
"h",
"h", 100, -5., 5.);
h->FillRandom(
"gaus", 1u << 16);
TH1* hc =
h->GetCumulative();
}
}
R__EXTERN TRandom * gRandom
1-D histogram with a double per channel (see TH1 documentation)}
TH1 is the base class of all histogram classes in ROOT.
virtual Int_t GetNbinsX() const
void Draw(Option_t *option="") override
Draw this histogram with options.
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
virtual void SetSeed(ULong_t seed=0)
Set the random generator seed.
RVec< PromoteType< T > > abs(const RVec< T > &v)
- Author
- M. Schiller
Definition in file cumulative.C.