22 return StatusCode::SUCCESS;
27 if (!tracks.isValid()) {
29 return StatusCode::FAILURE;
31 auto cache = std::make_unique<CaloExtensionCollection>();
36 cache->resize(tracks->back()->index() + 1);
38 if (itrk->index() >= cache->size())
40 cache->resize(itrk->index() + 1);
44 ATH_CHECK(outputHandle.record(std::move(cache)));
45 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
Handle class for reading from StoreGate.
Handle class for recording to StoreGate.
An algorithm that can be simultaneously executed in multiple threads.
virtual StatusCode execute(const EventContext &ctx) const override
ToolHandle< Trk::IParticleCaloExtensionTool > m_particleCaloExtensionTool
~PreselCaloExtensionBuilderAlg()
PreselCaloExtensionBuilderAlg(const std::string &name, ISvcLocator *pSvcLocator)
SG::WriteHandleKey< CaloExtensionCollection > m_outputCacheKey
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_inputTracksKey
virtual StatusCode initialize() override
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Ensure that the ATLAS eigen extensions are properly loaded.
TrackParticle_v1 TrackParticle
Reference the current persistent version: