Loading [MathJax]/extensions/tex2jax.js
ROOT
6.12/07
Reference Guide
ROOT Home Page
Main Page
Tutorials
User's Classes
+
Namespaces
Namespace List
+
Namespace 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
j
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
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
u
w
x
+
Enumerations
a
e
f
g
m
p
t
w
y
+
Enumerator
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
w
+
All 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
j
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
q
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
y
+
Enumerations
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
w
y
+
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
+
Properties
f
+
Related Functions
:
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Files
File List
+
File Members
+
All
1
2
3
4
5
6
7
8
9
_
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
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
+
Variables
_
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
+
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
+
Enumerations
c
e
f
i
l
m
p
r
u
x
+
Enumerator
a
c
d
e
f
g
h
i
k
l
n
o
p
r
s
v
w
+
Macros
1
2
3
4
5
6
7
8
9
_
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
Release Notes
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
graf2d
gpad
v7
src
TDisplayItem.cxx
Go to the documentation of this file.
1
/// \file TDisplayItem.cxx
2
/// \ingroup Base ROOT7
3
/// \author Sergey Linev
4
/// \date 2017-05-31
5
/// \warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback
6
/// is welcome!
7
8
/*************************************************************************
9
* Copyright (C) 1995-2017, Rene Brun and Fons Rademakers. *
10
* All rights reserved. *
11
* *
12
* For the licensing terms see $ROOTSYS/LICENSE. *
13
* For the list of contributors see $ROOTSYS/README/CREDITS. *
14
*************************************************************************/
15
16
#include "
ROOT/TDisplayItem.hxx
"
17
18
#include "
TString.h
"
19
20
ROOT::Experimental::TDisplayItem::TDisplayItem
() : fObjectID(), fOption(), fKind(0)
21
{
22
}
23
24
ROOT::Experimental::TDisplayItem::TDisplayItem
(
const
TDisplayItem
&rhs)
25
:
fObjectID
(rhs.
fObjectID
),
fOption
(rhs.
fOption
),
fKind
(rhs.
fKind
)
26
{
27
}
28
29
// pin vtable
30
ROOT::Experimental::TDisplayItem::~TDisplayItem
()
31
{
32
}
33
34
std::string
ROOT::Experimental::TDisplayItem::MakeIDFromPtr
(
void
*ptr)
35
{
36
UInt_t
hash =
TString::Hash
(&ptr,
sizeof
(ptr));
37
TString
res =
TString::UItoa
(hash, 10);
38
return
std::string(res.
Data
());
39
}
40
41
void
ROOT::Experimental::TDisplayItem::SetObjectIDAsPtr
(
void
*ptr)
42
{
43
std::string
id
=
MakeIDFromPtr
(ptr);
44
SetObjectID
(
id
.c_str());
45
}
46
47
// =================
48
49
ROOT::Experimental::TPadDisplayItem::~TPadDisplayItem
()
50
{
51
Clear();
52
}
53
54
void
ROOT::Experimental::TPadDisplayItem::Clear
()
55
{
56
for
(
unsigned
n
= 0;
n
< fPrimitives.size(); ++
n
)
delete
fPrimitives[
n
];
57
fPrimitives.clear();
58
}
ROOT::Experimental::TDisplayItem::fKind
int fKind
Definition:
TDisplayItem.hxx:35
TDisplayItem.hxx
TString::UItoa
static TString UItoa(UInt_t value, Int_t base)
Converts a UInt_t (twice the range of an Int_t) to a TString with respect to the base specified (2-36...
Definition:
TString.cxx:2106
ROOT::Experimental::TDisplayItem::SetObjectIDAsPtr
void SetObjectIDAsPtr(void *ptr)
Definition:
TDisplayItem.cxx:41
TString
Basic string class.
Definition:
TString.h:125
TString::Hash
UInt_t Hash(ECaseCompare cmp=kExact) const
Return hash value.
Definition:
TString.cxx:616
ROOT::Experimental::TPadDisplayItem::Clear
void Clear()
Definition:
TDisplayItem.cxx:54
TString.h
UInt_t
unsigned int UInt_t
Definition:
RtypesCore.h:42
ROOT::Experimental::TDisplayItem::SetObjectID
void SetObjectID(const char *id)
Definition:
TDisplayItem.hxx:43
ROOT::Experimental::TDisplayItem::fOption
std::string fOption
Definition:
TDisplayItem.hxx:34
ROOT::Experimental::TDisplayItem::TDisplayItem
TDisplayItem()
Definition:
TDisplayItem.cxx:20
ROOT::Experimental::TDisplayItem::MakeIDFromPtr
static std::string MakeIDFromPtr(void *ptr)
Definition:
TDisplayItem.cxx:34
ROOT::Experimental::TDisplayItem::~TDisplayItem
virtual ~TDisplayItem()
Definition:
TDisplayItem.cxx:30
ROOT::Experimental::TDisplayItem
Base class for painting data for JS.
Definition:
TDisplayItem.hxx:31
ROOT::Experimental::TDisplayItem::fObjectID
std::string fObjectID
Definition:
TDisplayItem.hxx:33
n
const Int_t n
Definition:
legend1.C:16
ROOT::Experimental::TPadDisplayItem::~TPadDisplayItem
virtual ~TPadDisplayItem()
Definition:
TDisplayItem.cxx:49
TString::Data
const char * Data() const
Definition:
TString.h:345