ATLAS Offline Software
CscSimDataCnv_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 
7 
8 void CscSimDataCnv_p1::persToTrans(const Muon::CscSimData_p1 * persObj, CscSimData * transObj, MsgStream & log){
9  log << MSG::DEBUG << "CscSimDataCnv_p1::persToTrans" << endmsg;
10 
11  std::vector<CscSimData::Deposit> deposits;
12  deposits.reserve(persObj->m_deposits.size());
13  for (const std::pair<HepMcParticleLink_p1, 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_p1::transToPers( const CscSimData * transObj, Muon::CscSimData_p1 * persObj, MsgStream & log){
28  log << MSG::DEBUG << "CscSimDataCnv_p1::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_p1 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 }
hist_file_dump.d
d
Definition: hist_file_dump.py:137
CscMcData
Definition: CscSimData.h:23
CscSimDataCnv_p1.h
Muon::CscMcData_p1
Definition: CscMcData_p1.h:9
CscSimData::word
int word() const
Definition: CscSimData.h:63
Muon::CscSimData_p1::m_deposits
std::vector< std::pair< HepMcParticleLink_p1, CscMcData_p1 > > m_deposits
Definition: CscSimData_p1.h:19
CscSimDataCnv_p1::persToTrans
void persToTrans(const Muon::CscSimData_p1 *persObj, CscSimData *transObj, MsgStream &log)
Definition: CscSimDataCnv_p1.cxx:8
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
CscSimData
Definition: CscSimData.h:44
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
Muon::CscSimData_p1
Definition: CscSimData_p1.h:13
CscMcDataCnv_p1::transToPers
void transToPers(const CscMcData *transObj, Muon::CscMcData_p1 *persObj, MsgStream &log)
Definition: CscMcDataCnv_p1.cxx:22
CscSimDataCnv_p1::m_mcdataCnv
CscMcDataCnv_p1 m_mcdataCnv
Definition: CscSimDataCnv_p1.h:25
CscMcDataCnv_p1::persToTrans
void persToTrans(const Muon::CscMcData_p1 *persObj, CscMcData *transObj, MsgStream &log)
Definition: CscMcDataCnv_p1.cxx:8
Muon::CscSimData_p1::m_word
int m_word
Definition: CscSimData_p1.h:18
HepMcParticleLinkCnv_p1::transToPers
virtual void transToPers(const HepMcParticleLink *transObj, HepMcParticleLink_p1 *persObj, MsgStream &msg) const override
Method creating the persistent representation HepMcParticleLink_p1 from its transient representation ...
Definition: HepMcParticleLinkCnv_p1.cxx:51
CscSimData::Deposit
std::pair< HepMcParticleLink, CscMcData > Deposit
Definition: CscSimData.h:47
CscSimDataCnv_p1::m_mcpartlinkCnv
HepMcParticleLinkCnv_p1 m_mcpartlinkCnv
Definition: CscSimDataCnv_p1.h:24
CscSimDataCnv_p1::transToPers
void transToPers(const CscSimData *transObj, Muon::CscSimData_p1 *persObj, MsgStream &log)
Definition: CscSimDataCnv_p1.cxx:27
HepMcParticleLinkCnv_p1::persToTrans
virtual void persToTrans(const HepMcParticleLink_p1 *persObj, HepMcParticleLink *transObj, MsgStream &msg) const override
Method creating the transient representation of HepMcParticleLink from its persistent representation ...
Definition: HepMcParticleLinkCnv_p1.cxx:31
DEBUG
#define DEBUG
Definition: page_access.h:11
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
CscSimData::getdeposits
const std::vector< Deposit > & getdeposits() const
Definition: CscSimData.h:67
CscSimData.h
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14