Crombie Tools
HistHolder.h
Go to the documentation of this file.
1
#ifndef CROMBIETOOLS_PLOTTOOLS_HISTHOLDER_H
2
#define CROMBIETOOLS_PLOTTOOLS_HISTHOLDER_H
3
4
#include "TH1D.h"
5
#include "TH1.h"
6
#include "TString.h"
7
8
struct
HistHolder
9
{
10
HistHolder
( TH1D *hist, TString entry, Color_t color, TString tree, Bool_t force =
false
, Bool_t is_signal =
false
)
11
{
12
fHist
= hist;
13
fEntry
= entry;
14
fColor
= color;
15
fTree
= tree;
16
fForceTop
= force;
17
if
(is_signal) {
18
fHist
->SetLineWidth(2);
19
fHist
->SetLineStyle(
fColor
);
20
}
21
else
{
22
fHist
->SetFillStyle(1001);
23
fHist
->SetFillColor(
fColor
);
24
fHist
->SetMarkerSize(0);
25
}
26
}
27
virtual
~HistHolder
() {}
28
29
TH1D *
fHist
;
30
TString
fEntry
;
31
Color_t
fColor
;
32
TString
fTree
;
33
Bool_t
fForceTop
;
34
};
35
36
Bool_t
SortHistHolders
(
HistHolder
*h1,
HistHolder
*h2 )
37
{
38
if
(h1->
fForceTop
)
39
return
true
;
40
else
if
(h2->
fForceTop
)
41
return
false
;
42
else
43
return
h1->
fHist
->Integral() > h2->
fHist
->Integral();
44
}
45
46
#endif
old
PlotTools
interface
HistHolder.h
Generated on Tue Nov 3 2020 04:04:03 for Crombie Tools by
1.8.12