ATLAS Offline Software
Loading...
Searching...
No Matches
InDetSimDataCollectionCnv_p3.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
10#include "Identifier/Identifier.h"
12#include "MsgUtil.h"
13
15{
16 InDetSimDataCnv_p2 simDataCnv;
17 persCont->m_simdata.resize(transCont->size());
18 MSG_DEBUG(log," Preparing " << persCont->m_simdata.size() << "Collections");
19 unsigned int collIndex(0);
20 for (const auto& transSimDataPair : *transCont) {
21 // Add in new collection
22 (persCont->m_simdata[collIndex]).first = transSimDataPair.first.get_compact();
23 const InDetSimData& simData = transSimDataPair.second;
24 InDetSimData_p2& psimData = persCont->m_simdata[collIndex].second;
25 simDataCnv.transToPers(&simData,&psimData,log);
26 ++collIndex;
27 }
28 MSG_DEBUG(log," *** Writing InDetSimdataCollection");
29}
30
32{
33 InDetSimDataCnv_p2 simDataCnv;
34 MSG_DEBUG(log," Preparing " << persCont->m_simdata.size() << "Collections");
36 for (const auto& persSimDataPair : persCont->m_simdata) {
37 // Add in new collection
38 const InDetSimData_p2& psimData = persSimDataPair.second;
40 simDataCnv.persToTrans(&psimData,&simData,log);
41 transCont->insert( transCont->end(), std :: make_pair( Identifier( persSimDataPair.first ), simData ) );
42 }
43 MSG_DEBUG(log," *** Reading InDetSimdataCollection");
44}
45
46
#define MSG_DEBUG(log, x)
Definition MsgUtil.h:15
Hold a pointer to the current event store.
virtual void transToPers(const InDetSimData *transObj, InDetSimData_p2 *persObj, MsgStream &log)
virtual void persToTrans(const InDetSimData_p2 *persObj, InDetSimData *transObj, MsgStream &log)
void setCurrentStore(IProxyDict *store)
virtual void transToPers(const InDetSimDataCollection *transCont, InDetSimDataCollection_p3 *persCont, MsgStream &log)
virtual void persToTrans(const InDetSimDataCollection_p3 *persCont, InDetSimDataCollection *transCont, MsgStream &log)
std::vector< std::pair< Identifier::value_type, InDetSimData_p2 > > m_simdata
static IProxyDict * store()
Fetch the current store.
constexpr bool simData
Definition constants.h:36