ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Event
xAOD
xAODTriggerCnv
src
EnergySumRoICnvAlg.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
// $Id: EnergySumRoICnvAlg.cxx 575028 2013-12-11 14:30:06Z krasznaa $
6
7
// Gaudi/Athena include(s):
8
#include "
AthenaKernel/errorcheck.h
"
9
10
// EDM include(s):
11
#include "
AnalysisTriggerEvent/LVL1_ROI.h
"
12
#include "
xAODTrigger/EnergySumRoI.h
"
13
#include "
xAODTrigger/EnergySumRoIAuxInfo.h
"
14
15
// Local include(s):
16
#include "
EnergySumRoICnvAlg.h
"
17
18
namespace
xAODMaker
{
19
20
EnergySumRoICnvAlg::EnergySumRoICnvAlg
(
const
std::string& name,
21
ISvcLocator* svcLoc )
22
:
AthAlgorithm
( name, svcLoc ),
23
m_cnvTool
(
"xAODMaker::EnergySumRoICnvTool/EnergySumRoICnvTool"
,
24
this ) {
25
26
declareProperty
(
"AODKey"
,
m_aodKey
=
"LVL1_ROI"
);
27
declareProperty
(
"xAODKey"
,
m_xaodKey
=
"LVL1EnergySumRoI"
);
28
declareProperty
(
"CnvTool"
,
m_cnvTool
);
29
}
30
31
StatusCode
EnergySumRoICnvAlg::initialize
() {
32
33
// Greet the user:
34
ATH_MSG_INFO
(
"Initializing"
);
35
ATH_MSG_DEBUG
(
" AOD Key: "
<<
m_aodKey
);
36
ATH_MSG_DEBUG
(
"xAOD Key: "
<<
m_xaodKey
);
37
38
// Retrieve the converter tool:
39
CHECK
(
m_cnvTool
.retrieve() );
40
41
// Return gracefully:
42
return
StatusCode::SUCCESS;
43
}
44
45
StatusCode
EnergySumRoICnvAlg::execute
(
const
EventContext&
/*ctx*/
) {
46
47
// Retrieve the AOD container:
48
const
LVL1_ROI
* aod =
nullptr
;
49
CHECK
(
evtStore
()->retrieve( aod,
m_aodKey
) );
50
51
// Create the xAOD container and its auxiliary store:
52
xAOD::EnergySumRoIAuxInfo
* aux =
new
xAOD::EnergySumRoIAuxInfo
();
53
xAOD::EnergySumRoI
* xaod =
new
xAOD::EnergySumRoI
();
54
xaod->setStore( aux );
55
56
// Fill the xAOD container:
57
CHECK
(
m_cnvTool
->convert( aod, xaod ) );
58
59
// Record the xAOD containers:
60
CHECK
(
evtStore
()->record( aux,
m_xaodKey
+
"Aux."
) );
61
CHECK
(
evtStore
()->record( xaod,
m_xaodKey
) );
62
63
// Return gracefully:
64
return
StatusCode::SUCCESS;
65
}
66
67
}
// namespace xAODMaker
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition
AthMsgStreamMacros.h:31
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
EnergySumRoIAuxInfo.h
EnergySumRoICnvAlg.h
EnergySumRoI.h
LVL1_ROI.h
AthAlgorithm::AthAlgorithm
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition
AthAlgorithm.cxx:10
AthCommonAlgorithm< Gaudi::Algorithm >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition
AthCommonDataStore.h:145
AthCommonAlgorithm< Gaudi::Algorithm >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
Definition
AthCommonDataStore.h:85
LVL1_ROI
Top level AOD object storing LVL1 RoIs.
Definition
LVL1_ROI.h:43
xAODMaker::EnergySumRoICnvAlg::m_cnvTool
ToolHandle< IEnergySumRoICnvTool > m_cnvTool
Handle to the converter tool.
Definition
EnergySumRoICnvAlg.h:52
xAODMaker::EnergySumRoICnvAlg::initialize
virtual StatusCode initialize()
Function initialising the algorithm.
Definition
EnergySumRoICnvAlg.cxx:31
xAODMaker::EnergySumRoICnvAlg::m_aodKey
std::string m_aodKey
StoreGate key of the input container.
Definition
EnergySumRoICnvAlg.h:47
xAODMaker::EnergySumRoICnvAlg::m_xaodKey
std::string m_xaodKey
StoreGate key for the output container.
Definition
EnergySumRoICnvAlg.h:49
xAODMaker::EnergySumRoICnvAlg::execute
virtual StatusCode execute(const EventContext &ctx)
Function executing the algorithm.
Definition
EnergySumRoICnvAlg.cxx:45
xAODMaker::EnergySumRoICnvAlg::EnergySumRoICnvAlg
EnergySumRoICnvAlg(const std::string &name, ISvcLocator *svcLoc)
Regular Algorithm constructor.
Definition
EnergySumRoICnvAlg.cxx:20
xAODMaker
Definition
StoreGateSvc.h:70
xAOD::EnergySumRoIAuxInfo
EnergySumRoIAuxInfo_v2 EnergySumRoIAuxInfo
Declare the most recent version of the energy-sum auxiliary info.
Definition
EnergySumRoIAuxInfo.h:17
xAOD::EnergySumRoI
EnergySumRoI_v2 EnergySumRoI
Definition
EnergySumRoI.h:16
Generated on
for ATLAS Offline Software by
1.17.0