ATLAS Offline Software
Loading...
Searching...
No Matches
ActsToTrkConvertorAlg.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7namespace ActsTrk {
9 ATH_MSG_DEBUG("Initializing " << name() << " ...");
10 ATH_CHECK(m_tracksContainerKey.initialize());
11 ATH_CHECK(m_tracksKey.initialize());
13 return StatusCode::SUCCESS;
14 }
15
16 StatusCode ActsToTrkConvertorAlg::execute(const EventContext &ctx) const
17 {
18 ATH_MSG_DEBUG("Executing " << name() << " ...");
19
20 // I/O
21 ATH_MSG_DEBUG("Retrieving input track collection '" << m_tracksContainerKey.key() << "' ...");
22 const ActsTrk::TrackContainer *inputTracks{nullptr};
23 ATH_CHECK(SG::get(inputTracks, m_tracksContainerKey, ctx));
24 auto trackCollection = m_ATLASConverterTool->convertActsToTrkContainer(ctx, *inputTracks);
25 SG::WriteHandle outputTrackHandle{m_tracksKey, ctx};
26 ATH_MSG_DEBUG("Output Tracks Collection `" << m_tracksKey.key() << "` created ...");
27 ATH_CHECK(outputTrackHandle.record(std::move(trackCollection)));
28
29 return StatusCode::SUCCESS;
30 }
31}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x)
ToolHandle< ActsTrk::IActsToTrkConverterTool > m_ATLASConverterTool
virtual StatusCode initialize() override
virtual StatusCode execute(const EventContext &ctx) const override
SG::ReadHandleKey< ActsTrk::TrackContainer > m_tracksContainerKey
SG::WriteHandleKey<::TrackCollection > m_tracksKey
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.