-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathFileReader.h
More file actions
43 lines (39 loc) · 1.62 KB
/
FileReader.h
File metadata and controls
43 lines (39 loc) · 1.62 KB
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
#ifndef FileReader_H
#define FileReader_H
#include <iostream>
#include "TFile.h"
#include "TH1.h"
#include "TH2.h"
class FileReader {
public:
FileReader() = default;
~FileReader() = default;
/// Read a TH2F from the file
/// \param filename Path to the file
/// \param appendix Appendix of the content (kMB, kHighMultV0, ..._
/// \param path TList inside the file
/// \param histname name of the histogram
/// \param prefix Name of the folder
/// \return TH2F from the file
static TH2F *GetHist2D(TString filename, TString appendix, TString dirName,
std::vector<TString> path, TString histname, TString prefix = "histo");
/// Read a TH1F from the file
/// \param filename Path to the file
/// \param appendix Appendix of the content (kMB, kHighMultV0, ..._
/// \param path TList inside the file
/// \param histname name of the histogram
/// \param prefix Name of the folder
/// \return TH1F from the file
static TH1F *GetHist1D(TString filename, TString appendix, TString dirName,
std::vector<TString> path, TString histname, TString prefix = "histo");
/// Read a TProfile from the file
/// \param filename Path to the file
/// \param appendix Appendix of the content (kMB, kHighMultV0, ..._
/// \param path TList inside the file
/// \param histname name of the histogram
/// \param prefix Name of the folder
/// \return TProfile from the file
static TProfile *GetProfile(TString filename, TString appendix, TString dirName,
std::vector<TString> path, TString histname, TString prefix = "histo");
};
#endif // FileReader_H