Fork me on GitHub

source: git/external/ExRootAnalysis/ExRootResult.h@ 45d8342

ImprovedOutputFile Timing dual_readout llp
Last change on this file since 45d8342 was d7d2da3, checked in by pavel <pavel@…>, 12 years ago

move branches/ModularDelphes to trunk

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