Heavy ion Analysis Libriares
Loading...
Searching...
No Matches
MultiGraph.h
1/*
2 * HalMultiGraph.h
3 *
4 * Created on: 30-04-2022
5 * Author: Daniel Wielanek
6 * E-mail: daniel.wielanek@gmail.com
7 * Warsaw University of Technology, Faculty of Physics
8 */
9#ifndef HALMULTIGRAPH_H_
10#define HALMULTIGRAPH_H_
11
12#include <TObject.h>
13
14class TAxis;
15class TH1;
16class TGraphErrors;
17class TMultiGraph;
18
22namespace Hal {
23 class MultiGraph : public TObject {
24 Int_t fN;
25 TGraphErrors** fGraphErrors; //[fN]
26 TMultiGraph* fMultiGraph;
27 TAxis* fXaxis;
28 TAxis* fYaxis;
29 Double_t fMin[2];
30 Double_t fMax[2];
31 Bool_t fDrawn = {kFALSE};
32
33 public:
34 MultiGraph();
40 MultiGraph(Int_t graphs, Option_t* opt = "");
46 void SetXRange(Double_t min, Double_t max);
52 void SetYRange(Double_t min, Double_t max);
58 void SetMarkerStyle(Style_t marker, Int_t no = -1);
64 void SetMarkerSize(Size_t size, Int_t no = -1);
70 void SetMarkerColor(Color_t color, Int_t no = -1);
76 void SetLineWidth(Width_t width, Int_t no = -1);
84 void SetLineAttributes(Style_t style, Width_t width, Color_t color, Int_t no = -1);
92 void SetMarkerAttributes(Style_t style, Size_t size, Color_t color, Int_t no = -1);
98 void SetLineColor(Color_t color, Int_t no = -1);
104 void SetLineStyle(Style_t style, Int_t no = -1);
109 void MakeGraph(Option_t* opt = "P");
115 void MakeGraphs(Int_t no, Option_t* opt = "P");
123 void SetPoint(Int_t graph, Int_t point, Double_t x, Double_t y);
133 void SetPoint(Int_t graph, Int_t point, Double_t x, Double_t ex, Double_t y, Double_t ey);
140 TAxis* GetXaxis();
147 TAxis* GetYaxis();
153 TGraphErrors* GetGraph(Int_t no) const;
158 TMultiGraph* GetMutliGraph() const;
163 void Draw(Option_t* opt = "");
168 Int_t GetNGraphs() const { return fN; }
174 void AddHistogram(const TH1& h, Int_t no = -1);
175 virtual ~MultiGraph();
176 ClassDef(MultiGraph, 1)
177 };
178} // namespace Hal
179#endif /* HALMULTIGRAPH_H_ */
void MakeGraphs(Int_t no, Option_t *opt="P")
void MakeGraph(Option_t *opt="P")
void SetYRange(Double_t min, Double_t max)
void SetLineColor(Color_t color, Int_t no=-1)
TGraphErrors * GetGraph(Int_t no) const
TMultiGraph * GetMutliGraph() const
TAxis * GetYaxis()
void SetLineAttributes(Style_t style, Width_t width, Color_t color, Int_t no=-1)
void SetXRange(Double_t min, Double_t max)
TAxis * GetXaxis()
void SetMarkerColor(Color_t color, Int_t no=-1)
void Draw(Option_t *opt="")
void SetMarkerStyle(Style_t marker, Int_t no=-1)
void SetLineStyle(Style_t style, Int_t no=-1)
Int_t GetNGraphs() const
Definition MultiGraph.h:168
void SetMarkerSize(Size_t size, Int_t no=-1)
void SetMarkerAttributes(Style_t style, Size_t size, Color_t color, Int_t no=-1)
void SetLineWidth(Width_t width, Int_t no=-1)
void AddHistogram(const TH1 &h, Int_t no=-1)
void SetPoint(Int_t graph, Int_t point, Double_t x, Double_t y)