The Gaudi Framework
master (9f3f8895)
Toggle main menu visibility
Loading...
Searching...
No Matches
RootObjAddress.h
Go to the documentation of this file.
1
/***********************************************************************************\
2
* (c) Copyright 1998-2025 CERN for the benefit of the LHCb and ATLAS collaborations *
3
* *
4
* This software is distributed under the terms of the Apache version 2 licence, *
5
* copied verbatim in the file "LICENSE". *
6
* *
7
* In applying this licence, CERN does not waive the privileges and immunities *
8
* granted to it by virtue of its status as an Intergovernmental Organization *
9
* or submit itself to any jurisdiction. *
10
\***********************************************************************************/
11
#pragma once
12
13
#include <
GaudiKernel/IOpaqueAddress.h
>
14
#include <string_view>
15
16
class
TObject;
17
18
namespace
RootHistCnv
{
19
20
class
RootObjAddress
:
public
IOpaqueAddress
{
21
22
protected
:
23
unsigned
long
m_refCount
= 0;
25
long
m_svcType
= 0;
27
CLID
m_clID
= 0;
29
std::string
m_par
[2];
31
unsigned
long
m_ipar
[2] = { 0xFFFFFFFF, 0xFFFFFFFF };
33
IRegistry
*
m_pRegistry
=
nullptr
;
35
TObject*
m_tObj
=
nullptr
;
36
37
public
:
39
RootObjAddress
() =
default
;
40
41
RootObjAddress
(
const
RootObjAddress
& copy )
42
:
IOpaqueAddress
( copy )
43
,
m_refCount
( 0 )
44
,
m_svcType
( copy.
m_svcType
)
45
,
m_clID
( copy.
m_clID
)
46
,
m_pRegistry
( copy.
m_pRegistry
)
47
,
m_tObj
( copy.
m_tObj
) {
48
m_par
[0] = copy.
m_par
[0];
49
m_par
[1] = copy.
m_par
[1];
50
m_ipar
[0] = copy.
m_ipar
[0];
51
m_ipar
[1] = copy.
m_ipar
[1];
52
}
53
55
RootObjAddress
(
long
svc,
const
CLID
& clid, std::string_view p1 = {}, std::string_view p2 = {},
56
unsigned
long
ip1 = 0,
unsigned
long
ip2 = 0, TObject*
tObj
= nullptr )
57
:
m_svcType
( svc ),
m_clID
( clid ),
m_tObj
(
tObj
) {
58
m_par
[0] = std::string{ p1 };
59
m_par
[1] = std::string{
p2
};
60
m_ipar
[0] = ip1;
61
m_ipar
[1] = ip2;
62
}
63
65
unsigned
long
addRef
()
override
{
return
++
m_refCount
; }
66
67
unsigned
long
release
()
override
{
68
unsigned
long
cnt = --
m_refCount
;
69
if
( 0 == cnt )
delete
this
;
70
return
cnt;
71
}
72
73
IRegistry
*
registry
()
const override
{
return
m_pRegistry
; }
75
void
setRegistry
(
IRegistry
* pRegistry )
override
{
m_pRegistry
= pRegistry; }
77
const
CLID
&
clID
()
const override
{
return
m_clID
; }
79
virtual
void
setClID
(
const
CLID
& clid ) {
m_clID
= clid; }
81
long
svcType
()
const override
{
return
m_svcType
; }
83
virtual
void
setSvcType
(
long
typ ) {
m_svcType
= typ; }
85
const
std::string*
par
()
const override
{
return
m_par
; }
87
const
unsigned
long
*
ipar
()
const override
{
return
m_ipar
; }
88
90
virtual
TObject*
tObj
()
const
{
return
m_tObj
; }
91
};
92
}
// namespace RootHistCnv
CLID
unsigned int CLID
Class ID definition.
Definition
ClassID.h:16
IOpaqueAddress.h
IOpaqueAddress
Opaque address interface definition.
Definition
IOpaqueAddress.h:28
IRegistry
The IRegistry represents the entry door to the environment any data object residing in a transient da...
Definition
IRegistry.h:29
RootHistCnv::RootObjAddress::ipar
const unsigned long * ipar() const override
Retrieve integer parameters.
Definition
RootObjAddress.h:87
RootHistCnv::RootObjAddress::setSvcType
virtual void setSvcType(long typ)
Access : set the storage type of the class id.
Definition
RootObjAddress.h:83
RootHistCnv::RootObjAddress::RootObjAddress
RootObjAddress()=default
Dummy constructor.
RootHistCnv::RootObjAddress::par
const std::string * par() const override
Retrieve string parameters.
Definition
RootObjAddress.h:85
RootHistCnv::RootObjAddress::m_refCount
unsigned long m_refCount
Definition
RootObjAddress.h:23
RootHistCnv::RootObjAddress::m_pRegistry
IRegistry * m_pRegistry
Pointer to corresponding directory.
Definition
RootObjAddress.h:33
RootHistCnv::RootObjAddress::RootObjAddress
RootObjAddress(long svc, const CLID &clid, std::string_view p1={}, std::string_view p2={}, unsigned long ip1=0, unsigned long ip2=0, TObject *tObj=nullptr)
Standard Constructor.
Definition
RootObjAddress.h:55
RootHistCnv::RootObjAddress::svcType
long svcType() const override
Access : retrieve the storage type of the class id.
Definition
RootObjAddress.h:81
RootHistCnv::RootObjAddress::clID
const CLID & clID() const override
Access : Retrieve class ID of the link.
Definition
RootObjAddress.h:77
RootHistCnv::RootObjAddress::addRef
unsigned long addRef() override
Add reference to object.
Definition
RootObjAddress.h:65
RootHistCnv::RootObjAddress::m_tObj
TObject * m_tObj
Pointer to TObject.
Definition
RootObjAddress.h:35
RootHistCnv::RootObjAddress::setClID
virtual void setClID(const CLID &clid)
Access : Set class ID of the link.
Definition
RootObjAddress.h:79
RootHistCnv::RootObjAddress::m_par
std::string m_par[2]
String parameters to be accessed.
Definition
RootObjAddress.h:29
RootHistCnv::RootObjAddress::setRegistry
void setRegistry(IRegistry *pRegistry) override
Set pointer to directory.
Definition
RootObjAddress.h:75
RootHistCnv::RootObjAddress::release
unsigned long release() override
release reference to object
Definition
RootObjAddress.h:67
RootHistCnv::RootObjAddress::registry
IRegistry * registry() const override
Pointer to directory.
Definition
RootObjAddress.h:73
RootHistCnv::RootObjAddress::m_clID
CLID m_clID
Class id.
Definition
RootObjAddress.h:27
RootHistCnv::RootObjAddress::m_ipar
unsigned long m_ipar[2]
Integer parameters to be accessed.
Definition
RootObjAddress.h:31
RootHistCnv::RootObjAddress::m_svcType
long m_svcType
Storage type.
Definition
RootObjAddress.h:25
RootHistCnv::RootObjAddress::RootObjAddress
RootObjAddress(const RootObjAddress ©)
Definition
RootObjAddress.h:41
RootHistCnv::RootObjAddress::tObj
virtual TObject * tObj() const
Retrieve TObject* ptr.
Definition
RootObjAddress.h:90
AlgSequencer.p2
p2
Definition
AlgSequencer.py:30
RootHistCnv
Definition
DirectoryCnv.h:26
RootHistCnv
src
RootObjAddress.h
Generated on
for The Gaudi Framework by
1.17.0