ATLAS Offline Software
TrigEFBphysCnv_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  TrigEFBphys_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  TrigEFBphys *transObj,
28  MsgStream &log )
29 {
30  log << MSG::DEBUG << "TrigEFBphysCnv_p1::persToTrans called " << endmsg;
31 
32  *transObj = TrigEFBphys (persObj->m_roiID,
33  persObj->m_eta,
34  persObj->m_phi,
35  static_cast<TrigEFBphys::pType>(persObj->m_particleType),
36  persObj->m_mass);
37 }
38 
39 //-----------------------------------------------------------------------------
40 // Transient to persistent
41 //-----------------------------------------------------------------------------
43  TrigEFBphys_p1 *persObj,
44  MsgStream &log )
45 {
46  log << MSG::DEBUG << "TrigEFBphysCnv_p1::transToPers called " << endmsg;
47 
48  persObj->m_roiID = transObj->roiId() ;
49 
50  persObj->m_eta = transObj->eta() ;
51  persObj->m_phi = transObj->phi() ;
52  persObj->m_valid = 0 ;
53  persObj->m_mass = transObj->mass() ;
54  persObj->m_particleType = static_cast<TrigEFBphys_p1::pType_p1>(transObj->particleType());
55  // persObj->m_secondaryDecay = toPersistent( &m_EFBphysCnv, transObj->m_secondaryDecay, log );
56 }
TrigEFBphys::phi
float phi() const
accessor method: phi
Definition: TrigEFBphys.h:69
TPAbstractPolyCnvBase< TRANS, TRANS, PERS >::m_pStorage
std::vector< PERS > * m_pStorage
the address of the storage vector for persistent representations
Definition: TPConverter.h:579
TrigEFBphys
Definition: TrigEFBphys.h:42
TrigEFBphysCnv_p1.h
TrigEFBphys::eta
float eta() const
accessor method: eta
Definition: TrigEFBphys.h:67
TrigEFBphys_p1::m_roiID
int m_roiID
Definition: TrigEFBphys_p1.h:48
TPObjRef
Definition: TPObjRef.h:20
TrigEFBphysCnv_p1::transToPers
virtual void transToPers(const TrigEFBphys *transObj, TrigEFBphys_p1 *persObj, MsgStream &log)
Definition: TrigEFBphysCnv_p1.cxx:42
TrigEFBphys_p1
Definition: TrigEFBphys_p1.h:24
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
TrigEFBphysCnv_p1::persToTrans
virtual void persToTrans(const TrigEFBphys_p1 *persObj, TrigEFBphys *transObj, MsgStream &log)
Definition: TrigEFBphysCnv_p1.cxx:26
TrigEFBphys_p1::m_mass
float m_mass
Definition: TrigEFBphys_p1.h:52
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
TrigEFBphys::mass
float mass() const
accessor method: mass
Definition: TrigEFBphys.h:71
TrigEFBphys::pType
pType
enum for different particle types
Definition: TrigEFBphys.h:47
TrigEFBphys.h
TrigEFBphys_p1::m_phi
float m_phi
Definition: TrigEFBphys_p1.h:51
TrigEFBphys_p1.h
TrigEFBphys::roiId
int roiId() const
accessor method: ID of L1 RoI
Definition: TrigEFBphys.h:63
TrigEFBphys_p1::pType_p1
pType_p1
Definition: TrigEFBphys_p1.h:44
TrigEFBphysCnv_p1::virt_toPersistent
virtual TPObjRef virt_toPersistent(const TrigEFBphys *trans, MsgStream &log)
Definition: TrigEFBphysCnv_p1.cxx:13
TrigEFBphys_p1::m_eta
float m_eta
Definition: TrigEFBphys_p1.h:50
TrigEFBphys_p1::m_particleType
pType_p1 m_particleType
Definition: TrigEFBphys_p1.h:49
DEBUG
#define DEBUG
Definition: page_access.h:11
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
TrigEFBphys_p1::m_valid
bool m_valid
Definition: TrigEFBphys_p1.h:53
TrigEFBphys::particleType
pType particleType() const
accessor method: particle Type
Definition: TrigEFBphys.h:65