ATLAS Offline Software
CompositeParticleCnv_p1.cxx
Go to the documentation of this file.
1 
3 /*
4  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // CompositeParticleCnv_p1.cxx
8 // Implementation file for class CompositeParticleCnv_p1
9 // Author: S.Binet<binet@cern.ch>
11 
12 
13 // STL includes
14 
15 // ParticleEvent includes
16 #include "ParticleEvent/CompositeParticle.h"
17 
18 // DataModelAthenaPool includes
20 
21 // EventCommonTPCnv includes
23 
24 // ParticleEventTPCnv includes
27 
28 typedef NavigableCnv_p1<
31 
32 // pre-allocate converters
33 static const P4ImplPxPyPzECnv_p1 s_momCnv;
34 static const NavigableCnv_t s_navCnv;
35 static const ParticleBaseCnv_p1 s_pbCnv;
36 
37 
39  CompositeParticle* trans,
40  MsgStream& msg ) const
41 {
42 // msg << MSG::DEBUG << "Loading CompositeParticle from persistent state..."
43 // << endmsg;
44  s_navCnv.persToTrans( &pers->m_nav,
45  &trans->navigableBase(),
46  msg );
47  s_momCnv.persToTrans( &pers->m_momentum,
48  &trans->momentumBase(),
49  msg );
50  s_pbCnv.persToTrans( &pers->m_particle,
51  &trans->particleBase(),
52  msg );
53 
54 // msg << MSG::DEBUG << "Loaded CompositeParticle from persistent state [OK]"
55 // << endmsg;
56  return;
57 }
58 
60  CompositeParticle_p1* pers,
61  MsgStream& msg ) const
62 {
63 // msg << MSG::DEBUG << "Creating persistent state of CompositeParticle..."
64 // << endmsg;
65 
66  s_navCnv.transToPers( &trans->navigableBase(),
67  &pers->m_nav,
68  msg );
69  s_momCnv.transToPers( &trans->momentumBase(),
70  &pers->m_momentum,
71  msg );
72  s_pbCnv.transToPers( &trans->particleBase(),
73  &pers->m_particle,
74  msg );
75 
76 // msg << MSG::DEBUG << "Created persistent state of CompositeParticle [OK]"
77 // << endmsg;
78  return;
79 }
CompositeParticle_p1
Definition: CompositeParticle_p1.h:29
CompositeParticleCnv_p1.h
CompositeParticle_p1::m_momentum
P4PxPyPzE_p1 m_momentum
the 4-mom part
Definition: CompositeParticle_p1.h:59
CompositeParticle
Definition: PhysicsAnalysis/AnalysisCommon/ParticleEvent/ParticleEvent/CompositeParticle.h:52
CompositeParticle_p1::m_nav
Navigable_p1< uint32_t, double > m_nav
the navigable part
Definition: CompositeParticle_p1.h:56
NavigableCnv_p1::persToTrans
void persToTrans(const PersNavigable_t &pers, Navigable_t &trans, MsgStream &log) const
P4ImplPxPyPzECnv_p1.h
CompositeParticleCnv_p1::transToPers
virtual void transToPers(const CompositeParticle *transObj, CompositeParticle_p1 *persObj, MsgStream &msg) const override
Method creating the persistent representation CompositeParticle_p1 from its transient representation ...
Definition: CompositeParticleCnv_p1.cxx:59
CompositeParticle_p1::m_particle
ParticleBase_p1 m_particle
the iparticle-part
Definition: CompositeParticle_p1.h:62
ParticleBaseCnv_p1::persToTrans
virtual void persToTrans(const ParticleBase_p1 *persObj, ParticleBase *transObj, MsgStream &msg) const final
Method creating the transient representation of ParticleBase from its persistent representation Parti...
Definition: ParticleBaseCnv_p1.cxx:49
ParticleBaseCnv_p1.h
NavigableCnv_t
NavigableCnv_p1< Navigable< INavigable4MomentumCollection, double > > NavigableCnv_t
Definition: CompositeParticleCnv_p1.cxx:30
ParticleImpl::momentumBase
const momentum_type & momentumBase() const
access to underlying base type (I4Momentum-like)
Definition: ParticleImpl.h:393
P4ImplPxPyPzECnv_p1
Definition: P4ImplPxPyPzECnv_p1.h:38
ParticleImpl::particleBase
const particle_type & particleBase() const
access to underlying base type (IParticle-like)
Definition: ParticleImpl.h:403
ParticleImpl::navigableBase
const navigable_type & navigableBase() const
access to underlying base type (INavigable-like)
Definition: ParticleImpl.h:383
CompositeParticleCnv_p1::persToTrans
virtual void persToTrans(const CompositeParticle_p1 *persObj, CompositeParticle *transObj, MsgStream &msg) const override
Method creating the transient representation of CompositeParticle from its persistent representation ...
Definition: CompositeParticleCnv_p1.cxx:38
Navigable< INavigable4MomentumCollection, double >
ParticleBaseCnv_p1
Definition: ParticleBaseCnv_p1.h:30
NavigableCnv_p1::transToPers
void transToPers(const Navigable_t &trans, PersNavigable_t &pers, const SG::ThinningCache *cache, MsgStream &log) const
ParticleBaseCnv_p1::transToPers
virtual void transToPers(const ParticleBase *transObj, ParticleBase_p1 *persObj, MsgStream &msg) const final
Method creating the persistent representation ParticleBase_p1 from its transient representation Parti...
Definition: ParticleBaseCnv_p1.cxx:80
P4ImplPxPyPzECnv_p1::persToTrans
virtual void persToTrans(const P4ImplPxPyPzE_p1 *persObj, P4ImplPxPyPzE *transObj, MsgStream &msg) const override
Method creating the transient representation of P4ImplPxPyPzE from its persistent representation P4Im...
Definition: P4ImplPxPyPzECnv_p1.cxx:26
NavigableCnv_p1.h
This file contains the class definition for the NavigableCnv_p1 class. NOTE: it should be included fi...
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
P4ImplPxPyPzECnv_p1::transToPers
virtual void transToPers(const P4ImplPxPyPzE *transObj, P4ImplPxPyPzE_p1 *persObj, MsgStream &msg) const override
Method creating the persistent representation P4ImplPxPyPzE_p1 from its transient representation P4Px...
Definition: P4ImplPxPyPzECnv_p1.cxx:38
NavigableCnv_p1
Definition: NavigableCnv_p1.h:29