ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
Algorithms
JetAnalysisAlgorithms
Root
L1jFexJetThresholdsDecoratorAlg.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 "
JetAnalysisAlgorithms/L1jFexJetThresholdsDecoratorAlg.h
"
6
7
#include <
AsgDataHandles/ReadHandle.h
>
8
#include <
AsgDataHandles/WriteDecorHandle.h
>
9
10
#include <string>
11
#include <vector>
12
13
namespace
CP
14
{
15
16
StatusCode
L1jFexJetThresholdsDecoratorAlg::initialize
()
17
{
18
ANA_CHECK
(
m_l1JetsKey
.initialize());
19
ANA_CHECK
(
m_trigConfigTool
.retrieve());
20
21
m_thresholdsDecorKey
=
m_l1JetsKey
.key() +
"."
+
m_decorationName
.value();
22
ANA_CHECK
(
m_thresholdsDecorKey
.initialize());
23
return
StatusCode::SUCCESS;
24
}
25
26
StatusCode
L1jFexJetThresholdsDecoratorAlg::execute
(
const
EventContext& ctx) {
27
ANA_CHECK
(
m_jfexThresholdTable
.update(
m_trigConfigTool
,
28
m_l1ThresholdType
.value(), ctx,
29
msg
()));
30
31
SG::ReadHandle<xAOD::jFexSRJetRoIContainer>
l1Jets(
m_l1JetsKey
, ctx);
32
if
(!l1Jets.
isValid
()) {
33
ANA_MSG_ERROR
(
"Failed to retrieve "
<<
m_l1JetsKey
.key());
34
return
StatusCode::FAILURE;
35
}
36
37
SG::WriteDecorHandle<xAOD::jFexSRJetRoIContainer, std::vector<std::string>
>
38
thresholdsDec(
m_thresholdsDecorKey
, ctx);
39
40
for
(
const
xAOD::jFexSRJetRoI
* roi : *l1Jets) {
41
thresholdsDec(*roi) =
m_jfexThresholdTable
.decode(*roi);
42
}
43
44
return
StatusCode::SUCCESS;
45
}
46
}
ReadHandle.h
Handle class for reading from StoreGate.
WriteDecorHandle.h
Handle class for adding a decoration to an object.
ANA_MSG_ERROR
#define ANA_MSG_ERROR(xmsg,...)
Macro printing error messages.
Definition
Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:295
ANA_CHECK
#define ANA_CHECK(EXP)
check whether the given expression was successful
Definition
Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:325
L1jFexJetThresholdsDecoratorAlg.h
CP::L1jFexJetThresholdsDecoratorAlg::m_l1ThresholdType
Gaudi::Property< std::string > m_l1ThresholdType
Definition
L1jFexJetThresholdsDecoratorAlg.h:37
CP::L1jFexJetThresholdsDecoratorAlg::m_thresholdsDecorKey
SG::WriteDecorHandleKey< xAOD::jFexSRJetRoIContainer > m_thresholdsDecorKey
Definition
L1jFexJetThresholdsDecoratorAlg.h:48
CP::L1jFexJetThresholdsDecoratorAlg::m_l1JetsKey
SG::ReadHandleKey< xAOD::jFexSRJetRoIContainer > m_l1JetsKey
Definition
L1jFexJetThresholdsDecoratorAlg.h:32
CP::L1jFexJetThresholdsDecoratorAlg::m_decorationName
Gaudi::Property< std::string > m_decorationName
Definition
L1jFexJetThresholdsDecoratorAlg.h:42
CP::L1jFexJetThresholdsDecoratorAlg::m_trigConfigTool
ToolHandle< TrigConf::ITrigConfigTool > m_trigConfigTool
Definition
L1jFexJetThresholdsDecoratorAlg.h:52
CP::L1jFexJetThresholdsDecoratorAlg::initialize
StatusCode initialize() override
Definition
L1jFexJetThresholdsDecoratorAlg.cxx:16
CP::L1jFexJetThresholdsDecoratorAlg::m_jfexThresholdTable
JfexThresholdTable m_jfexThresholdTable
the jFEX bit-to-name table, (re)built lazily in execute()
Definition
L1jFexJetThresholdsDecoratorAlg.h:58
EL::AnaAlgorithm::execute
virtual::StatusCode execute()
execute this algorithm
Definition
AnaAlgorithm.cxx:315
SG::ReadHandle
Definition
StoreGate/StoreGate/ReadHandle.h:66
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
CP
Select isolated Photons, Electrons and Muons.
Definition
Control/xAODRootAccess/xAODRootAccess/TEvent.h:27
xAOD::jFexSRJetRoI
jFexSRJetRoI_v1 jFexSRJetRoI
Define the latest version of the jFexSRJetRoI class.
Definition
jFexSRJetRoI.h:14
msg
MsgStream & msg
Definition
testRead.cxx:32
Generated on
for ATLAS Offline Software by
1.17.0