ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/mstein/triggerStudy/plotMaker.h
Revision: 1.1
Committed: Tue Nov 27 12:50:57 2012 UTC (12 years, 5 months ago) by mstein
Content type: text/plain
Branch: MAIN
CVS Tags: v2, HEAD
Log Message:
first running version

File Contents

# Content
1 #ifndef plotMaker_h
2 #define plotMaker_h
3
4 #include "TH1D.h"
5
6
7 //================================================================================= class: plotMaker
8 class plotMaker{
9 public:
10 //--------------------------------------------------- variables
11 std::map<TString, TH1D*> h1d;
12 //--------------------------------------------------- functions
13 plotMaker();
14 virtual ~plotMaker();
15
16 //here the new histogram is created
17 void addh1d(TString name, TString title, TString xtitle, TString ytitle, Int_t bin, Double_t low, Double_t up);
18 //add a new histogram if its not present yet, and fill it
19 void addh1d(TString name, TString title, TString xtitle, TString ytitle, Int_t bin, Double_t low, Double_t up, Double_t value, Double_t weight=1);
20
21 //add external histogram to the collection
22 void addh1d(TH1D* h);
23 //add external histogram to the collection and rename it
24 void addh1d(TString newName, TH1D* h);
25 //add multiple external histograms to the collection
26 void addh1d(vector<TH1D*> h);
27
28 //add histogram from external root file
29 void addh1d(TString fileName, TString name);
30 //add histogram from external root file and rename it
31 void addh1d(TString newName, TString fileName, TString name);
32 //add multiple histograms from external root file
33 void addh1d(TString fileName, vector<TString> names);
34
35 bool isNewh1d(TString name);
36
37 void savePlots(TString fileName, TString option="RECREATE", TString dirName = "");
38 //void savePlotsAsImage(TString fileName, TString option="RECREATE", TString dirName = "");
39 };
40
41
42
43
44 #endif
45
46
47
48
49
50