DD4hep
1.32.0
Detector Description Toolkit for High Energy Physics
Main Page
Related Pages
Modules
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
Enumerations
_
a
c
d
e
f
g
h
i
l
m
n
o
p
r
s
u
Enumerator
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Related Functions
b
d
g
o
p
s
t
v
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
x
Functions
_
c
d
g
h
i
l
m
n
o
p
r
s
u
Variables
Typedefs
_
a
c
d
e
f
g
j
l
o
p
r
s
t
u
v
x
Enumerations
Enumerator
Macros
_
a
b
c
d
e
g
h
i
m
n
p
r
s
t
u
x
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
DDEve
src
Annotation.cpp
Go to the documentation of this file.
1
//==========================================================================
2
// AIDA Detector description implementation
3
//--------------------------------------------------------------------------
4
// Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
5
// All rights reserved.
6
//
7
// For the licensing terms see $DD4hepINSTALL/LICENSE.
8
// For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
9
//
10
// Author : M.Frank
11
//
12
//==========================================================================
13
14
// Framework include files
15
#include <
DDEve/Annotation.h
>
16
#include <
DD4hep/InstanceCount.h
>
17
#include <TEveViewer.h>
18
#include <TGLViewer.h>
19
20
// C/C++ include files
21
22
// Forward declarations
23
24
using namespace
dd4hep
;
25
26
ClassImp
(
Annotation
)
27
28
Annotation::Annotation
(TEveViewer*
v
,
const
std::string& text,
float
x,
float
y, Color_t c)
30
:
TGLAnnotation
(
v
->GetGLViewer(), text.c_str(), x, y)
31
{
32
SetTextSize(DefaultTextSize());
33
SetUseColorSet(kFALSE);
34
SetTextColor(c);
35
InstanceCount::increment(
this
);
36
}
37
39
Annotation::~Annotation() {
40
InstanceCount::decrement
(
this
);
41
}
42
44
Bool_t
Annotation::MouseEnter
(TGLOvlSelectRecord& ) {
45
fActive = kFALSE;
46
return
kTRUE;
47
}
48
50
float
Annotation::DefaultTextSize
() {
51
return
0.04;
52
}
54
float
Annotation::DefaultMargin
() {
55
return
0.01;
56
}
dd4hep::Annotation::MouseEnter
virtual Bool_t MouseEnter(TGLOvlSelectRecord &selRec)
Mouse has entered overlay area.
Definition:
Annotation.cpp:44
dd4hep::Annotation::Annotation
Annotation(TEveViewer *v, const std::string &text, float x, float y, Color_t c)
Standard constructor with initialization.
dd4hep::Annotation::DefaultTextSize
static float DefaultTextSize()
Default text size.
Definition:
Annotation.cpp:50
v
View * v
Definition:
MultiView.cpp:28
dd4hep::InstanceCount::decrement
static void decrement(T *)
Decrement count according to type information.
Definition:
InstanceCount.h:102
dd4hep::Annotation::DefaultMargin
static float DefaultMargin()
Default margin for placement in bottom left corner.
Definition:
Annotation.cpp:54
TGLAnnotation
Class of the ROOT toolkit. See http://root.cern.ch/root/htmldoc/ClassIndex.html.
Definition:
ROOTClasses.h:29
dd4hep::Annotation
Class to add annotations to eve viewers.
Definition:
Annotation.h:34
dd4hep
Namespace for the AIDA detector description toolkit.
Definition:
AlignmentsCalib.h:28
InstanceCount.h
ClassImp
ClassImp(Annotation) Annotation
Standard constructor with initialization.
Definition:
Annotation.cpp:26
Annotation.h
Generated on Wed May 7 2025 12:36:17 for DD4hep by
1.8.18