ATLAS Offline Software
|
Helper for calling a TP converter from an Athena converter. More...
#include <TPCnvElt.h>
Public Types | |
typedef TPCNV::Trans_t | Trans_t |
Make available the persistent and transient types. More... | |
typedef TPCNV::Pers_t | Pers_t |
Public Member Functions | |
TPCnvElt () | |
Constructor. More... | |
std::unique_ptr< Trans_t > | createTransient (CNV &parent, const std::string &key, MsgStream &msg) |
Read the persistent object and convert it to transient. More... | |
bool | persToTrans (CNV &parent, Trans_t *trans, const std::string &key, MsgStream &msg) |
Read the persistent object and convert it to transient. More... | |
Private Attributes | |
Guid | m_guid |
GUID for the persistent class we read. More... | |
TPCNV | m_cnv |
The underlying TP converter. More... | |
Helper for calling a TP converter from an Athena converter.
This is used to allow calling one out of a templated list of TP converters. The methods here test if the current guid matches the guid for this converter, and calls it if so.
CNV is the top-level pool converter (that reads the persistent object). TPCNV is the TP converter class to be called. For the case where no conversion is to be done, use T_TPCnvNull<TRANS> for the TP converter class.
Definition at line 60 of file TPCnvElt.h.
typedef TPCNV::Pers_t AthenaPoolCnvSvc::TPCnvElt< CNV, TPCNV >::Pers_t |
Definition at line 65 of file TPCnvElt.h.
typedef TPCNV::Trans_t AthenaPoolCnvSvc::TPCnvElt< CNV, TPCNV >::Trans_t |
Make available the persistent and transient types.
Definition at line 64 of file TPCnvElt.h.
AthenaPoolCnvSvc::TPCnvElt< CNV, TPCNV >::TPCnvElt | ( | ) |
Constructor.
std::unique_ptr<Trans_t> AthenaPoolCnvSvc::TPCnvElt< CNV, TPCNV >::createTransient | ( | CNV & | parent, |
const std::string & | key, | ||
MsgStream & | msg | ||
) |
Read the persistent object and convert it to transient.
parent | The top-level pool converter object. |
key | The SG key of the object being read. |
msg | MsgStream for error reporting. |
Returns a newly-allocated object. If the type of the persistent object on the file does not match the type that this converter handles, return nullptr. Other errors are reported by raising exceptions.
bool AthenaPoolCnvSvc::TPCnvElt< CNV, TPCNV >::persToTrans | ( | CNV & | parent, |
Trans_t * | trans, | ||
const std::string & | key, | ||
MsgStream & | msg | ||
) |
Read the persistent object and convert it to transient.
parent | The top-level pool converter object. |
trans | The transient object to modify. |
key | The SG key of the object being read. |
msg | MsgStream for error reporting. |
Overwrites the provided transient object. If the type of the persistent object on the file does not match the type that this converter handles, returns false. Other errors are reported by raising exceptions.
|
private |
The underlying TP converter.
Definition at line 109 of file TPCnvElt.h.
|
private |
GUID for the persistent class we read.
Definition at line 106 of file TPCnvElt.h.