Jpp master_rocky-44-g75b7c4f75
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
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:
69 };
70}
71
72#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.
void release()
Release memory.
JRootAddress()
Default constructor.
JRootAddress(const JRootAddress &address)
Copy constructor.
T * getAddress() const
Get address.