-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathFileParser.h
55 lines (39 loc) · 1.07 KB
/
FileParser.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#ifndef FILEPARSER_H
#define FILEPARSER_H
#include <TH1.h>
#include <THStack.h>
#include <TH2.h>
#include <TString.h>
#include <TFile.h>
#include <TObjArray.h>
class FileParser
{
public:
FileParser();
~FileParser();
void OpenFile(TString fname, TString cyclename);
void OpenThetaFile(TString cyclename);
void CloseFile();
void BrowseFile();
void BrowseThetaFile(TString sample);
bool FileExists(TString name);
void SetInfo(TString legname, double weight, int colour, int marker, float unc = 0.);
TH1* Rebin(TH1* hist, TString dirname);
void MakeCumulativeHist(TH1* hist);
TObjArray* GetHists(){return m_hists;}
TObjArray* GetShapeSys(){return m_shapeSys;}
void SetDebug(bool flag=true){debug = flag;}
void SetDoCumulative(bool flag=true){m_do_cumulative = flag;}
void Clear();
private:
TObjArray* FindSubdirs();
void StoreProcessName(TString name);
void SetProcessName(TString name){m_process = name;}
TFile* m_file;
TString m_process;
bool debug;
bool m_do_cumulative;
TObjArray* m_hists;
TObjArray* m_shapeSys;
};
#endif