ATLAS Offline Software
MissingEtRegionsCnv_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: MissingEtRegionsCnv_p1.cxx
8 PACKAGE: offline/Reconstruction/RecTPCnv
9 
10 AUTHORS: S. Resconi
11 CREATED: Jul 2007
12 
13 PURPOSE: Transient/Persisten converter for MissingEtRegions class
14 ********************************************************************/
15 
16 
17 // STL includes
18 
19 // AthenaPoolCnvSvc includes
21 
22 // MissingETEvent includes
24 
25 // RecTPCnv includes
27 
28 
30  MissingEtRegions* trans,
31  MsgStream& /*msg*/ ) const
32 {
33 // msg << MSG::DEBUG << "Loading MissingEtRegions from persistent state..." << endmsg;
34 
35  auto getVec = [] (const std::vector<double>& v)
36  {
37  std::vector newv (v);
38  if (newv.empty()) newv.resize (MissingEtRegions::Size, 0);
39  return newv;
40  };
41 
42  trans->setExRegVec (getVec (pers->m_exReg));
43  trans->setEyRegVec (getVec (pers->m_eyReg));
44  trans->setEtSumRegVec (getVec (pers->m_etReg));
45 
46 
47  // for (unsigned int vi=0;vi<trans->m_exReg.size();++vi)
48  // std::cout<<"IN regions ex: "<<trans->m_exReg[vi]<<"\tey: "<<trans->m_eyReg[vi]<<"\tet: "<<trans->m_etReg[vi]<<std::endl;
49 
50  return;
51 }
52 
54  MissingEtRegions_p1* pers,
55  MsgStream& /*msg*/ ) const
56 {
57 // msg << MSG::DEBUG << "Creating persistent state of MissingEtRegions..." << endmsg;
58 
59  pers->m_exReg = trans->exRegVec();
60  pers->m_eyReg = trans->eyRegVec();
61  pers->m_etReg = trans->etSumRegVec();
62 
63  // for (unsigned int vi=0;vi<trans->m_exReg.size();++vi)
64  // std::cout<<"OUT regions ex: "<<trans->m_exReg[vi]<<"\tey: "<<trans->m_eyReg[vi]<<"\tet: "<<trans->m_etReg[vi]<<std::endl;
65 
66  return;
67 }
MissingEtRegions
Definition: MissingEtRegions.h:22
MissingEtRegions::setExRegVec
void setExRegVec(std::vector< double > &&exVec)
Definition: MissingEtRegions.cxx:114
MissingEtRegions_p1::m_eyReg
std::vector< double > m_eyReg
Definition: MissingEtRegions_p1.h:44
MissingEtRegionsCnv_p1::persToTrans
virtual void persToTrans(const MissingEtRegions_p1 *persObj, MissingEtRegions *transObj, MsgStream &msg) const override
Definition: MissingEtRegionsCnv_p1.cxx:29
MissingEtRegions::exRegVec
const std::vector< double > & exRegVec() const
Definition: MissingEtRegions.cxx:154
MissingEtRegions::Size
@ Size
Definition: MissingEtRegions.h:51
T_AthenaPoolTPConverter.h
MissingEtRegions::etSumRegVec
const std::vector< double > & etSumRegVec() const
Definition: MissingEtRegions.cxx:168
MissingEtRegions::eyRegVec
const std::vector< double > & eyRegVec() const
Definition: MissingEtRegions.cxx:161
MissingEtRegions.h
python.PyAthena.v
v
Definition: PyAthena.py:154
MissingEtRegions_p1::m_etReg
std::vector< double > m_etReg
Definition: MissingEtRegions_p1.h:45
MissingEtRegions_p1
Definition: MissingEtRegions_p1.h:25
MissingEtRegionsCnv_p1.h
MissingEtRegions_p1::m_exReg
std::vector< double > m_exReg
basic components of MissingEtRegions_p1
Definition: MissingEtRegions_p1.h:43
MissingEtRegions::setEyRegVec
void setEyRegVec(std::vector< double > &&eyVec)
Definition: MissingEtRegions.cxx:121
MissingEtRegions::setEtSumRegVec
void setEtSumRegVec(std::vector< double > &&etSumVec)
Definition: MissingEtRegions.cxx:128
MissingEtRegionsCnv_p1::transToPers
virtual void transToPers(const MissingEtRegions *transObj, MissingEtRegions_p1 *persObj, MsgStream &msg) const override
Definition: MissingEtRegionsCnv_p1.cxx:53