|
ATLAS Offline Software
|
Go to the documentation of this file.
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");
62 const link_type& els = elementLinksToClusters(*sp);
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;
virtual StatusCode initialize() override
SG::ReadHandleKey< xAOD::SpacePointContainer > m_spacePointKey
const_pointer_type cptr()
Dereference the pointer.
SG::ReadDecorHandleKey< xAOD::SpacePointContainer > m_linkDecoration
An algorithm that can be simultaneously executed in multiple threads.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
SpacePointReader(const std::string &name, ISvcLocator *pSvcLocator)
Handle class for reading a decoration on an object.
virtual StatusCode execute(const EventContext &) const override
::StatusCode StatusCode
StatusCode definition for legacy code.
Handle class for adding a decoration to an object.
Handle class for adding a decoration to an object.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
ElementLink implementation for ROOT usage.
SG::WriteDecorHandleKey< xAOD::SpacePointContainer > m_clusterDecoration
SpacePointContainer_v1 SpacePointContainer
Define the version of the space point container.
Handle class for reading a decoration on an object.
size_type size() const noexcept
Returns the number of elements in the collection.