ATLAS Offline Software
InnerDetector
InDetEventCnv
InDetEventAthenaPool
src
InDetSimDataCollectionCnv_p4.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
InDetSimData/InDetSimData.h
"
6
#include "
InDetSimData/InDetSimDataCollection.h
"
7
#include "
InDetEventAthenaPool/InDetSimDataCollection_p4.h
"
8
#include "
InDetSimDataCollectionCnv_p4.h
"
9
#include "
InDetSimDataCnv_p3.h
"
10
#include "Identifier/Identifier.h"
11
#include "
SGTools/CurrentEventStore.h
"
12
#include "
MsgUtil.h
"
13
14
void
InDetSimDataCollectionCnv_p4::transToPers
(
const
InDetSimDataCollection
* transCont,
InDetSimDataCollection_p4
* persCont, MsgStream &
log
)
15
{
16
InDetSimDataCnv_p3
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_p3
& 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_p4::persToTrans
(
const
InDetSimDataCollection_p4
* persCont,
InDetSimDataCollection
* transCont, MsgStream &
log
)
32
{
33
InDetSimDataCnv_p3
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_p3
& 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_p3
Definition:
InDetSimDataCnv_p3.h:23
InDetSimDataCnv_p3::persToTrans
virtual void persToTrans(const InDetSimData_p3 *persObj, InDetSimData *transObj, MsgStream &log)
Definition:
InDetSimDataCnv_p3.cxx:23
SG::CurrentEventStore::store
static IProxyDict * store()
Fetch the current store.
InDetSimDataCollection
Definition:
InDetSimDataCollection.h:25
InDetSimDataCollection_p4.h
InDetSimDataCollectionCnv_p4::persToTrans
virtual void persToTrans(const InDetSimDataCollection_p4 *persCont, InDetSimDataCollection *transCont, MsgStream &log)
Definition:
InDetSimDataCollectionCnv_p4.cxx:31
InDetSimDataCollectionCnv_p4.h
InDetSimData_p3
Definition:
InDetSimData_p3.h:11
InDetSimDataCollectionCnv_p4::transToPers
virtual void transToPers(const InDetSimDataCollection *transCont, InDetSimDataCollection_p4 *persCont, MsgStream &log)
Definition:
InDetSimDataCollectionCnv_p4.cxx:14
InDetSimData
Definition:
InDetSimData.h:42
InDetSimData.h
InDetSimDataCnv_p3.h
InDetSimDataCollection_p4
Definition:
InDetSimDataCollection_p4.h:14
InDetSimDataCnv_p3::setCurrentStore
void setCurrentStore(IProxyDict *store)
Definition:
InDetSimDataCnv_p3.cxx:56
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_p4::m_simdata
std::vector< std::pair< Identifier::value_type, InDetSimData_p3 > > m_simdata
Definition:
InDetSimDataCollection_p4.h:26
InDetSimDataCnv_p3::transToPers
virtual void transToPers(const InDetSimData *transObj, InDetSimData_p3 *persObj, MsgStream &log)
Definition:
InDetSimDataCnv_p3.cxx:40
Identifier
Definition:
IdentifierFieldParser.cxx:14
MsgUtil.h
Generated on Thu Nov 7 2024 21:17:05 for ATLAS Offline Software by
1.8.18