26 std::size_t
len =
fHist->GetBufferLength();
27 auto buf =
fHist->GetBuffer();
29 if (!buf || (
len < 5))
36 for (std::size_t
n = 0;
n <
len; ++
n) {
37 double v = buf[2 + 2 *
n];
38 max = std::max(max,
v);
39 min = std::min(min,
v);
41 if (std::abs(std::modf(
v, &
_)) > 1
e-5) {
52 int npoints = std::nearbyint(max - min);
53 std::unique_ptr<TH1>
h1 = std::make_unique<TH1F>(
fHist->GetName(),
fHist->GetTitle(),
npoints, min, max);
55 for (
size_t n = 0;
n <
len; ++
n)
56 h1->
Fill(buf[2 + 2 *
n], buf[1 + 2 *
n]);
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t len
std::unique_ptr< TH1 > fHist
void TestHistBuffer()
Test collected entries if it looks like integer values and one can use better binning.
virtual void SetDirectory(TDirectory *dir)
By default, when a histogram is created, it is added to the list of histogram objects in the current ...
virtual Int_t Fill(Double_t x)
Increment bin with abscissa X by 1.