2 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
5 /** @file DataLinkCnv_p2.icc
6 * @brief This file contains the implementation for the DataLinkCnv_p2 template methods.
7 * @author Marcin.Nowak@cern.ch
13 template <typename DLINK_TYPE>
15 void DataLinkCnv_p2<DLINK_TYPE>::transToPers (const DLink_t& trans,
17 MsgStream& /*log*/) const
19 DLink_t tmp = trans; // ??? May not be needed now.
20 pers.m_SGKeyHash = tmp.key();
23 template <typename DLINK_TYPE>
26 DataLinkCnv_p2<DLINK_TYPE>
27 ::transToPers(const DLink_t* trans, PersDLink_t* pers, MsgStream& log) const
29 this->transToPers(*trans, *pers, log);
34 template <typename DLINK_TYPE >
36 void DataLinkCnv_p2< DLINK_TYPE >::persToTrans (const PersDLink_t& pers,
38 MsgStream& /*log*/) const
40 if( pers.m_SGKeyHash ) {
41 trans.toIdentifiedObject( pers.m_SGKeyHash );
42 if( !trans.toTransient() ) {
43 throw std::runtime_error("DataLinkCnv_p2::persToTrans: failed to convert DataLink.");
49 template <typename DLINK_TYPE >
52 DataLinkCnv_p2< DLINK_TYPE >
53 ::persToTrans(const PersDLink_t* pers, DLink_t* trans, MsgStream& log) const
55 this->persToTrans(*pers, *trans, log);