11#include "GaudiKernel/MsgStream.h"
25#define MSGLVL MSG::DEBUG
28#define ATH_MSG( MSG ) \
30 if( log.level() <= MSGLVL ) { \
31 log << MSGLVL << MSG << endmsg; \
42 MsgStream& log )
const {
45 ATH_MSG(
"Converting xAOD::TrackParticleAuxContainer_v2 to current version..." );
58 for(
size_t i = 0; i < oldObj->
size(); ++i ) {
61 oldInt.setStore( oldObj );
64 for(
size_t i = 0; i < newObj->
size(); ++i ) {
67 newInt.setStore( newObj );
69 std::vector<float> covMatrixVec;
71 for(
size_t i = 0; i < oldInt.
size(); ++i ) {
75 if( definingParametersCovMatrixAcc.
isAvailable( *( oldInt[ i ] ) ) ) {
77 covMatrixVec = definingParametersCovMatrixAcc( *( oldInt[ i ] ) );
78 xAOD::ParametersCovMatrix_t cov;
79 Amg::expand( covMatrixVec.begin(), covMatrixVec.end(),cov );
80 newInt[ i ]->setDefiningParametersCovMatrix(cov);
90 ATH_MSG(
"Converting xAOD::TrackParticleAuxContainer_v2 to current version "
101 MsgStream& log )
const {
104 <<
"Somebody called xAODTrackParticleAuxContainerCnv_v2::transToPers"
106 throw std::runtime_error(
"Somebody called xAODTrackParticleAuxContainerCnv_v2::"
value_type push_back(value_type pElem)
Add an element to the end of the collection.
size_type size() const noexcept
Returns the number of elements in the collection.
SG::ConstAccessor< T, ALLOC > ConstAccessor
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
virtual void persToTrans(const xAOD::TrackParticleAuxContainer_v2 *oldObj, xAOD::TrackParticleAuxContainer *newObj, MsgStream &log) const override
Function converting from the old type to the current one.
virtual void transToPers(const xAOD::TrackParticleAuxContainer *, xAOD::TrackParticleAuxContainer_v2 *, MsgStream &log) const override
Dummy function inherited from the base class.
xAODTrackParticleAuxContainerCnv_v2()
Default constructor.
virtual bool resize(size_t size) override
Resize the arrays to a given size.
virtual size_t size() const override
Get the size of the container.
Temporary container used until we have I/O for AuxStoreInternal.
Class describing a TrackParticle.
Helper to copy an aux store while applying thinning.
void expand(std::vector< float >::const_iterator it, std::vector< float >::const_iterator, AmgSymMatrix(N) &covMatrix)
void copyAuxStoreThinned(const SG::IConstAuxStore &orig, SG::IAuxStore ©, const SG::ThinningInfo *info)
Helper to copy an aux store while applying thinning.
DataVector< xAOD::TrackParticle_v1 > TrackParticleContainer_v1
The container is a simple typedef for now.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".
TrackParticleAuxContainer_v5 TrackParticleAuxContainer
Definition of the current TrackParticle auxiliary container.