AliPhysics  88b7ad0 (88b7ad0)
TLinearBinning.h
Go to the documentation of this file.
1 #ifndef TLINEARBINNING_H
2 #define TLINEARBINNING_H
3 /* Copyright(c) 1998-2016, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice */
5 
6 class TArrayD;
7 
8 #include <exception>
9 #include <Rtypes.h>
10 #include <TBinning.h>
11 
47 class TLinearBinning : public TBinning{
48 public:
49 
59  class LimitsNotSetException : public std::exception{
60  public:
61 
66 
70  virtual ~LimitsNotSetException() throw() {}
71 
76  virtual const char *what() const throw() { return "Limits needed for the linear binning are not set."; }
77  };
78 
83 
91 
95  virtual ~TLinearBinning() {}
96 
101  virtual TBinning *MakeCopy() const;
102 
109  inline void Set(Int_t nbins, Double_t min, Double_t max);
110 
115  virtual void CreateBinEdges(TArrayD &binedges) const;
116 
117 private:
122 };
123 
125  fMinimum = min;
126  fMaximum = max;
127  fNbins = nbins;
128  fLimitsSet = true;
129 }
130 
131 #endif /* TLINEARBINNING_H */
double Double_t
Definition: External.C:58
void Set(Int_t nbins, Double_t min, Double_t max)
Class creating a linear binning, used in the histogram manager.
virtual ~TLinearBinning()
virtual void CreateBinEdges(TArrayD &binedges) const
Interface for binnings used by the histogram handler.
Definition: TBinning.h:21
int Int_t
Definition: External.C:63
Double_t fMinimum
Minimum of the binning.
Exception indicating that the limits are not set.
const Int_t nbins
bool Bool_t
Definition: External.C:53
Int_t fNbins
Number of bins.
Bool_t fLimitsSet
Switch indicating that the binning is initialized.
virtual TBinning * MakeCopy() const
Double_t fMaximum
Maximum of the binning.
virtual const char * what() const