Jpp
master_rocky
the software that should make you happy
software
JROOT
JRootAddress.hh
Go to the documentation of this file.
1
#ifndef __JROOT__JROOTADDRESS__
2
#define __JROOT__JROOTADDRESS__
3
4
#include <cstddef>
5
6
/**
7
* \author mdejong
8
*/
9
10
namespace
JROOT
{}
11
namespace
JPP
{
using namespace
JROOT
; }
12
13
namespace
JROOT
{
14
15
/**
16
* Auxiliary classd for address handling within TTree or TChain.
17
*/
18
template
<
class
T>
19
struct
JRootAddress
{
20
/**
21
* Default constructor.
22
*/
23
JRootAddress
() :
24
address
(NULL)
25
{}
26
27
28
/**
29
* Copy constructor.
30
*
31
* Note that the internal address of this class is not copied but instead set to NULL.
32
*
33
* \param address ROOT address
34
*/
35
JRootAddress
(
const
JRootAddress
&
address
) :
36
address
(NULL)
37
{}
38
39
40
~JRootAddress
() {
41
delete
address
;
42
}
43
/**
44
* Release memory.
45
*/
46
void
release
()
47
{
48
if
(
address
!= NULL) {
49
50
delete
address
;
51
52
address
= NULL;
53
}
54
}
55
56
57
/**
58
* Get address.
59
*
60
* \return address
61
*/
62
T*
getAddress
()
const
63
{
64
return
address
;
65
}
66
67
protected
:
68
T*
address
;
69
};
70
}
71
72
#endif
JPP
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Definition:
JAAnetToolkit.hh:43
JROOT
Auxiliary classes and methods for ROOT I/O.
Definition:
JAbstractStreamer.hh:13
JROOT::JRootAddress
Auxiliary classd for address handling within TTree or TChain.
Definition:
JRootAddress.hh:19
JROOT::JRootAddress::~JRootAddress
~JRootAddress()
Definition:
JRootAddress.hh:40
JROOT::JRootAddress::address
T * address
Definition:
JRootAddress.hh:68
JROOT::JRootAddress::getAddress
T * getAddress() const
Get address.
Definition:
JRootAddress.hh:62
JROOT::JRootAddress::release
void release()
Release memory.
Definition:
JRootAddress.hh:46
JROOT::JRootAddress::JRootAddress
JRootAddress()
Default constructor.
Definition:
JRootAddress.hh:23
JROOT::JRootAddress::JRootAddress
JRootAddress(const JRootAddress &address)
Copy constructor.
Definition:
JRootAddress.hh:35
Generated by
1.9.1