ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
RecTPCnv
src
MissingEtCaloCnv_p1.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
/********************************************************************
6
7
NAME: MissingEtCaloCnv_p1.cxx
8
PACKAGE: offline/Reconstruction/RecTPCnv
9
10
AUTHORS: S. Resconi
11
CREATED: Jul 2007
12
13
PURPOSE: Transient/Persistent converter for MissingEtCalo class
14
********************************************************************/
15
16
17
// STL includes
18
19
// AthenaPoolCnvSvc includes
20
#include "
AthenaPoolCnvSvc/T_AthenaPoolTPConverter.h
"
21
22
// MissingETEvent includes
23
#include "
MissingETEvent/MissingET.h
"
24
#include "
MissingETEvent/MissingEtCalo.h
"
25
26
// RecTPCnv includes
27
#include "
RecTPCnv/MissingEtCaloCnv_p1.h
"
28
#include "
RecTPCnv/MissingETCnv_p1.h
"
29
30
// MissingET converter
31
static
const
MissingETCnv_p1
metCnv
;
32
33
34
void
MissingEtCaloCnv_p1::persToTrans
(
const
MissingEtCalo_p1
* pers,
35
MissingEtCalo
* trans,
36
MsgStream&
msg
)
const
37
{
38
// msg << MSG::DEBUG << "Loading MissingEtCalo from persistent state..." << endmsg;
39
40
trans->
setExCaloVec
(std::vector<double> (pers->
m_exCalo
));
41
trans->
setEyCaloVec
(std::vector<double> (pers->
m_eyCalo
));
42
trans->
setEtSumCaloVec
(std::vector<double> (pers->
m_etSumCalo
));
43
trans->
setNCellCaloVec
(std::vector<unsigned int> (pers->
m_nCellsCalo
));
44
45
{
46
// use the MissingET converter to convert from pers to trans
47
metCnv
.persToTrans(&pers->
m_met
, trans,
msg
);
48
}
49
50
// for (unsigned int vi=0;vi<trans->m_exCalo.size();++vi)
51
// std::cout<<"IN EtCalo ex: "<<trans->m_exCalo[vi]<<"\tey: "<<trans->m_eyCalo[vi]<<"\tet: "<<trans->m_etSumCalo[vi]<<"\tnCells: "<<trans->m_nCellsCalo[vi]<<std::endl;
52
53
return
;
54
}
55
56
void
MissingEtCaloCnv_p1::transToPers
(
const
MissingEtCalo
* trans,
57
MissingEtCalo_p1
* pers,
58
MsgStream&
msg
)
const
59
{
60
// msg << MSG::DEBUG << "Creating persistent state of MissingEtCalo..." << endmsg;
61
62
pers->
m_exCalo
= trans->
exCaloVec
();
63
pers->
m_eyCalo
= trans->
eyCaloVec
();
64
pers->
m_etSumCalo
= trans->
etSumCaloVec
();
65
pers->
m_nCellsCalo
= trans->
ncellCaloVec
();
66
67
if
( trans->
getSource
() >= 0 && trans->
getSource
() < 1000 ) {
68
69
// use the MissingET converter to convert from trans to pers
70
MissingET_p1
theMet;
71
metCnv
.transToPers( trans, &theMet,
msg
);
72
pers->
m_met
= theMet;
73
74
}
75
76
// for (unsigned int vi=0;vi<trans->m_exCalo.size();++vi)
77
// std::cout<<"OUT EtCalo ex: "<<trans->m_exCalo[vi]<<"\tey: "<<trans->m_eyCalo[vi]<<"\tet: "<<trans->m_etSumCalo[vi]<<"\tnCells: "<<trans->m_nCellsCalo[vi]<<std::endl;
78
79
return
;
80
}
MissingETCnv_p1.h
metCnv
static const MissingETCnv_p1 metCnv
Definition
MissingEtCaloCnv_p1.cxx:31
MissingEtCaloCnv_p1.h
MissingEtCalo.h
MissingET.h
T_AthenaPoolTPConverter.h
MissingETCnv_p1
Definition
MissingETCnv_p1.h:26
MissingET_p1
Definition
MissingET_p1.h:27
MissingET::getSource
virtual Source getSource() const
Definition
MissingET.cxx:171
MissingEtCaloCnv_p1::persToTrans
virtual void persToTrans(const MissingEtCalo_p1 *persObj, MissingEtCalo *transObj, MsgStream &msg) const override
Definition
MissingEtCaloCnv_p1.cxx:34
MissingEtCaloCnv_p1::transToPers
virtual void transToPers(const MissingEtCalo *transObj, MissingEtCalo_p1 *persObj, MsgStream &msg) const override
Definition
MissingEtCaloCnv_p1.cxx:56
MissingEtCalo_p1
Definition
MissingEtCalo_p1.h:26
MissingEtCalo_p1::m_nCellsCalo
std::vector< unsigned int > m_nCellsCalo
Definition
MissingEtCalo_p1.h:46
MissingEtCalo_p1::m_met
MissingET_p1 m_met
Definition
MissingEtCalo_p1.h:40
MissingEtCalo_p1::m_etSumCalo
std::vector< double > m_etSumCalo
Definition
MissingEtCalo_p1.h:45
MissingEtCalo_p1::m_eyCalo
std::vector< double > m_eyCalo
Definition
MissingEtCalo_p1.h:44
MissingEtCalo_p1::m_exCalo
std::vector< double > m_exCalo
basic components of MissingEtCalo_p1
Definition
MissingEtCalo_p1.h:43
MissingEtCalo
Definition
MissingEtCalo.h:27
MissingEtCalo::ncellCaloVec
const std::vector< unsigned int > & ncellCaloVec() const
Definition
MissingEtCalo.cxx:267
MissingEtCalo::exCaloVec
const std::vector< double > & exCaloVec() const
Definition
MissingEtCalo.cxx:246
MissingEtCalo::setEtSumCaloVec
void setEtSumCaloVec(std::vector< double > &&etSumCaloVec)
Definition
MissingEtCalo.cxx:202
MissingEtCalo::setEyCaloVec
void setEyCaloVec(std::vector< double > &&exCaloVec)
Definition
MissingEtCalo.cxx:195
MissingEtCalo::etSumCaloVec
const std::vector< double > & etSumCaloVec() const
Definition
MissingEtCalo.cxx:260
MissingEtCalo::setNCellCaloVec
void setNCellCaloVec(std::vector< unsigned int > &&ncellCaloVec)
Definition
MissingEtCalo.cxx:209
MissingEtCalo::eyCaloVec
const std::vector< double > & eyCaloVec() const
Definition
MissingEtCalo.cxx:253
MissingEtCalo::setExCaloVec
void setExCaloVec(std::vector< double > &&exCaloVec)
Definition
MissingEtCalo.cxx:188
msg
MsgStream & msg
Definition
testRead.cxx:32
Generated on
for ATLAS Offline Software by
1.17.0