Fork me on GitHub

source: git/external/ExRootAnalysis/ExRootResult.h@ 3b3071a

3.4.3pre11
Last change on this file since 3b3071a 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
RevLine 
[d7d2da3]1#ifndef ExRootResult_h
2#define ExRootResult_h
3
4#include "Gtypes.h"
[341014c]5#include "Rtypes.h"
[d7d2da3]6#include "TMath.h"
7
8#include <map>
[341014c]9#include <set>
[d7d2da3]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,
[341014c]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);
[d7d2da3]36
37 TH1 *AddHist1D(const char *name, const char *title,
[341014c]38 const char *xlabel, const char *ylabel,
39 Int_t nxbins, const Float_t *bins,
40 Int_t logx = 0, Int_t logy = 0);
[d7d2da3]41
42 TProfile *AddProfile(const char *name, const char *title,
[341014c]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);
[d7d2da3]46
47 TH2 *AddHist2D(const char *name, const char *title,
[341014c]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);
[d7d2da3]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
[341014c]63 void PrintPlot(TObject *plot, const char *sufix = "", const char *format = "eps");
[d7d2da3]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
[341014c]79 std::set<TObject *> fPool; //!
[d7d2da3]80
[341014c]81 std::map<TObject *, PlotSettings> fPlotMap; //!
[d7d2da3]82
83 TFolder *fFolder; //!
84};
85
86#endif /* ExRootResult_h */
Note: See TracBrowser for help on using the repository browser.