5#ifndef IDPVM_CachedGetAssocTruth_h
6#define IDPVM_CachedGetAssocTruth_h
14#include <unordered_map>
39 std::unordered_map<const xAOD::TrackParticle*, const xAOD::TruthParticle*>
m_cache;
void clear()
clear the cache
const xAOD::TruthParticle * operator()(const xAOD::TrackParticle *trackParticle)
Get the associated truth particle, given a track particle.
std::unordered_map< const xAOD::TrackParticle *, const xAOD::TruthParticle * > m_cache
private cache container; map or unordered_map could be used
CachedGetAssocTruth(const CachedGetAssocTruth &)=delete
CachedGetAssocTruth()=default
CachedGetAssocTruth(CachedGetAssocTruth &&)=default
static void neededTrackParticleDecorations(std::vector< std::string > &decorations)
static const std::string s_trackParticleLinkDecorationName
~CachedGetAssocTruth()=default
const xAOD::TruthParticle * getTruth(const xAOD::TrackParticle *const trackParticle)
CachedGetAssocTruth & operator=(CachedGetAssocTruth &&)=default
Class to retrieve associated truth from a track, implementing a cached response.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
TruthParticle_v1 TruthParticle
Typedef to implementation.