ATLAS Offline Software
Trigger
TrigAnalysis
TrigInDetAnalysisUser
Analysis
src
DrawLabel.h
Go to the documentation of this file.
1
/* emacs: this is -*- c++ -*- */
12
#ifndef DRAWLABEL_H
13
#define DRAWLABEL_H
14
15
#include <iostream>
16
#include <string>
17
18
#include "TLatex.h"
19
20
21
22
class
DrawLabel
{
23
24
public
:
25
26
DrawLabel
(
double
x
,
double
y
,
const
std::string&
s
,
int
colour
=kBlack,
double
size
=0.033,
double
font
=42 ) :
27
m_text
(
s
),
m_colour
(
colour
),
m_font
(
font
),
m_x
(
x
),
m_y
(
y
),
m_size
(
size
)
28
{
29
// std::cout << "DrawLabel::DrawLabel() " << m_text << std::endl;
30
Draw
();
31
}
32
33
virtual
~DrawLabel
() { }
34
35
void
Draw
()
const
{
36
TLatex*
tt
=
new
TLatex();
37
tt
->SetNDC();
38
tt
->SetTextColor(
m_colour
);
39
tt
->SetTextSize(
m_size
);
40
tt
->SetTextFont(
m_font
);
41
tt
->DrawLatex(
m_x
,
m_y
,
m_text
.c_str() );
42
}
43
44
const
std::string&
text
()
const
{
return
m_text
; }
45
46
private
:
47
48
std::string
m_text
;
49
int
m_colour
;
50
int
m_font
;
51
52
double
m_x
;
53
double
m_y
;
54
55
double
m_size
;
56
57
};
58
59
inline
std::ostream&
operator<<
( std::ostream&
s
,
const
DrawLabel
&
d
) {
60
return
s
<<
d
.text();
61
}
62
63
64
#endif // DRAWLABEL_H
65
66
67
68
69
70
71
72
73
74
DrawLabel::text
const std::string & text() const
Definition:
DrawLabel.h:44
DrawLabel::DrawLabel
DrawLabel(double x, double y, const std::string &s, int colour=kBlack, double size=0.033, double font=42)
Definition:
DrawLabel.h:26
operator<<
std::ostream & operator<<(std::ostream &s, const DrawLabel &d)
Definition:
DrawLabel.h:59
hist_file_dump.d
d
Definition:
hist_file_dump.py:142
x
#define x
DrawLabel::~DrawLabel
virtual ~DrawLabel()
Definition:
DrawLabel.h:33
DrawLabel::m_text
std::string m_text
Definition:
DrawLabel.h:48
DrawLabel::m_colour
int m_colour
Definition:
DrawLabel.h:49
python.setupRTTAlg.size
int size
Definition:
setupRTTAlg.py:39
DrawLabel::m_size
double m_size
Definition:
DrawLabel.h:55
DrawLabel::Draw
void Draw() const
Definition:
DrawLabel.h:35
DrawLabel::m_y
double m_y
Definition:
DrawLabel.h:53
DrawLabel::m_font
int m_font
Definition:
DrawLabel.h:50
DrawLabel
Definition:
DrawLabel.h:22
python.DetStatusLib.colour
def colour(code)
Definition:
DetStatusLib.py:14
y
#define y
python.SystemOfUnits.s
float s
Definition:
SystemOfUnits.py:147
plotBeamSpotMon.font
font
Definition:
plotBeamSpotMon.py:79
DrawLabel::m_x
double m_x
Definition:
DrawLabel.h:52
TileDCSDataPlotter.tt
tt
Definition:
TileDCSDataPlotter.py:876
Generated on Wed Sep 3 2025 21:09:11 for ATLAS Offline Software by
1.8.18