ATLAS Offline Software
Loading...
Searching...
No Matches
VectorElementLinkCnv_p1.icc
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
5/** @file VectorElementLinkCnv_p1.icc
6 * @brief This file contains the implementation for the VectorElementLinkCnv_p1 template methods.
7 * @author Marcin.Nowak@cern.ch
8 **/
9
10
11#include "AthenaKernel/getThinningCache.h"
12
13
14template <typename LINK_VECT>
15void VectorElementLinkCnv_p1<LINK_VECT>::transToPers(const LinkVect_t& trans,
16 PersLinkVect_t& pers,
17 const SG::ThinningCache* cache,
18 MsgStream& msg) const
19{
20 size_t link_n = trans.size();
21 pers.resize( link_n );
22
23 typename LinkVect_t::const_iterator ti = trans.begin();
24 typename PersLinkVect_t::iterator pi = pers.begin();
25 while( link_n-- ) {
26 m_elLinkCnv.transToPers( *ti++, *pi++, cache, msg );
27 }
28 return;
29}
30
31
32template <typename LINK_VECT>
33void VectorElementLinkCnv_p1<LINK_VECT>::transToPers(const LinkVect_t& trans,
34 PersLinkVect_t& pers,
35 MsgStream& msg) const
36{
37 transToPers (trans, pers,
38 SG::getThinningCache(),
39 msg);
40}
41
42
43template <typename LINK_VECT >
44void
45VectorElementLinkCnv_p1< LINK_VECT >::persToTrans(const PersLinkVect_t& pers,
46 LinkVect_t& trans,
47 MsgStream& msg) const
48{
49 size_t link_n = pers.size();
50 trans.resize( link_n );
51 typename PersLinkVect_t::const_iterator pi = pers.begin();
52 typename LinkVect_t::iterator ti = trans.begin();
53 while( link_n-- ) {
54 m_elLinkCnv.persToTrans( *pi++, *ti++, msg );
55 }
56}
57
58
59template <typename LINK_VECT>
60inline
61void
62VectorElementLinkCnv_p1<LINK_VECT>
63::transToPers(const LinkVect_t* trans, PersLinkVect_t* pers, MsgStream& msg) const
64{
65 this->transToPers(*trans, *pers, msg);
66}
67
68
69template <typename LINK_VECT >
70inline
71void
72VectorElementLinkCnv_p1< LINK_VECT >
73::persToTrans(const PersLinkVect_t* pers, LinkVect_t* trans, MsgStream& msg) const
74{
75 this->persToTrans(*pers, *trans, msg);
76}