ATLAS Offline Software
Loading...
Searching...
No Matches
IOVAddress.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef IOVSVC_IOVADDRESS_H
6#define IOVSVC_IOVADDRESS_H
7
8#include "GaudiKernel/IOpaqueAddress.h"
9#include "GaudiKernel/ClassID.h"
10
11class IOVAddress: public IOpaqueAddress {
12
13protected:
14
15 unsigned long m_refCount;
21 std::string m_par[2];
23 unsigned long m_ipar[2];
25 IRegistry* m_pRegistry;
26
28
29public:
30
31 // Dummy constructor
33 : m_refCount(0),
34 m_svcType(0),
35 m_clID(0),
37 {
38 m_ipar[0]=m_ipar[1]==0xFFFFFFFF;
39 }
40
41 // Copy constructor
43 : IOpaqueAddress(copy),
44 m_refCount(0),
45 m_svcType(copy.m_svcType),
46 m_clID(copy.m_clID),
48 m_range(copy.m_range)
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 IOVAddress(long svc,
58 const CLID& clid,
59 const std::string& p1,
60 const std::string& p2,
61 unsigned long ip1,
62 unsigned long ip2,
63 const IOVRange& range)
64 : m_refCount(0),
65 m_svcType(svc),
66 m_clID(clid),
67 m_pRegistry(0),
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 ~IOVAddress() {
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 }
92
93 virtual IRegistry* registry() const {
94 return m_pRegistry;
95 }
96
97 virtual void setRegistry(IRegistry* pRegistry) {
98 m_pRegistry = pRegistry;
99 }
100
101 virtual const CLID& clID() const {
102 return m_clID;
103 }
104
105 virtual void setClID(const CLID& clid) {
106 m_clID = clid;
107 }
108
109 virtual long svcType() const {
110 return m_svcType;
111 }
112
113 virtual void setSvcType(long typ) {
114 m_svcType = typ;
115 }
116
117 virtual const std::string* par() const {
118 return m_par;
119 }
120
121 virtual const unsigned long* ipar() const {
122 return m_ipar;
123 }
124
126 virtual IOVRange range() const {
127 return m_range;
128 }
129
130 virtual void setRange(IOVRange& range) {
131 m_range = range;
132 }
133
135 virtual const std::string& key() const {
136 return m_par[0];
137 }
138
140 virtual const std::string& tag() const {
141 return m_par[1];
142 }
143
144
145private:
147};
148
149#endif
uint32_t CLID
The Class ID type.
virtual void setRange(IOVRange &range)
Definition IOVAddress.h:130
CLID m_clID
Class id.
Definition IOVAddress.h:19
virtual void setSvcType(long typ)
Access : set the storage type of the class id.
Definition IOVAddress.h:113
IOVAddress(long svc, const CLID &clid, const std::string &p1, const std::string &p2, unsigned long ip1, unsigned long ip2, const IOVRange &range)
Standard Constructor.
Definition IOVAddress.h:57
virtual const std::string & tag() const
Retrieve dbtag.
Definition IOVAddress.h:140
virtual void setClID(const CLID &clid)
Access : Set class ID of the link.
Definition IOVAddress.h:105
virtual const std::string * par() const
Retrieve string parameters.
Definition IOVAddress.h:117
virtual void setRegistry(IRegistry *pRegistry)
Set pointer to directory.
Definition IOVAddress.h:97
virtual IOVRange range() const
Retrieve IOVRange.
Definition IOVAddress.h:126
std::string m_par[2]
String parameters to be accessed.
Definition IOVAddress.h:21
virtual ~IOVAddress()
Standard Destructor.
Definition IOVAddress.h:77
virtual const std::string & key() const
Retrieve dbKey.
Definition IOVAddress.h:135
virtual unsigned long release()
Definition IOVAddress.h:85
virtual unsigned long addRef()
Add reference to object.
Definition IOVAddress.h:81
virtual const CLID & clID() const
Access : Retrieve class ID of the link.
Definition IOVAddress.h:101
virtual IRegistry * registry() const
Pointer to directory.
Definition IOVAddress.h:93
IOVRange m_range
Definition IOVAddress.h:27
virtual long svcType() const
Access : retrieve the storage type of the class id.
Definition IOVAddress.h:109
virtual const unsigned long * ipar() const
Retrieve integer parameters.
Definition IOVAddress.h:121
long m_svcType
Storage type.
Definition IOVAddress.h:17
IRegistry * m_pRegistry
Pointer to corresponding directory.
Definition IOVAddress.h:25
IOVAddress & operator=(const IOVAddress &)
unsigned long m_ipar[2]
Integer parameters to be accessed.
Definition IOVAddress.h:23
unsigned long m_refCount
Definition IOVAddress.h:15
IOVAddress(const IOVAddress &copy)
Definition IOVAddress.h:42
Validity Range object.
Definition IOVRange.h:30