ATLAS Offline Software
CLinksAODCnv_p1.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3  */
12 #include "CLinksAODCnv_p1.h"
13 
14 
15 namespace DMTest {
16 
17 
19  CLinksAOD* transObj,
20  MsgStream &log) const
21 {
22  std::vector<ElementLink<CVec> > vel;
23  vel.resize (persObj->m_vel.size());
24  size_t i = 0;
25  for (const ElementLinkInt_p3& el_p : persObj->m_vel) {
26  m_velCnv.persToTrans (el_p, vel[i], log);
27  ++i;
28  }
29  transObj->setVel (std::move (vel));
30 
31  m_elvCnv.persToTrans (persObj->m_elv, transObj->elv(), log);
32 }
33 
34 
36  CLinksAOD_p1* persObj,
37  MsgStream &log) const
38 {
39  persObj->m_vel.resize (transObj->vel().size());
40  size_t i = 0;
41  for (const ElementLink<CVec>& el : transObj->vel()) {
42  m_velCnv.transToPers (el, persObj->m_vel[i], log);
43  ++i;
44  }
45 
46  m_elvCnv.transToPers (transObj->elv(), persObj->m_elv, log);
47 }
48 
49 
50 } // namespace DMTest
DMTest::CLinksAOD_p1::m_elv
ElementLinkIntVector_p1 m_elv
Definition: CLinksAOD_p1.h:32
CLinksAODCnv_p1.h
DMTest::CLinksAOD_p1
Persistent class for AOD CLinks container.
Definition: CLinksAOD_p1.h:29
DMTest::CLinksAOD::setVel
void setVel(const std::vector< ElementLink< CVec > > &vel)
Definition: CLinksAOD.cxx:24
DMTest::CLinksAODCnv_p1::m_velCnv
ElementLinkCnv_p3< ElementLink< CVec > > m_velCnv
Definition: CLinksAODCnv_p1.h:45
DMTest::CLinksAOD::elv
const ElementLinkVector< CVec > & elv() const
Definition: CLinksAOD.cxx:36
lumiFormat.i
int i
Definition: lumiFormat.py:92
DMTest::CLinksAOD_p1::m_vel
std::vector< ElementLinkInt_p3 > m_vel
Definition: CLinksAOD_p1.h:31
DMTest::CLinksAODCnv_p1::transToPers
virtual void transToPers(const CLinksAOD *transObj, CLinksAOD_p1 *persObj, MsgStream &log) const override
Definition: CLinksAODCnv_p1.cxx:35
plotIsoValidation.el
el
Definition: plotIsoValidation.py:197
DMTest::CLinksAOD
For testing thinning of AOD objects.
Definition: CLinksAOD.h:32
DMTest::CLinksAOD::vel
const std::vector< ElementLink< CVec > > & vel() const
Definition: CLinksAOD.cxx:18
DMTest::CLinksAODCnv_p1::m_elvCnv
ElementLinkVectorCnv_p1< ElementLinkVector< CVec > > m_elvCnv
Definition: CLinksAODCnv_p1.h:46
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
DMTest::CLinksAODCnv_p1::persToTrans
virtual void persToTrans(const CLinksAOD_p1 *persObj, CLinksAOD *transObj, MsgStream &log) const override
Definition: CLinksAODCnv_p1.cxx:18
DMTest
Definition: B.h:23