| The Gaudi Framework v30r0 (c919700c)

- 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
11 class RootObjAddress : public IOpaqueAddress
12 {
13
14 protected:
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:
31 RootObjAddress() : m_refCount( 0 ), m_svcType( 0 ), m_clID( 0 ), m_pRegistry( 0 ), m_tObj( 0 )
32 {
33 m_ipar[0] = m_ipar[1] = 0xFFFFFFFF;
34 }
35
36 RootObjAddress( const RootObjAddress& copy )
37 : IOpaqueAddress( copy )
38 , m_refCount( 0 )
39 , m_svcType( copy.m_svcType )
40 , m_clID( copy.m_clID )
41 , m_pRegistry( copy.m_pRegistry )
42 , m_tObj( copy.m_tObj )
43 {
44 m_par[0] = copy.m_par[0];
45 m_par[1] = copy.m_par[1];
46 m_ipar[0] = copy.m_ipar[0];
47 m_ipar[1] = copy.m_ipar[1];
48 }
49
51 RootObjAddress( long svc, const CLID& clid, const std::string& p1 = "", const std::string& p2 = "",
52 unsigned long ip1 = 0, unsigned long ip2 = 0, TObject* tObj = 0 )
53 : m_refCount( 0 ), m_svcType( svc ), m_clID( clid ), m_pRegistry( 0 ), m_tObj( tObj )
54 {
55 m_par[0] = p1;
56 m_par[1] = p2;
57 m_ipar[0] = ip1;
58 m_ipar[1] = ip2;
59 }
60
62 ~RootObjAddress() override = default;
63
65 unsigned long addRef() override { return ++m_refCount; }
66
67 unsigned long release() override
68 {
69 int cnt = --m_refCount;
70 if ( 0 == cnt ) delete this;
71 return cnt;
72 }
74 IRegistry* registry() const override { return m_pRegistry; }
76 void setRegistry( IRegistry* pRegistry ) override { m_pRegistry = pRegistry; }
78 const CLID& clID() const override { return m_clID; }
80 virtual void setClID( const CLID& clid ) { m_clID = clid; }
82 long svcType() const override { return m_svcType; }
84 virtual void setSvcType( long typ ) { m_svcType = typ; }
86 const std::string* par() const override { return m_par; }
88 const unsigned long* ipar() const override { return m_ipar; }
89
91 virtual TObject* tObj() const { return m_tObj; }
92 };
93 }
94
95 #endif
RootHistCnv::RootObjAddress::ipar
const unsigned long * ipar() const override
Retrieve integer parameters.
Definition: RootObjAddress.h:88
RootHistCnv::RootObjAddress::release
unsigned long release() override
release reference to object
Definition: RootObjAddress.h:67
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:80
RootHistCnv::RootObjAddress
Definition: RootObjAddress.h:11
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:76
std::string
STL class.
RootHistCnv::RootObjAddress::svcType
long svcType() const override
Access : retrieve the storage type of the class id.
Definition: RootObjAddress.h:82
RootHistCnv::RootObjAddress::par
const std::string * par() const override
Retrieve string parameters.
Definition: RootObjAddress.h:86
RootHistCnv::RootObjAddress::RootObjAddress
RootObjAddress()
Dummy constructor.
Definition: RootObjAddress.h:31
RootHistCnv::RootObjAddress::setSvcType
virtual void setSvcType(long typ)
Access : set the storage type of the class id.
Definition: RootObjAddress.h:84
RootHistCnv::RootObjAddress::registry
IRegistry * registry() const override
Pointer to directory.
Definition: RootObjAddress.h:74
RootHistCnv::RootObjAddress::RootObjAddress
RootObjAddress(const RootObjAddress &copy)
Definition: RootObjAddress.h:36
RootHistCnv::RootObjAddress::tObj
virtual TObject * tObj() const
Retrieve TObject* ptr.
Definition: RootObjAddress.h:91
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:78
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:51
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:65
IOpaqueAddress
Opaque address interface definition.
Definition: IOpaqueAddress.h:23