10#include "GaudiKernel/MsgStream.h"
26 assert(oldObj !=
nullptr);
27 assert(newObj !=
nullptr);
40 for(
size_t i = 0; i < oldObj->
size(); ++i ) {
43 oldInt.setStore( oldObj );
46 for(
size_t i = 0; i < newObj->
size(); ++i ) {
49 newInt.setStore( newObj );
51 unsigned int index{0};
60 newPart->
setUid(oldBarcode);
74 MsgStream& log)
const {
76 static const char*
const ERRORMSG =
77 "Somebody called xAODTruthParticleAuxContainerCnv_v1::transToPers";
78 log << MSG::ERROR << ERRORMSG <<
endmsg;
79 throw std::runtime_error(ERRORMSG);
const T * at(size_type n) const
Access an element, as an rvalue.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
SG::Accessor< T, ALLOC > Accessor
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
virtual void transToPers(const xAOD::TruthParticleAuxContainer *, xAOD::TruthParticleAuxContainer_v1 *, MsgStream &log) const override
Dummy function inherited from the base class.
virtual void persToTrans(const xAOD::TruthParticleAuxContainer_v1 *oldObj, xAOD::TruthParticleAuxContainer *newObj, MsgStream &log) const override
Function converting from the old type to the current one.
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.
Auxiliary store for the truth vertices.
Class describing a truth particle in the MC record.
void setUid(int value)
Set unique ID.
void setStatus(int value)
Set status code.
Helper to copy an aux store while applying thinning.
constexpr int INVALID_PARTICLE_ID
int new_particle_status_from_old(const int oldStatus, const int barcode)
Get particle status in the new scheme from the barcode and status in the old scheme.
void copyAuxStoreThinned(const SG::IConstAuxStore &orig, SG::IAuxStore ©, const SG::ThinningInfo *info)
Helper to copy an aux store while applying thinning.
TruthParticleAuxContainer_v2 TruthParticleAuxContainer
Declare the latest version of the truth particle auxiliary container.
TruthParticle_v1 TruthParticle
Typedef to implementation.
TruthParticleContainer_v1 TruthParticleContainer
Declare the latest version of the truth particle container.