BmnRoot
26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
BmnDrawOnline.h
Go to the documentation of this file.
1
#ifndef BMNDRAWONLINE_H_
2
#define BMNDRAWONLINE_H_
3
4
#include "
BmnDrawHist.h
"
5
#include "
TEfficiency.h
"
6
#include "
TH1.h
"
7
#include "
TH1D.h
"
8
#include "
TH2.h
"
9
#include "
TLegend.h
"
10
#include "
TPad.h
"
11
#include "
TSystem.h
"
12
13
#include <
TCanvas.h
>
14
#include <
TFile.h
>
15
#include <
THttpServer.h
>
16
#include <string>
17
#include <vector>
18
19
using
std::string;
20
using
std::vector;
21
22
class
BmnDrawOnline
23
{
24
public
:
25
/**
26
* \brief Constructor.
27
*/
28
BmnDrawOnline
(
TString
param,
TString
storageName =
"canvStorage"
);
29
30
/**
31
* \brief Constructor.
32
*/
33
BmnDrawOnline
(
TFile
*,
Int_t
port = 8080);
34
35
/**
36
* \brief Destructor.
37
*/
38
virtual
~BmnDrawOnline
();
39
40
/**
41
* \fn DrawH1
42
* \brief Draw 1D histogram.
43
* \param[in] canvas Pointer to canvas
44
* \param[in] hist Pointer to histogram.
45
* \param[in] logx Specify logarithmic or linear scale for X axis.
46
* \param[in] logy Specify logarithmic or linear scale for Y axis.
47
* \param[in] drawOpt Other drawing options (see ROOT documentation for details).
48
* \param[in] color Color.
49
* \param[in] lineWidth Line width.
50
* \param[in] lineStyle Line style (see ROOT documentation for details).
51
* \param[in] markerSize Marker size.
52
* \param[in] markerStyle Marker style (see ROOT documentation for details).
53
*/
54
void
DrawH1
(
TCanvas
* canvas,
55
TH1
* hist,
56
HistScale
logx =
kLinear
,
57
HistScale
logy =
kLinear
,
58
const
string
& drawOpt =
""
,
59
Int_t
color =
BmnDrawingOptions::Color
(0),
60
Int_t
lineWidth =
BmnDrawingOptions::LineWidth
(),
61
Int_t
lineStyle =
BmnDrawingOptions::LineStyle
(0),
62
Float_t
markerSize =
BmnDrawingOptions::MarkerSize
(),
63
Int_t
markerStyle =
BmnDrawingOptions::MarkerStyle
(0),
64
Int_t
fillColor = -1);
65
66
void
DrawH1
(
TCanvas
* canvas,
TEfficiency
* hist);
67
68
/**
69
* \fn DrawH2
70
* \brief Draw 2D histogram.
71
* \param[in] canvas Pointer to canvas
72
* \param[in] hist Pointer to histogram.
73
* \param[in] logx Specify logarithmic or linear scale for X axis.
74
* \param[in] logy Specify logarithmic or linear scale for Y axis.
75
* \param[in] logz Specify logarithmic or linear scale for Z axis.
76
* \param[in] drawOpt Other drawing options (see ROOT documentation for details).
77
*/
78
void
DrawH2
(
TCanvas
* canvas,
79
TH2
* hist,
80
HistScale
logx =
kLinear
,
81
HistScale
logy =
kLinear
,
82
HistScale
logz =
kLinear
,
83
const
string
& drawOpt =
"COLZ"
);
84
85
/**
86
* \fn DrawH1
87
* \brief Draw several TH1 histograms.
88
* \param[in] canvas Pointer to canvas
89
* \param[in] histos Array of histograms.
90
* \param[in] histLabels Array of histogram labels.
91
* \param[in] logx Specify logarithmic or linear scale for X axis.
92
* \param[in] logy Specify logarithmic or linear scale for Y axis.
93
* \param[in] drawLegend If true than legend will be drawn.
94
* \param[in] x1 X coordinate of legend in current pad.
95
* \param[in] y1 Y coordinate of legend in current pad.
96
* \param[in] x2 X coordinate of legend in current pad.
97
* \param[in] y2 Y coordinate of legend in current pad.
98
* \param[in] drawOpt Draw options for TH1->Draw method.
99
*/
100
void
DrawH1
(
TCanvas
* canvas,
101
const
vector<TH1*>& histos,
102
const
vector<string>& histLabels,
103
HistScale
logx =
kLinear
,
104
HistScale
logy =
kLinear
,
105
Bool_t
drawLegend =
true
,
106
Double_t
x1 = 0.25,
107
Double_t
y1 = 0.99,
108
Double_t
x2 = 0.55,
109
Double_t
y2 = 0.75,
110
const
string
& drawOpt =
""
,
111
Bool_t
outputMeanValue01 =
kFALSE
);
112
113
/**
114
* \fn InitServer
115
* \brief Create server on localhost
116
*/
117
void
InitServer
(
Int_t
);
118
119
/**
120
* \fn DrawMainCanvas
121
* \brief Draw All hists on Canvas
122
123
*/
124
125
void
DrawMainCanvas
(
TString
);
126
127
/**
128
* \fn RegisterCanvas
129
* \brief ...
130
* \param[in] file Pointer to canvasStorage root-file
131
132
*/
133
void
RegisterCanvases
(
TFile
*);
134
135
private
:
136
TFile
*
canvStorage
;
137
THttpServer
*
fServer
;
138
TString
canvName
;
139
vector<TCanvas*>
canvVect
;
140
vector<TString>
detVect
;
141
Int_t
maxHeight
;
142
143
ClassDef
(
BmnDrawOnline
, 1)
144
};
145
146
#endif
BmnDrawHist.h
Helper functions for drawing 1D and 2D histograms and graphs.
Bool_t
bool Bool_t
Int_t
int Int_t
Float_t
float Float_t
kFALSE
constexpr Bool_t kFALSE
Double_t
double Double_t
ClassDef
#define ClassDef(name, id)
TCanvas.h
TEfficiency.h
TFile.h
TH1D.h
TH1.h
TH2.h
THttpServer.h
TLegend.h
TPad.h
TSystem.h
BmnDrawOnline
Definition
BmnDrawOnline.h:23
BmnDrawOnline::canvName
TString canvName
Definition
BmnDrawOnline.h:138
BmnDrawOnline::InitServer
void InitServer(Int_t)
BmnDrawOnline::DrawH2
void DrawH2(TCanvas *canvas, TH2 *hist, HistScale logx=kLinear, HistScale logy=kLinear, HistScale logz=kLinear, const string &drawOpt="COLZ")
BmnDrawOnline::DrawMainCanvas
void DrawMainCanvas(TString)
BmnDrawOnline::BmnDrawOnline
BmnDrawOnline(TString param, TString storageName="canvStorage")
Constructor.
BmnDrawOnline::DrawH1
void DrawH1(TCanvas *canvas, TEfficiency *hist)
BmnDrawOnline::canvVect
vector< TCanvas * > canvVect
Definition
BmnDrawOnline.h:139
BmnDrawOnline::~BmnDrawOnline
virtual ~BmnDrawOnline()
Destructor.
BmnDrawOnline::DrawH1
void DrawH1(TCanvas *canvas, const vector< TH1 * > &histos, const vector< string > &histLabels, HistScale logx=kLinear, HistScale logy=kLinear, Bool_t drawLegend=true, Double_t x1=0.25, Double_t y1=0.99, Double_t x2=0.55, Double_t y2=0.75, const string &drawOpt="", Bool_t outputMeanValue01=kFALSE)
BmnDrawOnline::canvStorage
TFile * canvStorage
Definition
BmnDrawOnline.h:136
BmnDrawOnline::detVect
vector< TString > detVect
Definition
BmnDrawOnline.h:140
BmnDrawOnline::maxHeight
Int_t maxHeight
Definition
BmnDrawOnline.h:141
BmnDrawOnline::DrawH1
void DrawH1(TCanvas *canvas, TH1 *hist, HistScale logx=kLinear, HistScale logy=kLinear, const string &drawOpt="", Int_t color=BmnDrawingOptions::Color(0), Int_t lineWidth=BmnDrawingOptions::LineWidth(), Int_t lineStyle=BmnDrawingOptions::LineStyle(0), Float_t markerSize=BmnDrawingOptions::MarkerSize(), Int_t markerStyle=BmnDrawingOptions::MarkerStyle(0), Int_t fillColor=-1)
BmnDrawOnline::BmnDrawOnline
BmnDrawOnline(TFile *, Int_t port=8080)
Constructor.
BmnDrawOnline::RegisterCanvases
void RegisterCanvases(TFile *)
BmnDrawOnline::fServer
THttpServer * fServer
Definition
BmnDrawOnline.h:137
BmnDrawingOptions::LineStyle
static Int_t LineStyle(Int_t lineStyleIndex)
Definition
BmnDrawHist.h:43
BmnDrawingOptions::Color
static Int_t Color(Int_t colorIndex)
Definition
BmnDrawHist.h:34
BmnDrawingOptions::LineWidth
static Int_t LineWidth()
Definition
BmnDrawHist.h:41
BmnDrawingOptions::MarkerStyle
static Int_t MarkerStyle(Int_t markerIndex)
Definition
BmnDrawHist.h:47
BmnDrawingOptions::MarkerSize
static Float_t MarkerSize()
Definition
BmnDrawHist.h:45
TCanvas
TEfficiency
TFile
TH1
TH2
THttpServer
TString
HistScale
HistScale
Define linear or logarithmic scale for drawing.
Definition
BmnDrawHist.h:64
kLinear
@ kLinear
Definition
BmnDrawHist.h:66
QA
report
BmnDrawOnline.h
Generated on
for BmnRoot by
1.17.0