ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Database
AthenaPOOL
AthenaPoolCnvSvc
AthenaPoolCnvSvc
TPCnvElt.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
/*
4
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
5
*/
6
7
// $Id$
14
15
16
#ifndef ATHENAPOOLCNVSVC_TPCNVELT_H
17
#define ATHENAPOOLCNVSVC_TPCNVELT_H
18
19
20
#include "
AthenaPoolCnvSvc/T_AthenaPoolCreateFuncs.h
"
21
#include "
PersistentDataModel/Token.h
"
22
#include <typeinfo>
23
#include <memory>
24
25
class
MsgStream;
26
27
31
template
<
class
TRANS>
class
T_TPCnvNull
32
{
33
};
34
35
36
namespace
AthenaPoolCnvSvc
{
37
38
45
Guid
guidFromTypeinfo
(
const
std::type_info& ti);
46
47
60
template
<
class
CNV,
class
TPCNV>
61
class
TPCnvElt
62
{
63
public
:
65
typedef
typename
TPCNV::Trans_t
Trans_t
;
66
typedef
typename
TPCNV::Pers_t
Pers_t
;
67
68
72
TPCnvElt
();
73
74
86
std::unique_ptr<Trans_t>
87
createTransient
(CNV& parent,
const
Token
* token,
const
std::string& key, MsgStream&
msg
);
88
89
102
bool
persToTrans
(CNV& parent,
Trans_t
* trans,
const
Token
* token,
const
std::string& key, MsgStream&
msg
);
103
104
105
private
:
107
Guid
m_guid
;
108
110
TPCNV
m_cnv
;
111
};
112
113
118
template
<
class
CNV,
class
TRANS>
119
class
TPCnvElt
<CNV,
T_TPCnvNull
<TRANS> >
120
{
121
public
:
123
typedef
TRANS
Trans_t
;
124
typedef
TRANS
Pers_t
;
125
126
130
TPCnvElt
();
131
132
144
std::unique_ptr<Trans_t>
145
createTransient
(CNV& parent,
const
Token
* token,
const
std::string& key, MsgStream&
msg
);
146
147
160
bool
persToTrans
(CNV& parent,
Trans_t
* trans,
const
Token
* token,
const
std::string& key, MsgStream&
msg
);
161
162
163
private
:
165
Guid
m_guid
;
166
};
167
168
169
}
// namespace AthenaPoolCnvSvc
170
171
172
#include "
AthenaPoolCnvSvc/TPCnvElt.icc
"
173
174
175
#endif
// not ATHENAPOOLCNVSVC_TPCNVELT_H
TPCnvElt.icc
T_AthenaPoolCreateFuncs.h
Helpers for calling TP converters.
Token.h
This file contains the class definition for the Token class (migrated from POOL).
AthenaPoolCnvSvc::TPCnvElt< CNV, T_TPCnvNull< TRANS > >::Pers_t
TRANS Pers_t
Definition
TPCnvElt.h:124
AthenaPoolCnvSvc::TPCnvElt< CNV, T_TPCnvNull< TRANS > >::persToTrans
bool persToTrans(CNV &parent, Trans_t *trans, const Token *token, const std::string &key, MsgStream &msg)
Read the persistent object and convert it to transient.
AthenaPoolCnvSvc::TPCnvElt< CNV, T_TPCnvNull< TRANS > >::Trans_t
TRANS Trans_t
Make available the persistent and transient types.
Definition
TPCnvElt.h:123
AthenaPoolCnvSvc::TPCnvElt< CNV, T_TPCnvNull< TRANS > >::m_guid
Guid m_guid
GUID for the persistent class we read.
Definition
TPCnvElt.h:165
AthenaPoolCnvSvc::TPCnvElt< CNV, T_TPCnvNull< TRANS > >::TPCnvElt
TPCnvElt()
Constructor.
AthenaPoolCnvSvc::TPCnvElt< CNV, T_TPCnvNull< TRANS > >::createTransient
std::unique_ptr< Trans_t > createTransient(CNV &parent, const Token *token, const std::string &key, MsgStream &msg)
Read the persistent object and convert it to transient.
AthenaPoolCnvSvc::TPCnvElt::m_guid
Guid m_guid
GUID for the persistent class we read.
Definition
TPCnvElt.h:107
AthenaPoolCnvSvc::TPCnvElt::m_cnv
TPCNV m_cnv
The underlying TP converter.
Definition
TPCnvElt.h:110
AthenaPoolCnvSvc::TPCnvElt::createTransient
std::unique_ptr< Trans_t > createTransient(CNV &parent, const Token *token, const std::string &key, MsgStream &msg)
Read the persistent object and convert it to transient.
AthenaPoolCnvSvc::TPCnvElt::Trans_t
TPCNV::Trans_t Trans_t
Make available the persistent and transient types.
Definition
TPCnvElt.h:65
AthenaPoolCnvSvc::TPCnvElt::TPCnvElt
TPCnvElt()
Constructor.
AthenaPoolCnvSvc::TPCnvElt::persToTrans
bool persToTrans(CNV &parent, Trans_t *trans, const Token *token, const std::string &key, MsgStream &msg)
Read the persistent object and convert it to transient.
AthenaPoolCnvSvc::TPCnvElt::Pers_t
TPCNV::Pers_t Pers_t
Definition
TPCnvElt.h:66
Guid
This class provides a encapsulation of a GUID/UUID/CLSID/IID data structure (128 bit number).
Definition
Guid.h:25
T_TPCnvNull
Placeholder for the case where no conversion is to be done.
Definition
TPCnvElt.h:32
Token
This class provides a token that identifies in a unique way objects on the persistent storage.
Definition
Token.h:22
AthenaPoolCnvSvc
Definition
Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/debug.h:26
AthenaPoolCnvSvc::guidFromTypeinfo
Guid guidFromTypeinfo(const std::type_info &ti)
Given a type_info, get the corresponding pool guid.
Definition
TPCnvElt.cxx:30
msg
MsgStream & msg
Definition
testRead.cxx:32
Generated on
for ATLAS Offline Software by
1.17.0