ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigEvent
TrigParticleTPCnv
src
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
5
#include "
TrigParticle/TrigL2Bphys.h
"
6
#include "
TrigParticleTPCnv/TrigL2Bphys_p1.h
"
7
#include "
TrigParticleTPCnv/TrigL2BphysCnv_p1.h
"
8
9
//-----------------------------------------------------------------------------
10
// virt_toPersistent: allows recursive invocation of the converter
11
//-----------------------------------------------------------------------------
12
13
TPObjRef
TrigL2BphysCnv_p1::virt_toPersistent
(
const
TrigL2Bphys
*trans, MsgStream &log ){
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
//-----------------------------------------------------------------------------
26
void
TrigL2BphysCnv_p1::persToTrans
(
const
TrigL2Bphys_p1
*persObj,
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
//-----------------------------------------------------------------------------
42
void
TrigL2BphysCnv_p1::transToPers
(
const
TrigL2Bphys
*transObj,
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
}
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
size
size_t size() const
Number of registered mappings.
TrigL2BphysCnv_p1.h
TrigL2Bphys.h
TrigL2Bphys_p1.h
TPPolyCnvBase< TRANS, TRANS, PERS >::m_pStorageTID
TPObjRef::typeID_t m_pStorageTID
Definition
TPConverter.h:292
TPPolyCnvBase< TRANS, TRANS, PERS >::m_pStorage
std::vector< PERS > * m_pStorage
Definition
TPConverter.h:579
TPObjRef
This class is an object reference used in Athena persistent data model.
Definition
TPObjRef.h:20
TrigL2BphysCnv_p1::persToTrans
virtual void persToTrans(const TrigL2Bphys_p1 *persObj, TrigL2Bphys *transObj, MsgStream &log)
Definition
TrigL2BphysCnv_p1.cxx:26
TrigL2BphysCnv_p1::virt_toPersistent
virtual TPObjRef virt_toPersistent(const TrigL2Bphys *trans, MsgStream &log)
Definition
TrigL2BphysCnv_p1.cxx:13
TrigL2BphysCnv_p1::transToPers
virtual void transToPers(const TrigL2Bphys *transObj, TrigL2Bphys_p1 *persObj, MsgStream &log)
Definition
TrigL2BphysCnv_p1.cxx:42
TrigL2Bphys_p1
Definition
TrigL2Bphys_p1.h:24
TrigL2Bphys_p1::m_particleType
pType_p1 m_particleType
Definition
TrigL2Bphys_p1.h:37
TrigL2Bphys_p1::m_phi
float m_phi
Definition
TrigL2Bphys_p1.h:39
TrigL2Bphys_p1::pType_p1
pType_p1
Definition
TrigL2Bphys_p1.h:32
TrigL2Bphys_p1::m_valid
bool m_valid
Definition
TrigL2Bphys_p1.h:42
TrigL2Bphys_p1::m_dist
float m_dist
Definition
TrigL2Bphys_p1.h:41
TrigL2Bphys_p1::m_mass
float m_mass
Definition
TrigL2Bphys_p1.h:40
TrigL2Bphys_p1::m_roiID
int m_roiID
Definition
TrigL2Bphys_p1.h:36
TrigL2Bphys_p1::m_eta
float m_eta
Definition
TrigL2Bphys_p1.h:38
TrigL2Bphys
Definition
TrigL2Bphys.h:43
TrigL2Bphys::particleType
pType particleType() const
accessor method: particle Type
Definition
TrigL2Bphys.h:68
TrigL2Bphys::mass
float mass() const
accessor method: mass
Definition
TrigL2Bphys.h:74
TrigL2Bphys::phi
float phi() const
accessor method: phi
Definition
TrigL2Bphys.h:72
TrigL2Bphys::eta
float eta() const
accessor method: eta
Definition
TrigL2Bphys.h:70
TrigL2Bphys::pType
pType
enum for different particle types
Definition
TrigL2Bphys.h:47
TrigL2Bphys::roiId
int roiId() const
accessor method: ID of L1 RoI
Definition
TrigL2Bphys.h:66
Generated on
for ATLAS Offline Software by
1.17.0