ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/FGolf/Tools/histtools.h
Revision: 1.3
Committed: Sat Jul 14 23:01:48 2012 UTC (12 years, 9 months ago) by fgolf
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +4 -2 lines
Log Message:
minor updates

File Contents

# Content
1 #ifndef HISTTOOLS_H
2 #define HISTTOOLS_H
3 #include "TList.h"
4 #include "TObjArray.h"
5 #include "TH1.h"
6 #include "TH2.h"
7 #include "TLegend.h"
8 #include "THStack.h"
9 #include "TCanvas.h"
10 #include "TFile.h"
11 #include "TRegexp.h"
12 #include "TKey.h"
13 #include "TString.h"
14 #include <vector>
15 #include <iostream>
16
17 namespace hist {
18
19 void add(const char* outHistName, const char* patORpfx);
20
21 void add(const char* outHistName, const char* patORpfx0, const char* patORpfx1, const char* patORpfx2 = 0,
22 const char* patORpfx3 = 0, const char* patORpfx4 = 0, const char* patORpfx5 = 0, const char* patORpfx6 = 0,
23 const char* patORpfx7 = 0, const char* patORpfx8 = 0, const char* patORpfx9 = 0);
24
25 void color(const char* patORpfx, Color_t color);
26
27 TLegend* legend(TCanvas* canvas, Option_t* option = "lpf", Bool_t addColor = kFALSE, Int_t token = -1,
28 Float_t xmin = 0.75, Float_t ymin = 0.75, Float_t xmax = 0.99, Float_t ymax = 0.99);
29
30 void normalize(const char* patORpfx);
31 void scale(const char* patORpfx, Double_t scale);
32 void setrangey(TCanvas* canvas);
33
34 void stack(const char* stackHistName, const char* patORpfx, Bool_t addColor = kFALSE, Option_t* drawOption = "");
35
36 void xaxis(const char* patORpfx, const char* title);
37
38 void yaxis(const char* patORpfx, const char* title);
39
40 TH1F* eff_bg(TH1F* h1, TH1F* h2, TH1F* h3, TH1F* h4, const char* name="eff");
41
42 void deleteHistos();
43
44 void histio();
45 void saveHist(const char* filename, const char* pat = "*");
46 void loadHist(const char* filename, const char* pfx = 0, const char* pat = "*", Bool_t verbose = kFALSE, Bool_t doAdd = kFALSE);
47
48 void combineHists(const std::vector<TString> v_prfxsToCombine, const TString outPrefix);
49 }
50
51 #endif //MACROS_histtools_H