Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
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
10namespace JROOT {}
11namespace JPP { using namespace JROOT; }
12
13namespace 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 */
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 */
36 address(NULL)
37 {}
38
39
40 /**
41 * Destructor.
42 *
43 * Release memory.
44 */
46 {
47 release();
48 }
49
50
51 /**
52 * Release memory.
53 */
54 void release()
55 {
56 if (address != NULL) {
57
58 delete address;
59
60 address = NULL;
61 }
62 }
63
64
65 /**
66 * Get address.
67 *
68 * \return address
69 */
70 T* getAddress() const
71 {
72 return address;
73 }
74
75 protected:
77 };
78}
79
80#endif
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary classes and methods for ROOT I/O.
Auxiliary classd for address handling within TTree or TChain.
~JRootAddress()
Destructor.
void release()
Release memory.
JRootAddress()
Default constructor.
JRootAddress(const JRootAddress &address)
Copy constructor.
T * getAddress() const
Get address.