Jpp  19.0.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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  */
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
void release()
Release memory.
Definition: JRootAddress.hh:46
Auxiliary classd for address handling within TTree or TChain.
Definition: JRootAddress.hh:19
do set_variable OUTPUT_DIRECTORY $WORKDIR T
JRootAddress(const JRootAddress &address)
Copy constructor.
Definition: JRootAddress.hh:35
T * getAddress() const
Get address.
Definition: JRootAddress.hh:62
JRootAddress()
Default constructor.
Definition: JRootAddress.hh:23