ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
DerivationFramework
DerivationFrameworkTau
src
TauCombinedTESWrapper.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
// TauCombinedTESWrapper.cxx
8
9
#include "
DerivationFrameworkTau/TauCombinedTESWrapper.h
"
10
#include "
StoreGate/ReadHandle.h
"
11
#include "
AthContainers/Decorator.h
"
12
13
namespace
DerivationFramework
{
14
15
StatusCode
TauCombinedTESWrapper::initialize
()
16
{
17
ATH_CHECK
(
m_tauKey
.initialize());
18
ATH_CHECK
(
m_tesCompatibilityKey
.initialize());
19
CHECK
(
m_tTauCombinedTESTool
.retrieve() );
20
return
StatusCode::SUCCESS;
21
}
22
23
24
StatusCode
TauCombinedTESWrapper::addBranches
(
const
EventContext& ctx)
const
25
{
26
// Event context
27
28
// Read handle
29
SG::ReadHandle<xAOD::TauJetContainer>
xTauContainer(
m_tauKey
,ctx);
30
if
(!xTauContainer.
isValid
()) {
31
ATH_MSG_ERROR
(
"Couldn't retrieve TauJetContainer with name "
<<
m_tauKey
);
32
return
StatusCode::FAILURE;
33
}
34
35
SG::WriteDecorHandle<xAOD::TauJetContainer, char>
dec_tesCompatibility (
m_tesCompatibilityKey
, ctx);
36
37
// Loop over taus
38
for
(
auto
xTau : *xTauContainer){
39
dec_tesCompatibility(*xTau) =
m_tTauCombinedTESTool
->getTESCompatibility(*xTau);
40
}
41
42
return
StatusCode::SUCCESS;
43
}
44
}
45
46
47
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition
AthMsgStreamMacros.h:32
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition
Control/AthenaKernel/AthenaKernel/errorcheck.h:422
Decorator.h
Helper class to provide type-safe access to aux data.
ReadHandle.h
Handle class for reading from StoreGate.
TauCombinedTESWrapper.h
DerivationFramework::TauCombinedTESWrapper::m_tesCompatibilityKey
SG::WriteDecorHandleKey< xAOD::TauJetContainer > m_tesCompatibilityKey
Definition
TauCombinedTESWrapper.h:44
DerivationFramework::TauCombinedTESWrapper::initialize
virtual StatusCode initialize() override final
Definition
TauCombinedTESWrapper.cxx:15
DerivationFramework::TauCombinedTESWrapper::addBranches
virtual StatusCode addBranches(const EventContext &ctx) const override final
Definition
TauCombinedTESWrapper.cxx:24
DerivationFramework::TauCombinedTESWrapper::m_tTauCombinedTESTool
ToolHandle< TauCombinedTES > m_tTauCombinedTESTool
Definition
TauCombinedTESWrapper.h:41
DerivationFramework::TauCombinedTESWrapper::m_tauKey
SG::ReadHandleKey< xAOD::TauJetContainer > m_tauKey
Definition
TauCombinedTESWrapper.h:39
SG::ReadHandle
Definition
StoreGate/StoreGate/ReadHandle.h:67
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
SG::WriteDecorHandle
Handle class for adding a decoration to an object.
Definition
StoreGate/StoreGate/WriteDecorHandle.h:100
DerivationFramework
THE reconstruction tool.
Definition
CascadeTools.h:16
Generated on
for ATLAS Offline Software by
1.17.0