Skip to content

Commit

Permalink
Made TH1::EInconsistencyBits public
Browse files Browse the repository at this point in the history
  • Loading branch information
amecca authored and guitargeek committed Jan 2, 2025
1 parent 0003ac8 commit b5b9975
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
11 changes: 11 additions & 0 deletions hist/hist/inc/TH1.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
17 changes: 2 additions & 15 deletions hist/hist/src/TH1.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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);

////////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -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)
{
Expand Down

0 comments on commit b5b9975

Please sign in to comment.