ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
TrackParticleTruthTPCnv
src
TrackParticleTruthCollectionContainerCnv_p2.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
TrackParticleTruthTPCnv/TrackParticleTruthCollectionContainerCnv_p2.h
"
6
7
TrackParticleTruthCollectionContainerCnv_p2::TrackParticleTruthCollectionContainerCnv_p2
() :
8
T_AthenaPoolTPCnvBase
<
TrackParticleTruthCollectionContainer
,
9
TrackParticleTruthCollectionContainer_p2
>()
10
{
11
}
12
13
TrackParticleTruthCollectionContainerCnv_p2::~TrackParticleTruthCollectionContainerCnv_p2
()
14
{
15
}
16
17
void
TrackParticleTruthCollectionContainerCnv_p2::transToPers
(
const
TrackParticleTruthCollectionContainer
*transVect,
18
TrackParticleTruthCollectionContainer_p2
*persVect,
19
MsgStream &
msg
)
20
{
21
ITPConverterFor<TrackParticleTruthCollection>
*cnv = 0;
22
persVect->clear();
23
persVect->reserve( transVect->
size
() );
24
for
(
TrackParticleTruthCollectionContainer::const_iterator
it = transVect->
begin
();
25
it != transVect->
end
(); ++it ) {
26
persVect->push_back(
toPersistent
(&cnv, *it,
msg
));
27
}
28
}
29
30
void
TrackParticleTruthCollectionContainerCnv_p2::persToTrans
(
const
TrackParticleTruthCollectionContainer_p2
*persVect,
31
TrackParticleTruthCollectionContainer
*transVect,
32
33
MsgStream &
msg
)
34
{
35
ITPConverterFor<TrackParticleTruthCollection>
*cnv = 0;
36
transVect->
clear
();
37
transVect->
reserve
( persVect->size() );
38
for
( TrackParticleTruthCollectionContainer_p2::const_iterator it = persVect->begin();
39
it != persVect->end(); ++it ) {
40
transVect->
push_back
(
createTransFromPStore
( &cnv, *it,
msg
) );
41
}
42
}
T_AthenaPoolTPCnvBase
TPConverterBase< TRANS, PERS > T_AthenaPoolTPCnvBase
Definition
T_AthenaPoolTPConverter.h:41
TrackParticleTruthCollectionContainerCnv_p2.h
TrackParticleTruthCollectionContainer
DataVector< TrackParticleTruthCollection > TrackParticleTruthCollectionContainer
Definition
TrackParticleTruthCollectionContainer.h:16
DataVector< TrackParticleTruthCollection >::const_iterator
DataModel_detail::const_iterator< DataVector > const_iterator
Definition
DataVector.h:838
DataVector::reserve
void reserve(size_type n)
Attempt to preallocate enough memory for a specified number of elements.
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
DataVector::clear
void clear()
Erase all the elements in the collection.
ITPConverterFor
Common base class for all TP converters, specialized for a given transient type.
Definition
TPConverter.h:37
TPPolyCnvBase< TRANS, TRANS, PERS >::createTransFromPStore
CNV::Trans_t * createTransFromPStore(CNV **cnv, const TPObjRef &ref, MsgStream &log) const
Definition
TPConverter.h:172
TPPolyCnvBase< TRANS, TRANS, PERS >::toPersistent
TPObjRef toPersistent(CNV **cnv, const typename CNV::TransBase_t *transObj, MsgStream &log) const
Definition
TPConverter.h:119
TrackParticleTruthCollectionContainerCnv_p2::~TrackParticleTruthCollectionContainerCnv_p2
virtual ~TrackParticleTruthCollectionContainerCnv_p2()
Definition
TrackParticleTruthCollectionContainerCnv_p2.cxx:13
TrackParticleTruthCollectionContainerCnv_p2::persToTrans
virtual void persToTrans(const TrackParticleTruthCollectionContainer_p2 *persVect, TrackParticleTruthCollectionContainer *transVect, MsgStream &msg)
Definition
TrackParticleTruthCollectionContainerCnv_p2.cxx:30
TrackParticleTruthCollectionContainerCnv_p2::transToPers
virtual void transToPers(const TrackParticleTruthCollectionContainer *transVect, TrackParticleTruthCollectionContainer_p2 *persVect, MsgStream &msg)
Definition
TrackParticleTruthCollectionContainerCnv_p2.cxx:17
TrackParticleTruthCollectionContainerCnv_p2::TrackParticleTruthCollectionContainerCnv_p2
TrackParticleTruthCollectionContainerCnv_p2()
Definition
TrackParticleTruthCollectionContainerCnv_p2.cxx:7
TrackParticleTruthCollectionContainer_p2
Definition
TrackParticleTruthCollectionContainer_p2.h:17
msg
MsgStream & msg
Definition
testRead.cxx:32
Generated on
for ATLAS Offline Software by
1.17.0