ATLAS Offline Software
TrackParticleContainerCnv_p2.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_P2_REC_H
6 #define TRACKPARTICLECONTAINER_CNV_P2_REC_H
7 
8 
10 
12 
13 #include "Particle/TrackParticle.h"
16 
17 
18 class TrackParticleContainerCnv_p2 : public T_AthenaPoolTPCnvBase< Rec::TrackParticleContainer, Rec::TrackParticleContainer_p2 >
19 {
20 public:
22 
23  // these implementations have to stay
24  virtual void transToPers(const Rec::TrackParticleContainer* transVect, Rec::TrackParticleContainer_p2* persVect, MsgStream &log) {
25  persVect->clear();
26  persVect->reserve( transVect->size() );
27  // convert vector entries one by one
28  for( Rec::TrackParticleContainer::const_iterator it = transVect->begin();it != transVect->end(); ++it ) {
29  persVect->push_back( toPersistent( (ITPConverterFor<Rec::TrackParticle>**)0, *it, log ) );
30  }
31  }
32 
33 
34  virtual void persToTrans(const Rec::TrackParticleContainer_p2* persVect, Rec::TrackParticleContainer* transVect, MsgStream &log)
35  {
36  transVect->clear();
37  transVect->reserve( persVect->size() );
38  // convert vector entries one by one
39  for( Rec::TrackParticleContainer_p2::const_iterator it = persVect->begin();it != persVect->end(); ++it )
40  {
42  }
43  }
44 
45 };
46 
47 #endif
48 
DataVector::reserve
void reserve(size_type n)
Attempt to preallocate enough memory for a specified number of elements.
ITPConverterFor< Rec::TrackParticle >
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
TrackParticle.h
TrackParticleContainerCnv_p2::persToTrans
virtual void persToTrans(const Rec::TrackParticleContainer_p2 *persVect, Rec::TrackParticleContainer *transVect, MsgStream &log)
Definition: TrackParticleContainerCnv_p2.h:34
TrackParticleBase.h
skel.it
it
Definition: skel.GENtoEVGEN.py:423
TPConverterBase
Definition: TPConverter.h:738
TrackParticleContainerCnv_p2::transToPers
virtual void transToPers(const Rec::TrackParticleContainer *transVect, Rec::TrackParticleContainer_p2 *persVect, MsgStream &log)
Definition: TrackParticleContainerCnv_p2.h:24
T_AthenaPoolTPConverter.h
TrackParticleContainerCnv_p2::TrackParticleContainerCnv_p2
TrackParticleContainerCnv_p2()
Definition: TrackParticleContainerCnv_p2.h:21
DataVector::clear
void clear()
Erase all the elements in the collection.
ITPConverterFor::toPersistent
TPObjRef toPersistent(CNV **cnv, const typename CNV::TransBase_t *transObj, MsgStream &log) const
Persistify an object and store the persistent represenation in the storage vector of the top-level pe...
Definition: TPConverter.h:119
Rec::TrackParticleContainer_p2
Definition: TrackParticleContainer_p2.h:15
TrackParticleContainerCnv_p2
Definition: TrackParticleContainerCnv_p2.h:19
Rec::TrackParticleContainer
Definition: Reconstruction/Particle/Particle/TrackParticleContainer.h:33
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
Rec::TrackParticle
Definition: Reconstruction/Particle/Particle/TrackParticle.h:47
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
TrackParticleContainer_p2.h
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
ITPConverterFor::createTransFromPStore
CNV::Trans_t * createTransFromPStore(CNV **cnv, const TPObjRef &ref, MsgStream &log) const
Create transient representation of a persistent object, stored in the the top-level persistent object...
Definition: TPConverter.h:172
TrackParticleContainer.h