| The Gaudi Framework v27r1

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

- File List
- File Members

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() = default;
78
80 virtual unsigned long addRef () {
81 return ++m_refCount;
82 }
83
84 virtual unsigned long release () {
85 int cnt = --m_refCount;
86 if ( 0 == cnt ) delete this;
87 return cnt;
88 }
90 virtual IRegistry* registry() const {
91 return m_pRegistry;
92 }
94 virtual void setRegistry(IRegistry* pRegistry) {
95 m_pRegistry = pRegistry;
96 }
98 virtual const CLID& clID() const {
99 return m_clID;
100 }
102 virtual void setClID(const CLID& clid) {
103 m_clID = clid;
104 }
106 virtual long svcType() const {
107 return m_svcType;
108 }
110 virtual void setSvcType(long typ) {
111 m_svcType = typ;
112 }
114 virtual const std::string* par() const {
115 return m_par;
116 }
118 virtual const unsigned long* ipar() const {
119 return m_ipar;
120 }
121
123 virtual TObject* tObj() const {
124 return m_tObj;
125 }
126
127 };
128 }
129
130 #endif
RootHistCnv::RootObjAddress::m_pRegistry
IRegistry * m_pRegistry
Pointer to corresponding directory.
Definition: RootObjAddress.h:25
RootHistCnv::RootObjAddress::registry
virtual IRegistry * registry() const
Pointer to directory.
Definition: RootObjAddress.h:90
RootHistCnv::RootObjAddress::ipar
virtual const unsigned long * ipar() const
Retrieve integer parameters.
Definition: RootObjAddress.h:118
RootHistCnv::RootObjAddress::m_clID
CLID m_clID
Class id.
Definition: RootObjAddress.h:19
RootHistCnv::RootObjAddress::setClID
virtual void setClID(const CLID &clid)
Access : Set class ID of the link.
Definition: RootObjAddress.h:102
RootHistCnv::RootObjAddress
Definition: RootObjAddress.h:10
RootHistCnv::RootObjAddress::m_ipar
unsigned long m_ipar[2]
Integer parameters to be accessed.
Definition: RootObjAddress.h:23
RootHistCnv::RootObjAddress::par
virtual const std::string * par() const
Retrieve string parameters.
Definition: RootObjAddress.h:114
HiveAlgSequencer.p2
tuple p2
Definition: HiveAlgSequencer.py:23
RootHistCnv::RootObjAddress::m_par
std::string m_par[2]
String parameters to be accessed.
Definition: RootObjAddress.h:21
std::string
STL class.
RootHistCnv::RootObjAddress::RootObjAddress
RootObjAddress()
Dummy constructor.
Definition: RootObjAddress.h:32
RootHistCnv::RootObjAddress::setSvcType
virtual void setSvcType(long typ)
Access : set the storage type of the class id.
Definition: RootObjAddress.h:110
RootHistCnv::RootObjAddress::RootObjAddress
RootObjAddress(const RootObjAddress &copy)
Definition: RootObjAddress.h:42
RootHistCnv::RootObjAddress::addRef
virtual unsigned long addRef()
Add reference to object.
Definition: RootObjAddress.h:80
RootHistCnv::RootObjAddress::tObj
virtual TObject * tObj() const
Retrieve TObject* ptr.
Definition: RootObjAddress.h:123
RootHistCnv
Definition: DirectoryCnv.h:17
IRegistry
The IRegistry represents the entry door to the environment any data object residing in a transient da...
Definition: IRegistry.h:22
CLID
unsigned int CLID
Class ID definition.
Definition: ClassID.h:8
RootHistCnv::RootObjAddress::clID
virtual const CLID & clID() const
Access : Retrieve class ID of the link.
Definition: RootObjAddress.h:98
IOpaqueAddress.h
RootHistCnv::RootObjAddress::release
virtual unsigned long release()
release reference to object
Definition: RootObjAddress.h:84
RootHistCnv::RootObjAddress::setRegistry
virtual void setRegistry(IRegistry *pRegistry)
Set pointer to directory.
Definition: RootObjAddress.h:94
RootHistCnv::RootObjAddress::m_tObj
TObject * m_tObj
Pointer to TObject.
Definition: RootObjAddress.h:27
RootHistCnv::RootObjAddress::RootObjAddress
RootObjAddress(long svc, const CLID &clid, const std::string &p1="", const std::string &p2="", unsigned long ip1=0, unsigned long ip2=0, TObject *tObj=0)
Standard Constructor.
Definition: RootObjAddress.h:57
RootHistCnv::RootObjAddress::m_refCount
unsigned long m_refCount
Definition: RootObjAddress.h:15
RootHistCnv::RootObjAddress::m_svcType
long m_svcType
Storage type.
Definition: RootObjAddress.h:17
IOpaqueAddress
Opaque address interface definition.
Definition: IOpaqueAddress.h:23
RootHistCnv::RootObjAddress::~RootObjAddress
virtual ~RootObjAddress()=default
Standard Destructor.
HiveAlgSequencer.p1
tuple p1
Definition: HiveAlgSequencer.py:22
RootHistCnv::RootObjAddress::svcType
virtual long svcType() const
Access : retrieve the storage type of the class id.
Definition: RootObjAddress.h:106