ATLAS Offline Software
Loading...
Searching...
No Matches
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
22#include <typeinfo>
23#include <memory>
24class MsgStream;
25
26
30template <class TRANS> class T_TPCnvNull
31{
32};
33
34
35namespace AthenaPoolCnvSvc {
36
37
44Guid guidFromTypeinfo (const std::type_info& ti);
45
46
59template <class CNV, class TPCNV>
61{
62public:
64 typedef typename TPCNV::Trans_t Trans_t;
65 typedef typename TPCNV::Pers_t Pers_t;
66
67
72
73
85 std::unique_ptr<Trans_t>
86 createTransient (CNV& parent, const std::string& key, MsgStream& msg);
87
88
101 bool persToTrans (CNV& parent, Trans_t* trans, const std::string& key, MsgStream& msg);
102
103
104private:
107
109 TPCNV m_cnv;
110};
111
112
117template <class CNV, class TRANS>
118class TPCnvElt<CNV, T_TPCnvNull<TRANS> >
119{
120public:
122 typedef TRANS Trans_t;
123 typedef TRANS Pers_t;
124
125
130
131
143 std::unique_ptr<Trans_t>
144 createTransient (CNV& parent, const std::string& key, MsgStream& msg);
145
146
159 bool persToTrans (CNV& parent, Trans_t* trans, const std::string& key, MsgStream& msg);
160
161
162private:
165};
166
167
168} // namespace AthenaPoolCnvSvc
169
170
172
173
174#endif // not ATHENAPOOLCNVSVC_TPCNVELT_H
This file contains the class definition for the Guid class (migrated from POOL).
Helpers for calling TP converters.
bool persToTrans(CNV &parent, Trans_t *trans, const std::string &key, MsgStream &msg)
Read the persistent object and convert it to transient.
std::unique_ptr< Trans_t > createTransient(CNV &parent, const std::string &key, MsgStream &msg)
Read the persistent object and convert it to transient.
TRANS Trans_t
Make available the persistent and transient types.
Definition TPCnvElt.h:122
Guid m_guid
GUID for the persistent class we read.
Definition TPCnvElt.h:164
Guid m_guid
GUID for the persistent class we read.
Definition TPCnvElt.h:106
TPCNV m_cnv
The underlying TP converter.
Definition TPCnvElt.h:109
TPCNV::Trans_t Trans_t
Make available the persistent and transient types.
Definition TPCnvElt.h:64
bool persToTrans(CNV &parent, Trans_t *trans, const std::string &key, MsgStream &msg)
Read the persistent object and convert it to transient.
std::unique_ptr< Trans_t > createTransient(CNV &parent, const std::string &key, MsgStream &msg)
Read the persistent object and convert it to transient.
This class provides a encapsulation of a GUID/UUID/CLSID/IID data structure (128 bit number).
Definition Guid.h:25
Placeholder for the case where no conversion is to be done.
Definition TPCnvElt.h:31
Guid guidFromTypeinfo(const std::type_info &ti)
Given a type_info, get the corresponding pool guid.
Definition TPCnvElt.cxx:30
MsgStream & msg
Definition testRead.cxx:32