| # Gaudi Framework, version v25r0 |

Home |  | Generated: Mon Feb 17 2014

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RootObjAddress.h
Go to the documentation of this file.
1 #ifndef ROOTHISTCNV_ROOTOBJADDRESS_H
2 #define ROOTHISTCNV_ROOTOBJADDRESS_H 1
3
4 #include "GaudiKernel/IOpaqueAddress.h"
5
6 class TObject;
7
8 namespace RootHistCnv {
9
10 class RootObjAddress: public IOpaqueAddress {
11
12
13 protected:
14
15 unsigned long m_refCount;
17 long m_svcType;
19 CLID m_clID;
21 std::string m_par[2];
23 unsigned long m_ipar[2];
25 IRegistry* m_pRegistry;
27 TObject* m_tObj;
28
29 public:
30
32 RootObjAddress()
33 : m_refCount(0),
34 m_svcType(0),
35 m_clID(0),
36 m_pRegistry(0),
37 m_tObj(0)
38 {
39 m_ipar[0]=m_ipar[1]=0xFFFFFFFF;
40 }
41
42 RootObjAddress(const RootObjAddress& copy)
43 : IOpaqueAddress(copy),
44 m_refCount(0),
45 m_svcType(copy.m_svcType),
46 m_clID(copy.m_clID),
47 m_pRegistry(copy.m_pRegistry),
48 m_tObj(copy.m_tObj)
49 {
50 m_par[0] = copy.m_par[0];
51 m_par[1] = copy.m_par[1];
52 m_ipar[0] = copy.m_ipar[0];
53 m_ipar[1] = copy.m_ipar[1];
54 }
55
57 RootObjAddress( long svc,
58 const CLID& clid,
59 const std::string& p1="",
60 const std::string& p2="",
61 unsigned long ip1=0,
62 unsigned long ip2=0,
63 TObject* tObj=0 )
64 : m_refCount(0),
65 m_svcType(svc),
66 m_clID(clid),
67 m_pRegistry(0),
68 m_tObj(tObj)
69 {
70 m_par[0] = p1;
71 m_par[1] = p2;
72 m_ipar[0] = ip1;
73 m_ipar[1] = ip2;
74 }
75
77 virtual ~RootObjAddress() {
78 }
79
81 virtual unsigned long addRef () {
82 return ++m_refCount;
83 }
84
85 virtual unsigned long release () {
86 int cnt = --m_refCount;
87 if ( 0 == cnt ) {
88 delete this;
89 }
90 return cnt;
91 }
93 virtual IRegistry* registry() const {
94 return m_pRegistry;
95 }
97 virtual void setRegistry(IRegistry* pRegistry) {
98 m_pRegistry = pRegistry;
99 }
101 virtual const CLID& clID() const {
102 return m_clID;
103 }
105 virtual void setClID(const CLID& clid) {
106 m_clID = clid;
107 }
109 virtual long svcType() const {
110 return m_svcType;
111 }
113 virtual void setSvcType(long typ) {
114 m_svcType = typ;
115 }
117 virtual const std::string* par() const {
118 return m_par;
119 }
121 virtual const unsigned long* ipar() const {
122 return m_ipar;
123 }
124
126 virtual TObject* tObj() const {
127 return m_tObj;
128 }
129
130 };
131 }
132
133 #endif