AliPhysics  9b6b435 (9b6b435)
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  ClassDef(TLinearBinning, 1);
124 };
125 
127  fMinimum = min;
128  fMaximum = max;
129  fNbins = nbins;
130  fLimitsSet = true;
131 }
132 
133 #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:23
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