ATLAS Offline Software
PhysicsAnalysis
ElectronPhotonID
PhotonVertexSelection
Root
DecoratePhotonPointingAlg.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
PhotonVertexSelection/DecoratePhotonPointingAlg.h
"
6
7
#include <
xAODEgamma/EgammaContainer.h
>
8
9
#include "
AsgDataHandles/ReadHandle.h
"
10
11
DecoratePhotonPointingAlg::DecoratePhotonPointingAlg
(
const
std::string&
name
,
12
ISvcLocator* svcLoc)
13
:
EL
::AnaAlgorithm(
name
, svcLoc) {}
14
15
StatusCode
DecoratePhotonPointingAlg::initialize
() {
16
ATH_CHECK
(
m_photonContainerKey
.initialize());
17
ATH_CHECK
(
m_pointingTool
.retrieve());
18
return
StatusCode::SUCCESS;
19
}
20
21
StatusCode
DecoratePhotonPointingAlg::execute
() {
22
SG::ReadHandle<xAOD::EgammaContainer>
egammas{
m_photonContainerKey
};
23
if
(!egammas.isValid()) {
24
ATH_MSG_ERROR
(
"Invalid egamma container from "
<<
m_photonContainerKey
.key());
25
return
StatusCode::FAILURE;
26
}
27
28
ATH_CHECK
(
m_pointingTool
->updatePointingAuxdata(*egammas));
29
30
return
StatusCode::SUCCESS;
31
}
SG::ReadHandle
Definition:
StoreGate/StoreGate/ReadHandle.h:70
DecoratePhotonPointingAlg.h
EgammaContainer.h
DecoratePhotonPointingAlg::DecoratePhotonPointingAlg
DecoratePhotonPointingAlg(const std::string &name, ISvcLocator *svcLoc=nullptr)
Definition:
DecoratePhotonPointingAlg.cxx:11
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition:
AthMsgStreamMacros.h:33
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition:
PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_CHECK
#define ATH_CHECK
Definition:
AthCheckMacros.h:40
EL
This module defines the arguments passed from the BATCH driver to the BATCH worker.
Definition:
AlgorithmWorkerData.h:24
DecoratePhotonPointingAlg::m_photonContainerKey
SG::ReadHandleKey< xAOD::EgammaContainer > m_photonContainerKey
Definition:
DecoratePhotonPointingAlg.h:30
DecoratePhotonPointingAlg::initialize
virtual StatusCode initialize() override
Definition:
DecoratePhotonPointingAlg.cxx:15
DecoratePhotonPointingAlg::m_pointingTool
ToolHandle< CP::IPhotonPointingTool > m_pointingTool
Definition:
DecoratePhotonPointingAlg.h:33
name
std::string name
Definition:
Control/AthContainers/Root/debug.cxx:195
ReadHandle.h
Handle class for reading from StoreGate.
DecoratePhotonPointingAlg::execute
StatusCode execute() override
Definition:
DecoratePhotonPointingAlg.cxx:21
Generated on Tue Jul 2 2024 21:13:52 for ATLAS Offline Software by
1.8.18