From b5b99750212eea1ecf70de9f1bac7ec3a0eb4557 Mon Sep 17 00:00:00 2001 From: Alberto Mecca Date: Mon, 20 Nov 2023 12:13:44 +0100 Subject: [PATCH] Made TH1::EInconsistencyBits public --- hist/hist/inc/TH1.h | 11 +++++++++++ hist/hist/src/TH1.cxx | 17 ++--------------- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/hist/hist/inc/TH1.h b/hist/hist/inc/TH1.h index 1d0f2edfce1a6..c74a497ab318f 100644 --- a/hist/hist/inc/TH1.h +++ b/hist/hist/inc/TH1.h @@ -83,6 +83,17 @@ class TH1 : public TNamed, public TAttLine, public TAttFill, public TAttMarker { kNeutral = 2, ///< Adapt to the global flag }; + /// Enumeration specifying inconsistencies between two histograms, + /// in increasing severity. + enum EInconsistencyBits { + kFullyConsistent = 0, + kDifferentLabels = BIT(0), + kDifferentBinLimits = BIT(1), + kDifferentAxisLimits = BIT(2), + kDifferentNumberOfBins = BIT(3), + kDifferentDimensions = BIT(4) + }; + friend class TH1Merger; protected: diff --git a/hist/hist/src/TH1.cxx b/hist/hist/src/TH1.cxx index e8bc9e6980b6d..e8fd96b93c7cb 100644 --- a/hist/hist/src/TH1.cxx +++ b/hist/hist/src/TH1.cxx @@ -594,21 +594,6 @@ extern void H1LeastSquareFit(Int_t n, Int_t m, Double_t *a); extern void H1LeastSquareLinearFit(Int_t ndata, Double_t &a0, Double_t &a1, Int_t &ifail); extern void H1LeastSquareSeqnd(Int_t n, Double_t *a, Int_t idim, Int_t &ifail, Int_t k, Double_t *b); -namespace { - -/// Enumeration specifying inconsistencies between two histograms, -/// in increasing severity. -enum EInconsistencyBits { - kFullyConsistent = 0, - kDifferentLabels = BIT(0), - kDifferentBinLimits = BIT(1), - kDifferentAxisLimits = BIT(2), - kDifferentNumberOfBins = BIT(3), - kDifferentDimensions = BIT(4) -}; - -} // namespace - ClassImp(TH1); //////////////////////////////////////////////////////////////////////////////// @@ -1675,6 +1660,8 @@ bool TH1::CheckConsistentSubAxes(const TAxis *a1, Int_t firstBin1, Int_t lastBin //////////////////////////////////////////////////////////////////////////////// /// Check histogram compatibility. +/// The returned integer is part of EInconsistencyBits +/// The value 0 means that the histograms are compatible Int_t TH1::CheckConsistency(const TH1* h1, const TH1* h2) {