#ifndef __JROOT__JROOTADDRESS__ #define __JROOT__JROOTADDRESS__ #include /** * \author mdejong */ namespace JROOT {} namespace JPP { using namespace JROOT; } namespace JROOT { /** * Auxiliary classd for address handling within TTree or TChain. */ template struct JRootAddress { /** * Default constructor. */ JRootAddress() : address(NULL) {} /** * Copy constructor. * * Note that the internal address of this class is not copied but instead set to NULL. * * \param address ROOT address */ JRootAddress(const JRootAddress& address) : address(NULL) {} ~JRootAddress() { delete address; } /** * Release memory. */ void release() { if (address != NULL) { delete address; address = NULL; } } /** * Get address. * * \return address */ T* getAddress() const { return address; } protected: T* address; }; } #endif