ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Event
xAOD
xAODTriggerCnv
src
TrigNavigationCnvAlg.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
// Gaudi/Athena include(s):
6
#include "
AthenaKernel/errorcheck.h
"
7
8
// Local include(s):
9
#include "
TrigNavigationCnvAlg.h
"
10
11
using namespace
xAODMaker
;
12
13
TrigNavigationCnvAlg::TrigNavigationCnvAlg
(
const
std::string& name,
14
ISvcLocator* svcLoc )
15
:
AthReentrantAlgorithm
( name, svcLoc ) {
16
}
17
18
StatusCode
TrigNavigationCnvAlg::initialize
() {
19
ATH_MSG_DEBUG
(
" AOD Key: "
<<
m_aodKey
);
20
ATH_MSG_DEBUG
(
"xAOD Key: "
<<
m_xaodKey
);
21
22
CHECK
(
m_aodKey
.initialize() );
23
CHECK
(
m_xaodKey
.initialize() );
24
25
CHECK
(
m_cnvTool
.retrieve() );
26
27
return
StatusCode::SUCCESS;
28
}
29
30
StatusCode
TrigNavigationCnvAlg::execute
(
const
EventContext& ctx)
const
{
31
auto
aod =
SG::makeHandle
(
m_aodKey
, ctx);
32
ATH_CHECK
( aod.isValid() );
33
34
std::unique_ptr<xAOD::TrigNavigationAuxInfo> aux = std::make_unique<xAOD::TrigNavigationAuxInfo>();
35
std::unique_ptr<xAOD::TrigNavigation> xaod = std::make_unique<xAOD::TrigNavigation>();
36
xaod->setStore(aux.get());
37
38
ATH_CHECK
(
m_cnvTool
->convert( aod.cptr(), xaod.get() ) );
39
ATH_CHECK
(
SG::makeHandle
(
m_xaodKey
, ctx).record( std::move(xaod), std::move(aux)) );
40
41
return
StatusCode::SUCCESS;
42
}
43
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
errorcheck.h
Helpers for checking error return status codes and reporting errors.
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition
Control/AthenaKernel/AthenaKernel/errorcheck.h:422
TrigNavigationCnvAlg.h
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition
AthReentrantAlgorithm.h:74
xAODMaker::TrigNavigationCnvAlg::m_xaodKey
SG::WriteHandleKey< xAOD::TrigNavigation > m_xaodKey
StoreGate key for the output object.
Definition
TrigNavigationCnvAlg.h:53
xAODMaker::TrigNavigationCnvAlg::m_aodKey
SG::ReadHandleKey< HLT::HLTResult > m_aodKey
StoreGate key of the input object.
Definition
TrigNavigationCnvAlg.h:50
xAODMaker::TrigNavigationCnvAlg::initialize
virtual StatusCode initialize() override
Function initialising the algorithm.
Definition
TrigNavigationCnvAlg.cxx:18
xAODMaker::TrigNavigationCnvAlg::m_cnvTool
ToolHandle< ITrigNavigationCnvTool > m_cnvTool
Definition
TrigNavigationCnvAlg.h:55
xAODMaker::TrigNavigationCnvAlg::TrigNavigationCnvAlg
TrigNavigationCnvAlg(const std::string &name, ISvcLocator *svcLoc)
Regular Algorithm constructor.
Definition
TrigNavigationCnvAlg.cxx:13
xAODMaker::TrigNavigationCnvAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Function executing the algorithm.
Definition
TrigNavigationCnvAlg.cxx:30
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition
ReadCondHandle.h:269
xAODMaker
Definition
StoreGateSvc.h:70
Generated on
for ATLAS Offline Software by
1.17.0