AliPhysics  b095172 (b095172)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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  virtual ~TLinearBinning() {}
92 
93  inline void Set(Int_t nbins, Double_t min, Double_t max);
94 
99  virtual void CreateBinEdges(TArrayD &binedges) const;
100 
101 private:
106 };
107 
109  fMinimum = min;
110  fMaximum = max;
111  fNbins = nbins;
112  fLimitsSet = true;
113 }
114 
115 #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.
Double_t fMaximum
Maximum of the binning.
virtual const char * what() const