ATLAS Offline Software
InnerDetector
InDetEventCnv
InDetEventAthenaPool
src
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
5
#include "
InDetSimData/InDetSimData.h
"
6
#include "
InDetSimData/InDetSimDataCollection.h
"
7
#include "
InDetEventAthenaPool/InDetSimDataCollection_p3.h
"
8
#include "
InDetSimDataCollectionCnv_p3.h
"
9
#include "
InDetSimDataCnv_p2.h
"
10
#include "Identifier/Identifier.h"
11
#include "
SGTools/CurrentEventStore.h
"
12
#include "
MsgUtil.h
"
13
14
void
InDetSimDataCollectionCnv_p3::transToPers
(
const
InDetSimDataCollection
* transCont,
InDetSimDataCollection_p3
* persCont, MsgStream &
log
)
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
31
void
InDetSimDataCollectionCnv_p3::persToTrans
(
const
InDetSimDataCollection_p3
* persCont,
InDetSimDataCollection
* transCont, MsgStream &
log
)
32
{
33
InDetSimDataCnv_p2
simDataCnv;
34
MSG_DEBUG
(
log
,
" Preparing "
<< persCont->
m_simdata
.size() <<
"Collections"
);
35
simDataCnv.
setCurrentStore
(
SG::CurrentEventStore::store
());
36
for
(
const
auto
& persSimDataPair : persCont->
m_simdata
) {
37
// Add in new collection
38
const
InDetSimData_p2
& psimData = persSimDataPair.second;
39
InDetSimData
simData
;
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.
InDetSimDataCnv_p2::setCurrentStore
void setCurrentStore(IProxyDict *store)
Definition:
InDetSimDataCnv_p2.cxx:56
InDetSimDataCollection_p3::m_simdata
std::vector< std::pair< Identifier::value_type, InDetSimData_p2 > > m_simdata
Definition:
InDetSimDataCollection_p3.h:26
InDetSimDataCollection_p3.h
InDetSimDataCnv_p2::persToTrans
virtual void persToTrans(const InDetSimData_p2 *persObj, InDetSimData *transObj, MsgStream &log)
Definition:
InDetSimDataCnv_p2.cxx:23
SG::CurrentEventStore::store
static IProxyDict * store()
Fetch the current store.
InDetSimDataCollection
Definition:
InDetSimDataCollection.h:25
InDetSimDataCollectionCnv_p3.h
InDetSimDataCnv_p2.h
InDetSimDataCollection_p3
Definition:
InDetSimDataCollection_p3.h:14
InDetSimData
Definition:
InDetSimData.h:42
InDetSimData.h
InDetSimDataCollectionCnv_p3::transToPers
virtual void transToPers(const InDetSimDataCollection *transCont, InDetSimDataCollection_p3 *persCont, MsgStream &log)
Definition:
InDetSimDataCollectionCnv_p3.cxx:14
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
InDetSimDataCnv_p2
Definition:
InDetSimDataCnv_p2.h:23
simData
constexpr bool simData
Definition:
constants.h:36
InDetSimDataCnv_p2::transToPers
virtual void transToPers(const InDetSimData *transObj, InDetSimData_p2 *persObj, MsgStream &log)
Definition:
InDetSimDataCnv_p2.cxx:40
InDetSimData_p2
Definition:
InDetSimData_p2.h:11
InDetSimDataCollectionCnv_p3::persToTrans
virtual void persToTrans(const InDetSimDataCollection_p3 *persCont, InDetSimDataCollection *transCont, MsgStream &log)
Definition:
InDetSimDataCollectionCnv_p3.cxx:31
Identifier
Definition:
IdentifierFieldParser.cxx:14
MsgUtil.h
Generated on Mon Dec 23 2024 21:11:48 for ATLAS Offline Software by
1.8.18