7#include "AthLinks/ElementLink.h"
14 ISvcLocator* pSvcLocator)
34 return StatusCode::SUCCESS;
45 ATH_MSG_DEBUG(
"Retrieved " << spacePoints->size() <<
" elements from space point container");
47 ATH_MSG_DEBUG(
"Reading decoration to space point collection: element links to clusters");
49 using link_type = std::vector< ElementLink<xAOD::UncalibratedMeasurementContainer> >;
52 ATH_CHECK(elementLinksToClusters.isAvailable());
54 ATH_MSG_DEBUG(
"Adding decoration to space point collection: bare pointers to clusters");
56 using decoration_type = std::vector<const xAOD::UncalibratedMeasurement*>;
60 ATH_MSG_DEBUG(
"Retrieving Element Links to Clusters from the Space Points and attaching the bare pointers to the object");
64 std::vector< const xAOD::UncalibratedMeasurement* > meas;
65 meas.reserve(els.size());
70 barePointersToClusters(*
sp) = std::move(meas);
73 ATH_MSG_DEBUG(
"Decorations have been attached to space point collection");
74 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
Handle class for reading a decoration on an object.
Handle class for adding a decoration to an object.
An algorithm that can be simultaneously executed in multiple threads.
SG::ReadDecorHandleKey< xAOD::SpacePointContainer > m_linkDecoration
SpacePointReader(const std::string &name, ISvcLocator *pSvcLocator)
SG::ReadHandleKey< xAOD::SpacePointContainer > m_spacePointKey
SG::WriteDecorHandleKey< xAOD::SpacePointContainer > m_clusterDecoration
virtual StatusCode execute(const EventContext &) const override
virtual StatusCode initialize() override
Handle class for reading a decoration on an object.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const_pointer_type cptr()
Dereference the pointer.
Handle class for adding a decoration to an object.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
SpacePointContainer_v1 SpacePointContainer
Define the version of the space point container.