ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracking
Acts
ActsEventCnv
src
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
5
#include "
ActsToTrkConvertorAlg.h
"
6
7
namespace
ActsTrk
{
8
StatusCode
ActsToTrkConvertorAlg::initialize
() {
9
ATH_MSG_DEBUG
(
"Initializing "
<< name() <<
" ..."
);
10
ATH_CHECK
(
m_tracksContainerKey
.initialize());
11
ATH_CHECK
(
m_tracksKey
.initialize());
12
ATH_CHECK
(
m_ATLASConverterTool
.retrieve());
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
}
ActsToTrkConvertorAlg.h
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
ActsTrk::ActsToTrkConvertorAlg::initialize
virtual StatusCode initialize() override
Definition
ActsToTrkConvertorAlg.cxx:8
ActsTrk::ActsToTrkConvertorAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition
ActsToTrkConvertorAlg.cxx:16
ActsTrk::ActsToTrkConvertorAlg::m_tracksKey
SG::WriteHandleKey<::TrackCollection > m_tracksKey
Definition
ActsToTrkConvertorAlg.h:30
ActsTrk::ActsToTrkConvertorAlg::m_tracksContainerKey
SG::ReadHandleKey< TrackContainer > m_tracksContainerKey
Definition
ActsToTrkConvertorAlg.h:29
ActsTrk::ActsToTrkConvertorAlg::m_ATLASConverterTool
ToolHandle< ITrackConverterTool > m_ATLASConverterTool
Definition
ActsToTrkConvertorAlg.h:28
ActsTrk::TrackContainer
Definition
TrackContainer.h:31
SG::WriteHandle
Definition
StoreGate/StoreGate/WriteHandle.h:73
SG::WriteHandle::record
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
ActsTrk
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Definition
MdtCalibInput.h:31
SG::get
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
Definition
ReadCondHandle.h:282
Generated on
for ATLAS Offline Software by
1.17.0