| The Gaudi Framework v28r2-patches (bc4ad17a)

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