ATLAS Offline Software
CscSimDataCnv_p2.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
7 
8 void CscSimDataCnv_p2::persToTrans(const Muon::CscSimData_p2 * persObj, CscSimData * transObj, MsgStream & log){
9  log << MSG::DEBUG << "CscSimDataCnv_p2::persToTrans" << endmsg;
10 
11  std::vector<CscSimData::Deposit> deposits;
12  deposits.reserve(persObj->m_deposits.size());
13  for (const std::pair<HepMcParticleLink_p2, Muon::CscMcData_p1>& p :
14  persObj->m_deposits)
15  {
16  HepMcParticleLink transMcPartLink;
17  m_mcpartlinkCnv.persToTrans(&p.first, &transMcPartLink, log);
18  CscMcData transMcData;
19  m_mcdataCnv.persToTrans(&p.second, &transMcData, log);
20  deposits.emplace_back(transMcPartLink, transMcData);
21  }
22 
23  *transObj = CscSimData (std::move(deposits),
24  persObj->m_word);
25 }
26 
27 void CscSimDataCnv_p2::transToPers( const CscSimData * transObj, Muon::CscSimData_p2 * persObj, MsgStream & log){
28  log << MSG::DEBUG << "CscSimDataCnv_p2::transToPers" << endmsg;
29  persObj->m_word = transObj->word();
30  log << MSG::VERBOSE << "\tconverting m_word:\t" << transObj->word() << "\tto\t" << persObj->m_word << endmsg;
31  persObj->m_deposits.clear();
32  persObj->m_deposits.reserve(transObj->getdeposits().size());
33  for (const CscSimData::Deposit& d : transObj->getdeposits()) {
34  HepMcParticleLink_p2 persMcPartLink;
35  m_mcpartlinkCnv.transToPers(&d.first, &persMcPartLink, log);
36  Muon::CscMcData_p1 persMcData;
37  m_mcdataCnv.transToPers(&d.second, &persMcData, log);
38  persObj->m_deposits.emplace_back (persMcPartLink, persMcData);
39  }
40 }
HepMcParticleLinkCnv_p2::persToTrans
virtual void persToTrans(const HepMcParticleLink_p2 *persObj, HepMcParticleLink *transObj, MsgStream &msg) const override
Method creating the transient representation of HepMcParticleLink from its persistent representation ...
Definition: HepMcParticleLinkCnv_p2.cxx:16
HepMcParticleLinkCnv_p2::transToPers
virtual void transToPers(const HepMcParticleLink *transObj, HepMcParticleLink_p2 *persObj, MsgStream &msg) const override
Method creating the persistent representation HepMcParticleLink_p2 from its transient representation ...
Definition: HepMcParticleLinkCnv_p2.cxx:36
hist_file_dump.d
d
Definition: hist_file_dump.py:137
CscSimDataCnv_p2::m_mcpartlinkCnv
HepMcParticleLinkCnv_p2 m_mcpartlinkCnv
Definition: CscSimDataCnv_p2.h:24
CscMcData
Definition: CscSimData.h:23
Muon::CscMcData_p1
Definition: CscMcData_p1.h:9
CscSimData::word
int word() const
Definition: CscSimData.h:63
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
CscSimData
Definition: CscSimData.h:44
CscSimDataCnv_p2.h
CscSimDataCnv_p2::m_mcdataCnv
CscMcDataCnv_p1 m_mcdataCnv
Definition: CscSimDataCnv_p2.h:25
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
CscSimDataCnv_p2::persToTrans
void persToTrans(const Muon::CscSimData_p2 *persObj, CscSimData *transObj, MsgStream &log)
Definition: CscSimDataCnv_p2.cxx:8
Muon::CscSimData_p2::m_word
int m_word
Definition: CscSimData_p2.h:18
CscMcDataCnv_p1::transToPers
void transToPers(const CscMcData *transObj, Muon::CscMcData_p1 *persObj, MsgStream &log)
Definition: CscMcDataCnv_p1.cxx:22
CscMcDataCnv_p1::persToTrans
void persToTrans(const Muon::CscMcData_p1 *persObj, CscMcData *transObj, MsgStream &log)
Definition: CscMcDataCnv_p1.cxx:8
CscSimData::Deposit
std::pair< HepMcParticleLink, CscMcData > Deposit
Definition: CscSimData.h:47
Muon::CscSimData_p2
Definition: CscSimData_p2.h:13
DEBUG
#define DEBUG
Definition: page_access.h:11
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
Muon::CscSimData_p2::m_deposits
std::vector< std::pair< HepMcParticleLink_p2, CscMcData_p1 > > m_deposits
Definition: CscSimData_p2.h:19
CscSimData::getdeposits
const std::vector< Deposit > & getdeposits() const
Definition: CscSimData.h:67
CscSimData.h
CscSimDataCnv_p2::transToPers
void transToPers(const CscSimData *transObj, Muon::CscSimData_p2 *persObj, MsgStream &log)
Definition: CscSimDataCnv_p2.cxx:27
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14