| # Gaudi Framework, version v21r10p1 |

Home |  | Generated: 29 Jul 2010

# RootObjAddress.h

Go to the documentation of this file.

    00001 #ifndef ROOTHISTCNV_ROOTOBJADDRESS_H
    00002 #define ROOTHISTCNV_ROOTOBJADDRESS_H 1
    00003
    00004 #include "GaudiKernel/IOpaqueAddress.h"
    00005
    00006 class TObject;
    00007
    00008 namespace RootHistCnv {
    00009
    00010   class RootObjAddress: public IOpaqueAddress {
    00011
    00012
    00013   protected:
    00014
    00015     unsigned long   m_refCount;
    00017     long            m_svcType;
    00019     CLID            m_clID;
    00021     std::string     m_par[2];
    00023     unsigned long   m_ipar[2];
    00025     IRegistry*      m_pRegistry;
    00027     TObject*        m_tObj;
    00028
    00029   public:
    00030
    00032     RootObjAddress()
    00033       : m_refCount(0),
    00034       m_svcType(0),
    00035       m_clID(0),
    00036       m_pRegistry(0),
    00037       m_tObj(0)
    00038     {
    00039       m_ipar[0]=m_ipar[1]=0xFFFFFFFF;
    00040     }
    00041
    00042     RootObjAddress(const RootObjAddress& copy)
    00043       : IOpaqueAddress(copy),
    00044         m_refCount(0),
    00045         m_svcType(copy.m_svcType),
    00046         m_clID(copy.m_clID),
    00047         m_pRegistry(copy.m_pRegistry),
    00048         m_tObj(copy.m_tObj)
    00049     {
    00050       m_par[0]  = copy.m_par[0];
    00051       m_par[1]  = copy.m_par[1];
    00052       m_ipar[0] = copy.m_ipar[0];
    00053       m_ipar[1] = copy.m_ipar[1];
    00054     }
    00055
    00057     RootObjAddress( long svc,
    00058                     const CLID& clid,
    00059                     const std::string& p1="",
    00060                     const std::string& p2="",
    00061                     unsigned long ip1=0,
    00062                     unsigned long ip2=0,
    00063                     TObject* tObj=0 )
    00064       : m_refCount(0),
    00065       m_svcType(svc),
    00066       m_clID(clid),
    00067       m_pRegistry(0),
    00068       m_tObj(tObj)
    00069     {
    00070       m_par[0]  = p1;
    00071       m_par[1]  = p2;
    00072       m_ipar[0] = ip1;
    00073       m_ipar[1] = ip2;
    00074     }
    00075
    00077     virtual ~RootObjAddress()   {
    00078     }
    00079
    00081     virtual unsigned long addRef   ()   {
    00082       return ++m_refCount;
    00083     }
    00084
    00085     virtual unsigned long release  ()   {
    00086       int cnt = --m_refCount;
    00087       if ( 0 == cnt )   {
    00088         delete this;
    00089       }
    00090       return cnt;
    00091     }
    00093     virtual IRegistry* registry()   const     {
    00094       return m_pRegistry;
    00095     }
    00097     virtual void setRegistry(IRegistry* pRegistry)   {
    00098       m_pRegistry = pRegistry;
    00099     }
    00101     virtual const CLID& clID()  const   {
    00102       return m_clID;
    00103     }
    00105     virtual void setClID(const CLID& clid)   {
    00106       m_clID = clid;
    00107     }
    00109     virtual long svcType()  const    {
    00110       return m_svcType;
    00111     }
    00113     virtual void setSvcType(long typ)    {
    00114       m_svcType = typ;
    00115     }
    00117     virtual const std::string* par() const   {
    00118       return m_par;
    00119     }
    00121     virtual const unsigned long* ipar()  const  {
    00122       return m_ipar;
    00123     }
    00124
    00126     virtual TObject* tObj() const {
    00127       return m_tObj;
    00128     }
    00129
    00130   };
    00131 }
    00132
    00133 #endif