ATLAS Offline Software
Loading...
Searching...
No Matches
TrigL2BphysCnv_p1.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
8
9//-----------------------------------------------------------------------------
10// virt_toPersistent: allows recursive invocation of the converter
11//-----------------------------------------------------------------------------
12
14 size_t size( this->m_pStorage->size() );
15 this->m_pStorage->resize( size+1 );
16 TrigL2Bphys_p1 pers;
17 transToPers( trans, &pers, log);
18 this->m_pStorage->operator[]( size ) = pers;
19 return TPObjRef( this->m_pStorageTID, size );
20}
21
22
23//-----------------------------------------------------------------------------
24// Persistent to transient
25//-----------------------------------------------------------------------------
27 TrigL2Bphys *transObj,
28 MsgStream &log )
29{
30 log << MSG::DEBUG << "TrigL2BphysCnv_p1::persToTrans called " << endmsg;
31
32 *transObj = TrigL2Bphys (persObj->m_roiID,
33 persObj->m_eta,
34 persObj->m_phi,
35 static_cast<TrigL2Bphys::pType>(persObj->m_particleType),
36 persObj->m_mass);
37}
38
39//-----------------------------------------------------------------------------
40// Transient to persistent
41//-----------------------------------------------------------------------------
43 TrigL2Bphys_p1 *persObj,
44 MsgStream &log )
45{
46 log << MSG::DEBUG << "TrigL2BphysCnv_p1::transToPers called " << endmsg;
47
48 persObj->m_roiID = transObj->roiId() ;
49 persObj->m_eta = transObj->eta() ;
50 persObj->m_phi = transObj->phi() ;
51 persObj->m_valid = 0 ;
52 persObj->m_mass = transObj->mass() ;
53 persObj->m_dist = 0 ;
54
55 persObj->m_particleType = static_cast<TrigL2Bphys_p1::pType_p1>(transObj->particleType());
56
57}
#define endmsg
std::vector< PERS > * m_pStorage
This class is an object reference used in Athena persistent data model.
Definition TPObjRef.h:20
virtual void persToTrans(const TrigL2Bphys_p1 *persObj, TrigL2Bphys *transObj, MsgStream &log)
virtual TPObjRef virt_toPersistent(const TrigL2Bphys *trans, MsgStream &log)
virtual void transToPers(const TrigL2Bphys *transObj, TrigL2Bphys_p1 *persObj, MsgStream &log)
pType_p1 m_particleType
pType particleType() const
accessor method: particle Type
Definition TrigL2Bphys.h:68
float mass() const
accessor method: mass
Definition TrigL2Bphys.h:74
float phi() const
accessor method: phi
Definition TrigL2Bphys.h:72
float eta() const
accessor method: eta
Definition TrigL2Bphys.h:70
pType
enum for different particle types
Definition TrigL2Bphys.h:47
int roiId() const
accessor method: ID of L1 RoI
Definition TrigL2Bphys.h:66