Histogram2Dim.hh
Go to the documentation of this file.
1 
4 #pragma once
5 
6 #include "TH2F.h"
7 #include "TExec.h"
8 
9 #include "boca/plotting/Plot.hh"
10 #include "boca/plotting/Canvas.hh"
11 #include "boca/plotting/Legend.hh"
12 
13 namespace boca
14 {
15 
16 class Histogram2Dim : public Canvas
17 {
18 
19 public:
20 
21  Histogram2Dim(std::string const& path, std::string const& name, bool show_title = false);
22 
24 
25  void SetLegend(Orientation orientation, latex::String const& title = latex::String());
26 
27  void SetXAxis(latex::String const& title);
28 
29  void SetYAxis(latex::String const& title);
30 
31  void AddHistogram(latex::String const& name, int bins, Rectangle<double> const& range, Plot const& points, EColor color);
32 
33  std::string FileBaseName() const override;
34 
35 private:
36 
37  boca::Legend & Legend();
38 
39  void Draw();
40 
41  TExec Exec(EColor color);
42 
43  boca::Legend legend_;
44 
45  std::vector<TH2F> histograms_;
46 
47  std::vector<TExec> execs_;
48 
49 
50 };
51 
52 }
Histogram2Dim(std::string const &path, std::string const &name, bool show_title=false)
Definition: Histogram2Dim.cpp:18
Definition: Plot.hh:15
void AddHistogram(latex::String const &name, int bins, Rectangle< double > const &range, Plot const &points, EColor color)
Definition: Histogram2Dim.cpp:66
void SetLegend(Orientation orientation, latex::String const &title=latex::String())
Definition: Histogram2Dim.cpp:32
Definition: Histogram2Dim.hh:16
Definition: String.hh:45
Boosted Collider Analysis.
Definition: Analysis.hh:15
Definition: Canvas.hh:14
~Histogram2Dim()
Definition: Histogram2Dim.cpp:26
Definition: Legend.hh:15
Orientation
Orientation of the Legend.
Definition: Orientation.hh:20
void SetYAxis(latex::String const &title)
Definition: Histogram2Dim.cpp:60
std::string FileBaseName() const override
Definition: Histogram2Dim.cpp:98
void SetXAxis(latex::String const &title)
Definition: Histogram2Dim.cpp:54