MaCh3  2.2.3
Reference Guide
plottingUtils.h
Go to the documentation of this file.
1 #pragma once
2 
3 // MaCh3 includes
4 #include "Manager/MaCh3Logger.h"
6 
7 // C++
8 #include <algorithm>
9 #include <iomanip>
10 #include <iostream>
11 #include <map>
12 
14 // ROOT
15 #include "TCanvas.h"
16 #include "TGraph2D.h"
17 #include "TColor.h"
18 #include "TDirectory.h"
19 #include "TFile.h"
20 #include "TGraph.h"
21 #include "TH1.h"
22 #include "TH1D.h"
23 #include "TH2.h"
24 #include "TH2Poly.h"
25 #include "THStack.h"
26 #include "TKey.h"
27 #include "TLatex.h"
28 #include "TLegend.h"
29 #include "TLine.h"
30 #include "TROOT.h"
31 #include "TStyle.h"
32 #include "TMultiGraph.h"
34 
35 
36 namespace MaCh3Plotting {
39 
46 TH1D TGraphToTH1D(TGraph graph, const std::string& newName = "", const std::string& newTitle = "");
47 
48 
52 std::vector<std::vector<double>> TGraphToVector(TGraph graph);
53 
54 
58 std::vector<std::vector<double>> TGraphToVector(TGraph2D graph);
59 
61 } // namespace MaCh3Plotting
#define _MaCh3_Safe_Include_Start_
KS: Avoiding warning checking for headers.
Definition: Core.h:109
#define _MaCh3_Safe_Include_End_
KS: Restore warning checking after including external headers.
Definition: Core.h:120
KS: Based on this https://github.com/gabime/spdlog/blob/a2b4262090fd3f005c2315dcb5be2f0f1774a005/incl...
std::vector< std::vector< double > > TGraphToVector(TGraph graph)
This handy little function lets you interpret a TGraph as a vector containing the same data.
TH1D TGraphToTH1D(TGraph graph, const std::string &newName, const std::string &newTitle)
This handy little function lets you interpret a TGraph as a TH1D.