ATLAS Offline Software
Classes | Public Types | Public Member Functions | Private Attributes | List of all members
AthenaPoolCnvSvc::TPCnvList< CNV, TRANS, TPCNVS > Class Template Reference

Helper for calling TP converters from an Athena converter. More...

#include <TPCnvList.h>

Collaboration diagram for AthenaPoolCnvSvc::TPCnvList< CNV, TRANS, TPCNVS >:

Classes

struct  do_create_transient
 Functional to iterate over TP converters and call createTransient on each. More...
 
struct  do_pers_to_trans
 Functional to iterate over TP converters and call persToTrans on each. More...
 
struct  wrap_tpcnv
 Metafunction to wrap a TP converter in TPCnvElt. More...
 

Public Types

typedef boost::mpl::vector< TPCNVS... > vec_t
 
typedef boost::mpl::transform< vec_t, wrap_tpcnv< boost::mpl::_1 > >::type list_mpl_t
 
typedef boost::fusion::result_of::as_vector< list_mpl_t >::type list_t
 

Public Member Functions

std::unique_ptr< TRANS > createTransient (CNV &parent, const std::string &key, MsgStream &msg)
 Read the persistent object and convert it to transient. More...
 
bool persToTrans (CNV &parent, TRANS *trans, const std::string &key, MsgStream &msg)
 Read the persistent object and convert it to transient. More...
 

Private Attributes

list_t m_list
 List of TP converter instances, wrapped by TPCnvElt. More...
 

Detailed Description

template<class CNV, class TRANS, class ... TPCNVS>
class AthenaPoolCnvSvc::TPCnvList< CNV, TRANS, TPCNVS >

Helper for calling TP converters from an Athena converter.

Definition at line 36 of file TPCnvList.h.

Member Typedef Documentation

◆ list_mpl_t

template<class CNV , class TRANS , class ... TPCNVS>
typedef boost::mpl::transform<vec_t, wrap_tpcnv<boost::mpl::_1> >::type AthenaPoolCnvSvc::TPCnvList< CNV, TRANS, TPCNVS >::list_mpl_t

Definition at line 89 of file TPCnvList.h.

◆ list_t

template<class CNV , class TRANS , class ... TPCNVS>
typedef boost::fusion::result_of::as_vector<list_mpl_t>::type AthenaPoolCnvSvc::TPCnvList< CNV, TRANS, TPCNVS >::list_t

Definition at line 90 of file TPCnvList.h.

◆ vec_t

template<class CNV , class TRANS , class ... TPCNVS>
typedef boost::mpl::vector<TPCNVS...> AthenaPoolCnvSvc::TPCnvList< CNV, TRANS, TPCNVS >::vec_t

Definition at line 88 of file TPCnvList.h.

Member Function Documentation

◆ createTransient()

template<class CNV , class TRANS , class ... TPCNVS>
std::unique_ptr<TRANS> AthenaPoolCnvSvc::TPCnvList< CNV, TRANS, TPCNVS >::createTransient ( CNV &  parent,
const std::string &  key,
MsgStream &  msg 
)

Read the persistent object and convert it to transient.

Parameters
parentThe top-level pool converter object.
keyThe SG key of the object being read.
msgMsgStream for error reporting.

Returns a newly-allocated object. If the type of the persistent object on the file does not match the the type of any of our TP converters, return nullptr. Other errors are reported by raising exceptions.

◆ persToTrans()

template<class CNV , class TRANS , class ... TPCNVS>
bool AthenaPoolCnvSvc::TPCnvList< CNV, TRANS, TPCNVS >::persToTrans ( CNV &  parent,
TRANS *  trans,
const std::string &  key,
MsgStream &  msg 
)

Read the persistent object and convert it to transient.

Parameters
parentThe top-level pool converter object.
transThe transient object to modify.
keyThe SG key of the object being read.
msgMsgStream for error reporting.

Overwrites the provided transient object. If the type of the persistent object on the file does not match the the type of any of our TP converters, return false. Other errors are reported by raising exceptions.

Member Data Documentation

◆ m_list

template<class CNV , class TRANS , class ... TPCNVS>
list_t AthenaPoolCnvSvc::TPCnvList< CNV, TRANS, TPCNVS >::m_list
private

List of TP converter instances, wrapped by TPCnvElt.

Definition at line 127 of file TPCnvList.h.


The documentation for this class was generated from the following file: