Fork me on GitHub

source: git/external/ExRootAnalysis/ExRootResult.h@ 9189af2

Last change on this file since 9189af2 was 341014c, checked in by Pavel Demin <pavel-demin@…>, 6 years ago

apply .clang-format to all .h, .cc and .cpp files

  • Property mode set to 100644
File size: 1.9 KB
Line 
1#ifndef ExRootResult_h
2#define ExRootResult_h
3
4#include "Gtypes.h"
5#include "Rtypes.h"
6#include "TMath.h"
7
8#include <map>
9#include <set>
10
11class TH1;
12class TH2;
13class THStack;
14class TCanvas;
15class TLegend;
16class TProfile;
17class TPaveText;
18class TObjArray;
19class TFolder;
20
21class ExRootResult
22{
23
24public:
25 ExRootResult();
26 ~ExRootResult();
27
28 void Reset();
29 void Write(const char *fileName = "results.root");
30 void Print(const char *format = "eps");
31
32 TH1 *AddHist1D(const char *name, const char *title,
33 const char *xlabel, const char *ylabel,
34 Int_t nxbins, Axis_t xmin, Axis_t xmax,
35 Int_t logx = 0, Int_t logy = 0);
36
37 TH1 *AddHist1D(const char *name, const char *title,
38 const char *xlabel, const char *ylabel,
39 Int_t nxbins, const Float_t *bins,
40 Int_t logx = 0, Int_t logy = 0);
41
42 TProfile *AddProfile(const char *name, const char *title,
43 const char *xlabel, const char *ylabel,
44 Int_t nxbins, Axis_t xmin, Axis_t xmax,
45 Int_t logx = 0, Int_t logy = 0);
46
47 TH2 *AddHist2D(const char *name, const char *title,
48 const char *xlabel, const char *ylabel,
49 Int_t nxbins, Axis_t xmin, Axis_t xmax,
50 Int_t nybins, Axis_t ymin, Axis_t ymax,
51 Int_t logx = 0, Int_t logy = 0);
52
53 THStack *AddHistStack(const char *name, const char *title);
54
55 TLegend *AddLegend(Double_t x1, Double_t y1, Double_t x2, Double_t y2);
56
57 TPaveText *AddComment(Double_t x1, Double_t y1, Double_t x2, Double_t y2);
58
59 void Attach(TObject *plot, TObject *object);
60
61 TCanvas *GetCanvas();
62
63 void PrintPlot(TObject *plot, const char *sufix = "", const char *format = "eps");
64
65 void SetFolder(TFolder *folder) { fFolder = folder; }
66
67private:
68 struct PlotSettings
69 {
70 Int_t logx;
71 Int_t logy;
72 TObjArray *attachments;
73 };
74
75 void CreateCanvas();
76
77 TCanvas *fCanvas; //!
78
79 std::set<TObject *> fPool; //!
80
81 std::map<TObject *, PlotSettings> fPlotMap; //!
82
83 TFolder *fFolder; //!
84};
85
86#endif /* ExRootResult_h */
Note: See TracBrowser for help on using the repository browser.