ATLAS Offline Software
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 }
TrigL2BphysCnv_p1::virt_toPersistent
virtual TPObjRef virt_toPersistent(const TrigL2Bphys *trans, MsgStream &log)
Definition: TrigL2BphysCnv_p1.cxx:13
TPAbstractPolyCnvBase< TRANS, TRANS, PERS >::m_pStorage
std::vector< PERS > * m_pStorage
the address of the storage vector for persistent representations
Definition: TPConverter.h:579
TrigL2Bphys_p1.h
TrigL2Bphys::roiId
int roiId() const
accessor method: ID of L1 RoI
Definition: TrigL2Bphys.h:66
TrigL2Bphys::eta
float eta() const
accessor method: eta
Definition: TrigL2Bphys.h:70
TrigL2BphysCnv_p1.h
TrigL2Bphys::particleType
pType particleType() const
accessor method: particle Type
Definition: TrigL2Bphys.h:68
TrigL2Bphys
Definition: TrigL2Bphys.h:43
TrigL2Bphys_p1::m_mass
float m_mass
Definition: TrigL2Bphys_p1.h:52
TrigL2BphysCnv_p1::persToTrans
virtual void persToTrans(const TrigL2Bphys_p1 *persObj, TrigL2Bphys *transObj, MsgStream &log)
Definition: TrigL2BphysCnv_p1.cxx:26
TPObjRef
Definition: TPObjRef.h:20
TrigL2Bphys_p1::m_phi
float m_phi
Definition: TrigL2Bphys_p1.h:51
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
TrigL2Bphys_p1
Definition: TrigL2Bphys_p1.h:24
ITPConverterFor::m_pStorageTID
TPObjRef::typeID_t m_pStorageTID
TP Ref typeID for the persistent objects this converter is creating.
Definition: TPConverter.h:292
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
TrigL2Bphys_p1::pType_p1
pType_p1
Definition: TrigL2Bphys_p1.h:44
TrigL2Bphys::pType
pType
enum for different particle types
Definition: TrigL2Bphys.h:47
TrigL2Bphys_p1::m_eta
float m_eta
Definition: TrigL2Bphys_p1.h:50
TrigL2Bphys::mass
float mass() const
accessor method: mass
Definition: TrigL2Bphys.h:74
TrigL2Bphys_p1::m_roiID
int m_roiID
Definition: TrigL2Bphys_p1.h:48
TrigL2Bphys_p1::m_dist
float m_dist
Definition: TrigL2Bphys_p1.h:53
TrigL2Bphys.h
DEBUG
#define DEBUG
Definition: page_access.h:11
TrigL2BphysCnv_p1::transToPers
virtual void transToPers(const TrigL2Bphys *transObj, TrigL2Bphys_p1 *persObj, MsgStream &log)
Definition: TrigL2BphysCnv_p1.cxx:42
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
TrigL2Bphys_p1::m_valid
bool m_valid
Definition: TrigL2Bphys_p1.h:54
TrigL2Bphys::phi
float phi() const
accessor method: phi
Definition: TrigL2Bphys.h:72
TrigL2Bphys_p1::m_particleType
pType_p1 m_particleType
Definition: TrigL2Bphys_p1.h:49