ATLAS Offline Software
Database
APR
StorageSvc
StorageSvc
DbObjectSet.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
// $Id: DbObjectSet.h 458019 2011-09-09 10:11:57Z mnowak $
6
//====================================================================
7
// DbDomainObj object definition
8
//--------------------------------------------------------------------
9
//
10
// Package : StorageSvc (The POOL project)
11
//
12
// @author M.Frank
13
//====================================================================
14
#ifndef POOL_DBDOMAINOBJ_H
15
#define POOL_DBDOMAINOBJ_H 1
16
17
#include "
StorageSvc/pool.h
"
18
#include <set>
19
20
/*
21
* POOL namespace declaration
22
*/
23
namespace
pool
{
24
25
// POOL forward declarations
26
class
DbTypeInfo;
27
class
DbObjectSetBase;
28
29
class
DbObjectSetBase
{
30
protected
:
31
typedef
void (*
dtor_t
)(
void
*);
32
34
dtor_t
m_destructor
;
36
const
std::type_info&
m_type
;
38
std::set<void*>
m_objects
;
39
40
public
:
42
DbObjectSetBase
(
dtor_t
dtor,
const
std::type_info&
type
);
44
virtual
~DbObjectSetBase
();
46
void
printOut
();
48
void
removeObject
(
void
*
ptr
);
49
};
50
59
template
<
class
T>
class
DbObjectSet
:
public
DbObjectSetBase
{
60
private
:
61
static
void
__delete__
(
void
*
p
) {
62
T*
q
=(T*)
p
;
63
if
(
q
)
delete
q
;
64
}
65
66
public
:
68
DbObjectSet
();
70
DbObjectSet
(
dtor_t
);
72
virtual
~DbObjectSet
();
74
void
add
(T* pObj);
76
void
remove
(T* pObj);
77
};
78
79
81
template
<
class
T>
inline
82
DbObjectSet<T>::DbObjectSet
()
83
:
DbObjectSetBase
(__delete__, typeid(T)) { }
84
86
template
<
class
T>
inline
87
DbObjectSet<T>::DbObjectSet
(dtor_t
dt
)
88
:
DbObjectSetBase
(
dt
, typeid(T)) { }
89
91
template
<
class
T>
inline
DbObjectSet<T>::~DbObjectSet
() { }
92
94
template
<
class
T>
inline
void
DbObjectSet<T>::add
(T* pObj) {
95
m_objects.insert(pObj);
96
}
98
template
<
class
T>
inline
void
DbObjectSet<T>::remove
(T* pObj) {
99
removeObject(pObj);
100
}
101
}
// End namespace pool
102
#endif // POOL_DBDOMAINOBJ_H
pool::DbObjectSetBase::m_destructor
dtor_t m_destructor
Object destructor.
Definition:
DbObjectSet.h:34
pool
pool namespace
Definition:
libname.h:15
pool::DbObjectSetBase::removeObject
void removeObject(void *ptr)
Remove single object.
dbg::ptr
void * ptr(T *p)
Definition:
SGImplSvc.cxx:74
pool::DbObjectSet::remove
void remove(T *pObj)
Remove single object from set.
Definition:
DbObjectSet.h:98
pool::DbObjectSet::~DbObjectSet
virtual ~DbObjectSet()
Standard destructor.
Definition:
DbObjectSet.h:91
pool::DbObjectSet::add
void add(T *pObj)
Add object to set.
Definition:
DbObjectSet.h:94
pool::DbObjectSetBase::m_type
const std::type_info & m_type
Object type.
Definition:
DbObjectSet.h:36
pool::DbObjectSetBase::dtor_t
void(* dtor_t)(void *)
Definition:
DbObjectSet.h:31
python.utils.AtlRunQueryDQUtils.p
p
Definition:
AtlRunQueryDQUtils.py:210
CaloNoise_fillDB.dt
dt
Definition:
CaloNoise_fillDB.py:58
pool::DbObjectSetBase::DbObjectSetBase
DbObjectSetBase(dtor_t dtor, const std::type_info &type)
Constructor.
pool.h
pool::DbObjectSet
Definition:
DbObjectSet.h:59
pool::DbObjectSetBase::printOut
void printOut()
Printout.
pool::DbObjectSetBase::~DbObjectSetBase
virtual ~DbObjectSetBase()
Standard destructor.
pool::DbObjectSet::__delete__
static void __delete__(void *p)
Definition:
DbObjectSet.h:61
python.CaloScaleNoiseConfig.type
type
Definition:
CaloScaleNoiseConfig.py:78
pool::DbObjectSetBase
Definition:
DbObjectSet.h:29
pool::DbObjectSet::DbObjectSet
DbObjectSet()
Constructor.
Definition:
DbObjectSet.h:82
extractSporadic.q
list q
Definition:
extractSporadic.py:98
pool::DbObjectSetBase::m_objects
std::set< void * > m_objects
Set of objects.
Definition:
DbObjectSet.h:38
Generated on Sat Jan 4 2025 21:09:16 for ATLAS Offline Software by
1.8.18