Rivet  1.8.0
BinnedHistogram.hh
1 // -*- C++ -*-
2 #ifndef RIVET_BINNEDHISTOGRAM_HH
3 #define RIVET_BINNEDHISTOGRAM_HH
4 #include "Rivet/Rivet.hh"
5 
6 namespace Rivet {
7 
8  class Analysis;
9 
10 
17  template<typename T>
19  public:
20 
23  return;
24  }
25 
28  const BinnedHistogram<T>& addHistogram(const T& binMin,
29  const T& binMax,
30  AIDA::IHistogram1D* histo);
31 
34  AIDA::IHistogram1D* fill(const T& bin,
35  const T& val,
36  double weight);
37 
40  void scale(const T& scale, Analysis* ana);
41 
42  const vector<AIDA::IHistogram1D*>& getHistograms() const { return _histos; }
43  vector<AIDA::IHistogram1D*>& getHistograms() { return _histos; }
44 
45 
46  private:
47 
48  map<T, AIDA::IHistogram1D*> _histosByUpperBound;
49  map<T, AIDA::IHistogram1D*> _histosByLowerBound;
50  vector<AIDA::IHistogram1D*> _histos;
51  map<AIDA::IHistogram1D*, T> _binWidths;
52 
53  };
54 
55 
56 }
57 
58 #endif