ATLAS Offline Software
InDetSimDataCollectionCnv_p2.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
9 #include "InDetSimDataCnv_p1.h"
10 #include "Identifier/Identifier.h"
12 #include "MsgUtil.h"
13 
15 {
16  InDetSimDataCnv_p1 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_p1& 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_p1 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_p1& 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 
CurrentEventStore.h
Hold a pointer to the current event store.
InDetSimDataCollectionCnv_p2::transToPers
virtual void transToPers(const InDetSimDataCollection *transCont, InDetSimDataCollection_p2 *persCont, MsgStream &log)
Definition: InDetSimDataCollectionCnv_p2.cxx:14
InDetSimDataCollection_p2.h
InDetSimData_p1
Definition: InDetSimData_p1.h:11
InDetSimDataCollection_p2::m_simdata
std::vector< std::pair< Identifier::value_type, InDetSimData_p1 > > m_simdata
Definition: InDetSimDataCollection_p2.h:26
SG::CurrentEventStore::store
static IProxyDict * store()
Fetch the current store.
InDetSimDataCollection
Definition: InDetSimDataCollection.h:25
InDetSimDataCollectionCnv_p2.h
InDetSimDataCnv_p1::persToTrans
virtual void persToTrans(const InDetSimData_p1 *persObj, InDetSimData *transObj, MsgStream &log)
Definition: InDetSimDataCnv_p1.cxx:23
InDetSimDataCnv_p1::setCurrentStore
void setCurrentStore(IProxyDict *store)
Definition: InDetSimDataCnv_p1.cxx:56
InDetSimDataCnv_p1.h
InDetSimData
Definition: InDetSimData.h:42
InDetSimData.h
InDetSimDataCollectionCnv_p2::persToTrans
virtual void persToTrans(const InDetSimDataCollection_p2 *persCont, InDetSimDataCollection *transCont, MsgStream &log)
Definition: InDetSimDataCollectionCnv_p2.cxx:31
InDetSimDataCnv_p1
Definition: InDetSimDataCnv_p1.h:23
InDetSimDataCnv_p1::transToPers
virtual void transToPers(const InDetSimData *transObj, InDetSimData_p1 *persObj, MsgStream &log)
Definition: InDetSimDataCnv_p1.cxx:41
InDetSimDataCollection.h
DeMoScan.first
bool first
Definition: DeMoScan.py:536
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
MSG_DEBUG
#define MSG_DEBUG(log, x)
Definition: MsgUtil.h:15
simData
constexpr bool simData
Definition: constants.h:36
InDetSimDataCollection_p2
Definition: InDetSimDataCollection_p2.h:14
Identifier
Definition: IdentifierFieldParser.cxx:14
MsgUtil.h