ATLAS Offline Software
Loading...
Searching...
No Matches
MissingETCnv_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
7NAME: MissingETCnv_p1.cxx
8PACKAGE: offline/Reconstruction/RecTPCnv
9
10AUTHORS: S. Resconi
11CREATED: Jul 2007
12
13PURPOSE: Transient/Persisten converter for MissingET class
14********************************************************************/
15
16// AthenaPoolCnvSvc includes
18
19// MissingETEvent includes
22
23// RecTPCnv includes
26
27// region converter
29
30
32 MissingET* trans,
33 MsgStream& msg ) const
34{
35// msg << MSG::DEBUG << "Loading MissingET from persistent state..." << endmsg;
36
37 auto regions = std::make_unique<MissingEtRegions>();
38 regCnv.persToTrans(&pers->m_regions, regions.get(), msg);
39
40 *trans = MissingET (static_cast<MissingET::Source>(pers->m_source),
41 std::move (regions),
42 pers->m_ex,
43 pers->m_ey,
44 pers->m_etSum);
45
46 // std::cout<<"IN source: "<<trans->m_source;
47 // std::cout<<"\tex: "<<trans->m_ex;
48 // std::cout<<"\tey: "<<trans->m_ey;
49 // std::cout<<"\tetSum: "<<trans->m_etSum;
50 // if (trans->m_regions != 0) std::cout<<"\thas Regions"<<std::endl; else std::cout<<"\tNO Regions"<<std::endl;
51 return;
52}
53
55 MissingET_p1* pers,
56 MsgStream& msg ) const
57{
58// msg << MSG::DEBUG << "Creating persistent state of MissingET..." << endmsg;
59
60 pers->m_ex = trans->etx();
61 pers->m_ey = trans->ety();
62 pers->m_etSum = trans->sumet();
63 pers->m_source = trans->getSource();
64
65 // use the region converter to convert from trans to pers
66 if( trans->getRegions() != 0)
67 {
68 regCnv.transToPers( trans->getRegions(), &pers->m_regions, msg );
69 }
70
71 // std::cout<<"OUT source: "<<trans->m_source;
72 // std::cout<<"\tex: "<<trans->m_ex;
73 // std::cout<<"\tey: "<<trans->m_ey;
74 // std::cout<<"\tetSum: "<<trans->m_etSum;
75 // if (trans->m_regions != 0) std::cout<<"\thas Regions"<<std::endl; else std::cout<<"\tNO Regions"<<std::endl;
76
77 return;
78}
static const MissingEtRegionsCnv_p1 regCnv
static const std::vector< std::string > regions
Athena::TPCnvVers::Old Athena::TPCnvVers::Old MissingET
Definition RecTPCnv.cxx:64
virtual void persToTrans(const MissingET_p1 *persObj, MissingET *transObj, MsgStream &msg) const override
virtual void transToPers(const MissingET *transObj, MissingET_p1 *persObj, MsgStream &msg) const override
MissingEtRegions_p1 m_regions
unsigned int m_source
float m_ex
basic components of MissingET_p1
virtual const MissingEtRegions * getRegions() const
virtual double sumet() const
virtual double etx() const
virtual double ety() const
virtual Source getSource() const
MsgStream & msg
Definition testRead.cxx:32