GamR  0.0.0
GammaROOT
Loading...
Searching...
No Matches
IO.hh
Go to the documentation of this file.
1#ifndef GAMROOT_SPECT_IO_HH
2#define GAMROOT_SPECT_IO_HH
3
4/* STD */
5#include <string>
6#include <vector>
7
8/* ROOT */
9#include <TH1.h>
10#include <TH2.h>
11#include <TGraphErrors.h>
12#include <TGraphAsymmErrors.h>
13#include <TF1.h>
14#include <TCutG.h>
15
16namespace GamR {
17 namespace Spect {
18
19 std::string ToText(const TH1 *h, std::string outfile = "", std::string delimiter=",");
20 std::string ToText(const TH2 *h, std::string outfile = "", std::string delimiter=",", int binx_lo = -1, int binx_hi = -1, int biny_lo = -1, int biny_hi = -1);
21 std::string ToText(const TGraphErrors *g, std::string outfile = "", std::string delimiter=",");
22 std::string ToText(const TGraphAsymmErrors *g, std::string outfile = "", std::string delimiter=",");
23 std::string ToText(const TGraph *g, std::string outfile = "", std::string delimiter=",");
24 std::string ToText(const TGraph *g, int ID, std::string outfile = "", std::string delimiter=",");
25 std::string ToText(const TF1 *f, std::string outfile = "", std::string delimiter=",");
26 void ToBin(const TH2 *h, std::string outfile = "", int padx=0, int pady=0);
27 void ToBin(const TH1 *h, std::string outfile = "");
28 void ToSPE(const TH1 *h, std::string outfile = "");
29 TH1D *FromText(std::string s, std::string name, bool fill=false);
30 TH1D *FromBin(std::string s, std::string name, std::string title, int nx, double low, double high, int size);
31 TCutG *CutFromText(std::string s, std::string name);
32 TH2D *FromBin(std::string s, std::string name, std::string title,
33 int nx, double xlow, double xhigh,
34 int ny, double ylow, double yhigh,
35 int size);
36
37 } // namespace Spect
38} // namespace GamR
39
40#endif
std::string ToText(const TH1 *h, std::string outfile, std::string delimiter)
Definition IO.cc:12
TH1D * FromText(std::string s, std::string name, bool fill)
Definition IO.cc:245
void ToBin(const TH2 *h, std::string outfile, int padx, int pady)
Definition IO.cc:187
void ToSPE(const TH1 *h, std::string outfile)
Definition IO.cc:212
TH1D * FromBin(std::string s, std::string name, std::string title, int nx, double low, double high, int size)
Definition IO.cc:298
TCutG * CutFromText(std::string s, std::string name)
Definition IO.cc:359
Definition Gain.cc:19