Skip to content

Commit

Permalink
[hist] Add some const keywords to arithmetic operators
Browse files Browse the repository at this point in the history
  • Loading branch information
guitargeek committed Aug 6, 2024
1 parent 5e26929 commit bc0db53
Show file tree
Hide file tree
Showing 4 changed files with 133 additions and 133 deletions.
72 changes: 36 additions & 36 deletions hist/hist/inc/TH2.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,12 @@ class TH2C : public TH2, public TArrayC {
void SetBinsLength(Int_t n=-1) override;

TH2C& operator=(const TH2C &h1);
friend TH2C operator*(Float_t c1, TH2C &h1);
friend TH2C operator*(TH2C &h1, Float_t c1) {return operator*(c1,h1);}
friend TH2C operator+(TH2C &h1, TH2C &h2);
friend TH2C operator-(TH2C &h1, TH2C &h2);
friend TH2C operator*(TH2C &h1, TH2C &h2);
friend TH2C operator/(TH2C &h1, TH2C &h2);
friend TH2C operator*(Float_t c1, TH2C const &h1);
friend TH2C operator*(TH2C const &h1, Float_t c1) {return operator*(c1,h1);}
friend TH2C operator+(TH2C const &h1, TH2C const &h2);
friend TH2C operator-(TH2C const &h1, TH2C const &h2);
friend TH2C operator*(TH2C const &h1, TH2C const &h2);
friend TH2C operator/(TH2C const &h1, TH2C const &h2);

protected:
Double_t RetrieveBinContent(Int_t bin) const override { return Double_t (fArray[bin]); }
Expand Down Expand Up @@ -205,12 +205,12 @@ class TH2S : public TH2, public TArrayS {
void SetBinsLength(Int_t n=-1) override;

TH2S& operator=(const TH2S &h1);
friend TH2S operator*(Float_t c1, TH2S &h1);
friend TH2S operator*(TH2S &h1, Float_t c1) {return operator*(c1,h1);}
friend TH2S operator+(TH2S &h1, TH2S &h2);
friend TH2S operator-(TH2S &h1, TH2S &h2);
friend TH2S operator*(TH2S &h1, TH2S &h2);
friend TH2S operator/(TH2S &h1, TH2S &h2);
friend TH2S operator*(Float_t c1, TH2S const &h1);
friend TH2S operator*(TH2S const &h1, Float_t c1) {return operator*(c1,h1);}
friend TH2S operator+(TH2S const &h1, TH2S const &h2);
friend TH2S operator-(TH2S const &h1, TH2S const &h2);
friend TH2S operator*(TH2S const &h1, TH2S const &h2);
friend TH2S operator/(TH2S const &h1, TH2S const &h2);

protected:
Double_t RetrieveBinContent(Int_t bin) const override { return Double_t (fArray[bin]); }
Expand Down Expand Up @@ -248,12 +248,12 @@ class TH2I : public TH2, public TArrayI {
void SetBinsLength(Int_t n=-1) override;

TH2I& operator=(const TH2I &h1);
friend TH2I operator*(Float_t c1, TH2I &h1);
friend TH2I operator*(TH2I &h1, Float_t c1) {return operator*(c1,h1);}
friend TH2I operator+(TH2I &h1, TH2I &h2);
friend TH2I operator-(TH2I &h1, TH2I &h2);
friend TH2I operator*(TH2I &h1, TH2I &h2);
friend TH2I operator/(TH2I &h1, TH2I &h2);
friend TH2I operator*(Float_t c1, TH2I const &h1);
friend TH2I operator*(TH2I const &h1, Float_t c1) {return operator*(c1,h1);}
friend TH2I operator+(TH2I const &h1, TH2I const &h2);
friend TH2I operator-(TH2I const &h1, TH2I const &h2);
friend TH2I operator*(TH2I const &h1, TH2I const &h2);
friend TH2I operator/(TH2I const &h1, TH2I const &h2);

protected:
Double_t RetrieveBinContent(Int_t bin) const override { return Double_t (fArray[bin]); }
Expand Down Expand Up @@ -288,12 +288,12 @@ class TH2L : public TH2, public TArrayL64 {
void Reset(Option_t *option="") override;
void SetBinsLength(Int_t n=-1) override;
TH2L& operator=(const TH2L &h1);
friend TH2L operator*(Float_t c1, TH2L &h1);
friend TH2L operator*(TH2L &h1, Float_t c1) {return operator*(c1,h1);}
friend TH2L operator+(TH2L &h1, TH2L &h2);
friend TH2L operator-(TH2L &h1, TH2L &h2);
friend TH2L operator*(TH2L &h1, TH2L &h2);
friend TH2L operator/(TH2L &h1, TH2L &h2);
friend TH2L operator*(Float_t c1, TH2L const &h1);
friend TH2L operator*(TH2L const &h1, Float_t c1) {return operator*(c1,h1);}
friend TH2L operator+(TH2L const &h1, TH2L const &h2);
friend TH2L operator-(TH2L const &h1, TH2L const &h2);
friend TH2L operator*(TH2L const &h1, TH2L const &h2);
friend TH2L operator/(TH2L const &h1, TH2L const &h2);

protected:
Double_t RetrieveBinContent(Int_t bin) const override { return Double_t (fArray[bin]); }
Expand Down Expand Up @@ -337,12 +337,12 @@ class TH2F : public TH2, public TArrayF {
void SetBinsLength(Int_t n=-1) override;

TH2F& operator=(const TH2F &h1);
friend TH2F operator*(Float_t c1, TH2F &h1);
friend TH2F operator*(TH2F &h1, Float_t c1);
friend TH2F operator+(TH2F &h1, TH2F &h2);
friend TH2F operator-(TH2F &h1, TH2F &h2);
friend TH2F operator*(TH2F &h1, TH2F &h2);
friend TH2F operator/(TH2F &h1, TH2F &h2);
friend TH2F operator*(Float_t c1, TH2F const &h1);
friend TH2F operator*(TH2F const &h1, Float_t c1);
friend TH2F operator+(TH2F const &h1, TH2F const &h2);
friend TH2F operator-(TH2F const &h1, TH2F const &h2);
friend TH2F operator*(TH2F const &h1, TH2F const &h2);
friend TH2F operator/(TH2F const &h1, TH2F const &h2);

protected:
Double_t RetrieveBinContent(Int_t bin) const override { return Double_t (fArray[bin]); }
Expand Down Expand Up @@ -386,12 +386,12 @@ class TH2D : public TH2, public TArrayD {
void SetBinsLength(Int_t n=-1) override;

TH2D& operator=(const TH2D &h1);
friend TH2D operator*(Float_t c1, TH2D &h1);
friend TH2D operator*(TH2D &h1, Float_t c1) {return operator*(c1,h1);}
friend TH2D operator+(TH2D &h1, TH2D &h2);
friend TH2D operator-(TH2D &h1, TH2D &h2);
friend TH2D operator*(TH2D &h1, TH2D &h2);
friend TH2D operator/(TH2D &h1, TH2D &h2);
friend TH2D operator*(Float_t c1, TH2D const &h1);
friend TH2D operator*(TH2D const &h1, Float_t c1) {return operator*(c1,h1);}
friend TH2D operator+(TH2D const &h1, TH2D const &h2);
friend TH2D operator-(TH2D const &h1, TH2D const &h2);
friend TH2D operator*(TH2D const &h1, TH2D const &h2);
friend TH2D operator/(TH2D const &h1, TH2D const &h2);

protected:
Double_t RetrieveBinContent(Int_t bin) const override { return fArray[bin]; }
Expand Down
72 changes: 36 additions & 36 deletions hist/hist/inc/TH3.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,12 @@ class TH3C : public TH3, public TArrayC {
void SetBinsLength(Int_t n=-1) override;

TH3C& operator=(const TH3C &h1);
friend TH3C operator*(Float_t c1, TH3C &h1);
friend TH3C operator*(TH3C &h1, Float_t c1) {return operator*(c1,h1);}
friend TH3C operator+(TH3C &h1, TH3C &h2);
friend TH3C operator-(TH3C &h1, TH3C &h2);
friend TH3C operator*(TH3C &h1, TH3C &h2);
friend TH3C operator/(TH3C &h1, TH3C &h2);
friend TH3C operator*(Float_t c1, TH3C const &h1);
friend TH3C operator*(TH3C const &h1, Float_t c1) {return operator*(c1,h1);}
friend TH3C operator+(TH3C const &h1, TH3C const &h2);
friend TH3C operator-(TH3C const &h1, TH3C const &h2);
friend TH3C operator*(TH3C const &h1, TH3C const &h2);
friend TH3C operator/(TH3C const &h1, TH3C const &h2);

protected:
Double_t RetrieveBinContent(Int_t bin) const override { return Double_t (fArray[bin]); }
Expand Down Expand Up @@ -218,12 +218,12 @@ class TH3S : public TH3, public TArrayS {
void SetBinsLength(Int_t n=-1) override;

TH3S& operator=(const TH3S &h1);
friend TH3S operator*(Float_t c1, TH3S &h1);
friend TH3S operator*(TH3S &h1, Float_t c1) {return operator*(c1,h1);}
friend TH3S operator+(TH3S &h1, TH3S &h2);
friend TH3S operator-(TH3S &h1, TH3S &h2);
friend TH3S operator*(TH3S &h1, TH3S &h2);
friend TH3S operator/(TH3S &h1, TH3S &h2);
friend TH3S operator*(Float_t c1, TH3S const &h1);
friend TH3S operator*(TH3S const &h1, Float_t c1) {return operator*(c1,h1);}
friend TH3S operator+(TH3S const &h1, TH3S const &h2);
friend TH3S operator-(TH3S const &h1, TH3S const &h2);
friend TH3S operator*(TH3S const &h1, TH3S const &h2);
friend TH3S operator/(TH3S const &h1, TH3S const &h2);

protected:
Double_t RetrieveBinContent(Int_t bin) const override { return Double_t (fArray[bin]); }
Expand Down Expand Up @@ -258,12 +258,12 @@ class TH3I : public TH3, public TArrayI {
void SetBinsLength(Int_t n=-1) override;

TH3I& operator=(const TH3I &h1);
friend TH3I operator*(Float_t c1, TH3I &h1);
friend TH3I operator*(TH3I &h1, Float_t c1) {return operator*(c1,h1);}
friend TH3I operator+(TH3I &h1, TH3I &h2);
friend TH3I operator-(TH3I &h1, TH3I &h2);
friend TH3I operator*(TH3I &h1, TH3I &h2);
friend TH3I operator/(TH3I &h1, TH3I &h2);
friend TH3I operator*(Float_t c1, TH3I const &h1);
friend TH3I operator*(TH3I const &h1, Float_t c1) {return operator*(c1,h1);}
friend TH3I operator+(TH3I const &h1, TH3I const &h2);
friend TH3I operator-(TH3I const &h1, TH3I const &h2);
friend TH3I operator*(TH3I const &h1, TH3I const &h2);
friend TH3I operator/(TH3I const &h1, TH3I const &h2);

protected:
Double_t RetrieveBinContent(Int_t bin) const override { return Double_t (fArray[bin]); }
Expand Down Expand Up @@ -297,12 +297,12 @@ class TH3L : public TH3, public TArrayL64 {
void Reset(Option_t *option="") override;
void SetBinsLength(Int_t n=-1) override;
TH3L& operator=(const TH3L &h1);
friend TH3L operator*(Float_t c1, TH3L &h1);
friend TH3L operator*(TH3L &h1, Float_t c1) {return operator*(c1,h1);}
friend TH3L operator+(TH3L &h1, TH3L &h2);
friend TH3L operator-(TH3L &h1, TH3L &h2);
friend TH3L operator*(TH3L &h1, TH3L &h2);
friend TH3L operator/(TH3L &h1, TH3L &h2);
friend TH3L operator*(Float_t c1, TH3L const &h1);
friend TH3L operator*(TH3L const &h1, Float_t c1) {return operator*(c1,h1);}
friend TH3L operator+(TH3L const &h1, TH3L const &h2);
friend TH3L operator-(TH3L const &h1, TH3L const &h2);
friend TH3L operator*(TH3L const &h1, TH3L const &h2);
friend TH3L operator/(TH3L const &h1, TH3L const &h2);

protected:
Double_t RetrieveBinContent(Int_t bin) const override { return Double_t (fArray[bin]); }
Expand Down Expand Up @@ -344,12 +344,12 @@ class TH3F : public TH3, public TArrayF {
void SetBinsLength(Int_t n=-1) override;

TH3F& operator=(const TH3F &h1);
friend TH3F operator*(Float_t c1, TH3F &h1);
friend TH3F operator*(TH3F &h1, Float_t c1) {return operator*(c1,h1);}
friend TH3F operator+(TH3F &h1, TH3F &h2);
friend TH3F operator-(TH3F &h1, TH3F &h2);
friend TH3F operator*(TH3F &h1, TH3F &h2);
friend TH3F operator/(TH3F &h1, TH3F &h2);
friend TH3F operator*(Float_t c1, TH3F const &h1);
friend TH3F operator*(TH3F const &h1, Float_t c1) {return operator*(c1,h1);}
friend TH3F operator+(TH3F const &h1, TH3F const &h2);
friend TH3F operator-(TH3F const &h1, TH3F const &h2);
friend TH3F operator*(TH3F const &h1, TH3F const &h2);
friend TH3F operator/(TH3F const &h1, TH3F const &h2);

protected:
Double_t RetrieveBinContent(Int_t bin) const override { return Double_t (fArray[bin]); }
Expand Down Expand Up @@ -389,12 +389,12 @@ class TH3D : public TH3, public TArrayD {
void SetBinsLength(Int_t n=-1) override;

TH3D& operator=(const TH3D &h1);
friend TH3D operator*(Float_t c1, TH3D &h1);
friend TH3D operator*(TH3D &h1, Float_t c1) {return operator*(c1,h1);}
friend TH3D operator+(TH3D &h1, TH3D &h2);
friend TH3D operator-(TH3D &h1, TH3D &h2);
friend TH3D operator*(TH3D &h1, TH3D &h2);
friend TH3D operator/(TH3D &h1, TH3D &h2);
friend TH3D operator*(Float_t c1, TH3D const &h1);
friend TH3D operator*(TH3D const &h1, Float_t c1) {return operator*(c1,h1);}
friend TH3D operator+(TH3D const &h1, TH3D const &h2);
friend TH3D operator-(TH3D const &h1, TH3D const &h2);
friend TH3D operator*(TH3D const &h1, TH3D const &h2);
friend TH3D operator/(TH3D const &h1, TH3D const &h2);

protected:
Double_t RetrieveBinContent(Int_t bin) const override { return fArray[bin]; }
Expand Down
Loading

0 comments on commit bc0db53

Please sign in to comment.