ATLAS Offline Software
Loading...
Searching...
No Matches
DrawLabel Class Reference

#include <DrawLabel.h>

Collaboration diagram for DrawLabel:

Public Member Functions

 DrawLabel (double x, double y, const std::string &s, int colour=kBlack, double size=0.033, double font=42)
virtual ~DrawLabel ()
void Draw () const
const std::string & text () const

Private Attributes

std::string m_text
int m_colour
int m_font
double m_x
double m_y
double m_size

Detailed Description

Definition at line 22 of file DrawLabel.h.

Constructor & Destructor Documentation

◆ DrawLabel()

DrawLabel::DrawLabel ( double x,
double y,
const std::string & s,
int colour = kBlack,
double size = 0.033,
double font = 42 )
inline

Definition at line 26 of file DrawLabel.h.

26 :
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 }
#define y
#define x
int m_font
Definition DrawLabel.h:50
double m_y
Definition DrawLabel.h:53
int m_colour
Definition DrawLabel.h:49
double m_x
Definition DrawLabel.h:52
void Draw() const
Definition DrawLabel.h:35
double m_size
Definition DrawLabel.h:55
std::string m_text
Definition DrawLabel.h:48

◆ ~DrawLabel()

virtual DrawLabel::~DrawLabel ( )
inlinevirtual

Definition at line 33 of file DrawLabel.h.

33{ }

Member Function Documentation

◆ Draw()

void DrawLabel::Draw ( ) const
inline

Definition at line 35 of file DrawLabel.h.

35 {
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 }

◆ text()

const std::string & DrawLabel::text ( ) const
inline

Definition at line 44 of file DrawLabel.h.

44{ return m_text; }

Member Data Documentation

◆ m_colour

int DrawLabel::m_colour
private

Definition at line 49 of file DrawLabel.h.

◆ m_font

int DrawLabel::m_font
private

Definition at line 50 of file DrawLabel.h.

◆ m_size

double DrawLabel::m_size
private

Definition at line 55 of file DrawLabel.h.

◆ m_text

std::string DrawLabel::m_text
private

Definition at line 48 of file DrawLabel.h.

◆ m_x

double DrawLabel::m_x
private

Definition at line 52 of file DrawLabel.h.

◆ m_y

double DrawLabel::m_y
private

Definition at line 53 of file DrawLabel.h.


The documentation for this class was generated from the following file: