ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthContainers
AthContainers
tools
DVLDataBucket.h
Go to the documentation of this file.
1
// This file's extension implies that it's C, but it's really -*- C++ -*-.
2
/*
3
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
4
*/
11
12
13
#ifndef ATHCONTAINERS_TOOLS_DVLDATABUCKET_H
14
#define ATHCONTAINERS_TOOLS_DVLDATABUCKET_H
15
16
#include "
AthContainers/ViewVector.h
"
17
#include "
AthenaKernel/DataBucket.h
"
18
#include "
AthContainers/tools/DVLInfo.h
"
19
#include <memory>
20
21
22
23
namespace
SG
{
24
25
46
template
<
class
T>
47
class
DVLDataBucket
48
:
public
SG::DataBucket
<T>
49
{
50
public
:
54
DVLDataBucket
() :
55
m_ti
(nullptr),
56
m_clid
(CLID_NULL)
57
{}
58
59
64
DVLDataBucket
(T* data);
65
66
71
template
<
class
U>
72
DVLDataBucket
(std::unique_ptr<U> data);
73
74
79
DVLDataBucket
(
const
DVLDataBucket
& other);
80
81
85
virtual
~DVLDataBucket
()
override
;
86
87
96
virtual
void
*
cast
(
CLID
clid,
IRegisterTransient
* irt = 0,
97
bool
isConst =
true
)
override
;
98
99
108
virtual
void
*
cast
(
const
std::type_info&
tinfo
,
109
IRegisterTransient
* irt = 0,
110
bool
isConst =
true
)
override
;
111
112
125
virtual
void
*
cast
(
CLID
clid,
126
const
std::type_info&
tinfo
,
127
SG::IRegisterTransient
* irt = 0,
128
bool
isConst =
true
)
override
;
129
130
137
virtual
const
CLID
&
clID
()
const override
;
138
139
146
virtual
const
std::type_info&
tinfo
()
const override
;
147
148
149
private
:
150
typedef
std::pair<DataModel_detail::DVLInfoBase*, void*>
ent_t
;
151
typedef
std::vector<ent_t>
vec_t
;
152
vec_t
m_copies
;
153
157
const
std::type_info*
m_ti
;
158
162
CLID
m_clid
;
163
164
// Avoid coverity warning.
165
DVLDataBucket
&
operator=
(
const
DVLDataBucket
&);
166
};
167
168
169
}
// namespace SG
170
171
172
#include "
AthContainers/tools/DVLDataBucket.icc
"
173
174
175
#endif
// not ATHCONTAINERS_TOOLS_DVLDATABUCKET_H
DVLDataBucket.icc
DVLInfo.h
Holder to implement conversion copies for DataVector/DataList.
DataBucket.h
CLID
uint32_t CLID
The Class ID type.
Definition
Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
ViewVector.h
Identify view containers to be made persistent.
SG::DVLDataBucket< U >::m_clid
CLID m_clid
Definition
DVLDataBucket.h:162
SG::DVLDataBucket::DVLDataBucket
DVLDataBucket(T *data)
Constructor from a payload object.
SG::DVLDataBucket::operator=
DVLDataBucket & operator=(const DVLDataBucket &)
SG::DVLDataBucket::cast
virtual void * cast(CLID clid, IRegisterTransient *irt=0, bool isConst=true) override
Return the contents of the DataBucket, converted to type given by clid.
SG::DVLDataBucket::~DVLDataBucket
virtual ~DVLDataBucket() override
Destructor.
SG::DVLDataBucket::clID
virtual const CLID & clID() const override
The CLID for the class of object we're holding.
SG::DVLDataBucket< U >::tinfo
virtual const std::type_info & tinfo() const override
SG::DVLDataBucket::cast
virtual void * cast(CLID clid, const std::type_info &tinfo, SG::IRegisterTransient *irt=0, bool isConst=true) override
Return the contents of the DataBucket, converted to type given by clid.
SG::DVLDataBucket::DVLDataBucket
DVLDataBucket()
Default constructor.
Definition
DVLDataBucket.h:54
SG::DVLDataBucket::DVLDataBucket
DVLDataBucket(std::unique_ptr< U > data)
Constructor from a payload object.
SG::DVLDataBucket< U >::m_copies
vec_t m_copies
Definition
DVLDataBucket.h:152
SG::DVLDataBucket< U >::ent_t
std::pair< DataModel_detail::DVLInfoBase *, void * > ent_t
Definition
DVLDataBucket.h:150
SG::DVLDataBucket::DVLDataBucket
DVLDataBucket(const DVLDataBucket &other)
Copy constructor.
SG::DVLDataBucket< U >::m_ti
const std::type_info * m_ti
Definition
DVLDataBucket.h:157
SG::DVLDataBucket::cast
virtual void * cast(const std::type_info &tinfo, IRegisterTransient *irt=0, bool isConst=true) override
Return the contents of the DataBucket, converted to type given by std::type_info.
SG::DVLDataBucket< U >::vec_t
std::vector< ent_t > vec_t
Definition
DVLDataBucket.h:151
SG::DataBucket
Definition
DataBucket.h:29
SG::IRegisterTransient
Interface for registering a transient object in t2p map.
Definition
IRegisterTransient.h:28
SG
Forward declaration.
Definition
CaloCellPacker_400_500.h:32
Generated on
for ATLAS Offline Software by
1.17.0