35 bool unbin = useBuffer &&
h1->GetBufferLength() > 0 ;
39 int nbins =
h1->GetNbinsX();
41 for (
int i =0; i < nbins; ++i)
42 fData.push_back(
h1->GetBinContent(i+1) );
44 fMin =
h1->GetXaxis()->GetXmin();
45 fMax =
h1->GetXaxis()->GetXmax();
50 int n =
h1->GetBufferLength();
51 const double * bf =
h1->GetBuffer();
56 for (
int i = 0; i <
n; ++i) {
58 fData.push_back( bf[index] );
79 for (
unsigned int i = 0; i <
n; ++i) {
92 for (
unsigned int i = 0; i <
n; ++i) {
111 if (
this == &rhs)
return *
this;
TH1 is the base class of all histogram classes in ROOT.
TUnuranBaseDist, base class for Unuran distribution classes such as TUnuranContDist (for one-dimensio...
double fMax
max values (used in the binned case)
double fMin
min values (used in the binned case)
bool fBinned
flag for binned/unbinned data
TUnuranEmpDist & operator=(const TUnuranEmpDist &rhs)
Assignment operator.
unsigned int fDim
data dimensionality
TUnuranEmpDist(const TH1 *h1=nullptr, bool useBuffer=true)
Constructor from a TH1 objects.
std::vector< double > fData
pointer to the data vector (used for generation from un-binned data)