BmnRoot
Loading...
Searching...
No Matches
PadInfo.h
Go to the documentation of this file.
1#ifndef PADINFO_H
2#define PADINFO_H
3
4#include <TH1.h>
5#include <TLegend.h>
6#include <TVirtualPad.h>
7#include <memory>
8#include <string>
9#include <vector>
10
11using std::shared_ptr;
12using std::string;
13using std::vector;
14
20{
21 public:
23 : temp(nullptr)
24 , current(nullptr)
25 , ref(nullptr)
26 , legend(nullptr)
27 , padPtr(nullptr)
28 , logx(false)
29 , logy(false)
30 , logz(false)
31 , normalize(true)
32 {}
33
34 PadInfo(TH1* c)
35 : temp(nullptr)
36 , current(c)
37 , ref(nullptr)
38 , legend(nullptr)
39 , padPtr(nullptr)
40 , logx(false)
41 , logy(false)
42 , logz(false)
43 , normalize(true)
44 {}
45
46 PadInfo(TH1* c, vector<TH1*>&& a, vector<TString>&& ao, TLegend* leg = nullptr)
47 : temp(nullptr)
48 , current(c)
49 , ref(nullptr)
50 , aux(a)
51 , auxOpt(ao)
52 , legend(leg)
53 , padPtr(nullptr)
54 , logx(false)
55 , logy(false)
56 , logz(false)
57 , normalize(true)
58 {}
59
60 virtual ~PadInfo()
61 {
62 printf("~PadInfo() \n");
63 if (temp)
64 delete temp;
65 if (current)
66 delete current;
67 if (ref)
68 delete ref;
69 for (auto& el : aux)
70 if (el)
71 delete el;
72 if (legend)
73 delete legend;
74 }
75 void Reset();
76 TH1* temp;
77 // shared_ptr<TH1> current;
78 TH1* current;
79 TH1* ref;
80 vector<TH1*> aux;
81 vector<TString> auxOpt;
82 TLegend* legend;
83 TVirtualPad* padPtr;
84 bool logx;
85 bool logy;
86 bool logz;
88 string opt;
89 string name;
90 string variable;
91 string selection;
92
93 // TClass* classPtr;
94
95 private:
96 ClassDef(PadInfo, 2)
97};
98
99#endif /* PADINFO_H */
Storage for pad content and it's options.
Definition PadInfo.h:20
string name
Definition PadInfo.h:89
string selection
Definition PadInfo.h:91
PadInfo(TH1 *c, vector< TH1 * > &&a, vector< TString > &&ao, TLegend *leg=nullptr)
Definition PadInfo.h:46
TVirtualPad * padPtr
Definition PadInfo.h:83
string opt
Definition PadInfo.h:88
bool normalize
Definition PadInfo.h:87
virtual ~PadInfo()
Definition PadInfo.h:60
bool logy
Definition PadInfo.h:85
string variable
Definition PadInfo.h:90
void Reset()
Definition PadInfo.cxx:3
TH1 * ref
Definition PadInfo.h:79
PadInfo()
Definition PadInfo.h:22
bool logz
Definition PadInfo.h:86
vector< TH1 * > aux
Definition PadInfo.h:80
vector< TString > auxOpt
Definition PadInfo.h:81
TLegend * legend
Definition PadInfo.h:82
TH1 * current
Definition PadInfo.h:78
TH1 * temp
Definition PadInfo.h:76
PadInfo(TH1 *c)
Definition PadInfo.h:34
bool logx
Definition PadInfo.h:84