12#include "AthLinks/ElementLink.h"
28 return StatusCode::SUCCESS;
37 segments = h_segments.
cptr();
41 return StatusCode::FAILURE;
45 if( ! segments )
return StatusCode::SUCCESS;
50 std::make_unique<xAOD::MuonSegmentAuxContainer>()));
52 unsigned int index = 0;
53 for(
auto it = segments->
begin();it!=segments->
end();++it,++
index ){
55 if( !muonSegment )
continue;
62 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
An algorithm that can be simultaneously executed in multiple threads.
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
size_type size() const noexcept
Returns the number of elements in the collection.
ElementLink implementation for ROOT usage.
This is the common class for 3D segments used in the muon spectrometer.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const_pointer_type cptr()
Dereference the pointer.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
pointer_type ptr()
Dereference the pointer.
virtual StatusCode execute(const EventContext &ctx) const override
Function executing the algorithm.
ToolHandle< xAODMaker::IMuonSegmentConverterTool > m_muonSegmentConverterTool
virtual StatusCode initialize() override
Function initialising the algorithm.
MuonSegmentCnvAlg(const std::string &name, ISvcLocator *svcLoc)
Regular algorithm constructor.
SG::WriteHandleKey< xAOD::MuonSegmentContainer > m_xaodContainerName
SG::ReadHandleKey< Trk::SegmentCollection > m_muonSegmentLocation
DataVector< Trk::Segment > SegmentCollection