ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
TrackParticleTPCnv
TrackParticleTPCnv
Particle
TrackParticleContainerCnv_p1.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef TRACKPARTICLECONTAINER_CNV_P1_REC_H
6
#define TRACKPARTICLECONTAINER_CNV_P1_REC_H
7
8
//-----------------------------------------------------------------------------
9
//
10
// file: TrackParticleContainerCnv_p1.h
11
//
12
//-----------------------------------------------------------------------------
13
14
#include "
AthenaPoolCnvSvc/T_AthenaPoolTPConverter.h
"
15
16
#include "
TrkParticleBase/TrackParticleBase.h
"
17
18
#include "
Particle/TrackParticle.h
"
19
#include "
Particle/TrackParticleContainer.h
"
20
#include "
TrackParticleTPCnv/Particle/TrackParticleContainer_p1.h
"
21
22
// rmove later
23
// #include "TrkEventTPCnv/TrkParticleBase/TrackParticleBaseCnv_p1.h"
24
25
26
class
TrackParticleContainerCnv_p1
:
public
T_AthenaPoolTPCnvBase
< Rec::TrackParticleContainer, Rec::TrackParticleContainer_p1 >
27
{
28
public
:
29
TrackParticleContainerCnv_p1
() {}
30
31
// these implementations have to stay
32
virtual
void
transToPers
(
const
Rec::TrackParticleContainer
* transVect,
Rec::TrackParticleContainer_p1
* persVect, MsgStream &log) {
33
persVect->clear();
34
persVect->reserve( transVect->
size
() );
35
// convert vector entries one by one
36
for
(
Rec::TrackParticleContainer::const_iterator
it = transVect->
begin
();
37
it != transVect->
end
(); ++it ) {
38
persVect->push_back(
toPersistent
( (
ITPConverterFor<Trk::TrackParticleBase>
**)0, *it, log ) );
39
}
40
}
41
42
43
virtual
void
persToTrans
(
const
Rec::TrackParticleContainer_p1
* persVect,
Rec::TrackParticleContainer
* transVect, MsgStream &log)
44
{
45
transVect->
clear
();
46
transVect->
reserve
( persVect->size() );
47
// convert vector entries one by one
48
for
( Rec::TrackParticleContainer_p1::const_iterator it = persVect->begin();
49
it != persVect->end(); ++it )
50
{
51
transVect->
push_back
(
dynamic_cast<
Rec::TrackParticle
*
>
(
createTransFromPStore
( (
ITPConverterFor<Trk::TrackParticleBase>
**)0, *it, log ) ) );
52
}
53
}
54
55
};
56
57
#endif
//TRACKPARTICLECONTAINER_CNV_P1_REC_H
58
TrackParticleContainer.h
TrackParticle.h
T_AthenaPoolTPConverter.h
T_AthenaPoolTPCnvBase
TPConverterBase< TRANS, PERS > T_AthenaPoolTPCnvBase
Definition
T_AthenaPoolTPConverter.h:41
TrackParticleBase.h
TrackParticleContainer_p1.h
DataVector< TrackParticle >::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
Rec::TrackParticleContainer_p1
Definition
TrackParticleContainer_p1.h:21
Rec::TrackParticleContainer
Definition
Reconstruction/Particle/Particle/TrackParticleContainer.h:33
Rec::TrackParticle
Definition
Reconstruction/Particle/Particle/TrackParticle.h:47
TrackParticleContainerCnv_p1::persToTrans
virtual void persToTrans(const Rec::TrackParticleContainer_p1 *persVect, Rec::TrackParticleContainer *transVect, MsgStream &log)
Definition
TrackParticleContainerCnv_p1.h:43
TrackParticleContainerCnv_p1::transToPers
virtual void transToPers(const Rec::TrackParticleContainer *transVect, Rec::TrackParticleContainer_p1 *persVect, MsgStream &log)
Definition
TrackParticleContainerCnv_p1.h:32
TrackParticleContainerCnv_p1::TrackParticleContainerCnv_p1
TrackParticleContainerCnv_p1()
Definition
TrackParticleContainerCnv_p1.h:29
Generated on
for ATLAS Offline Software by
1.17.0