ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigT1
Global
GlobalSimulation
src
FEX_Unpacker
gFexRhoCvtrAlgTool.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 "
./gFexRhoCvtrAlgTool.h
"
6
7
namespace
GlobalSim
{
8
9
gFexRhoCvtrAlgTool::gFexRhoCvtrAlgTool
(
const
std::string&
type
,
10
const
std::string& name,
11
const
IInterface* parent):
12
base_class(
type
, name, parent){
13
}
14
15
StatusCode
gFexRhoCvtrAlgTool::initialize
() {
16
CHECK
(
m_gFexJetRoIKey
.initialize());
17
CHECK
(
m_gFexRhoTOBContainerKey
.initialize());
18
19
return
StatusCode::SUCCESS;
20
}
21
22
StatusCode
23
gFexRhoCvtrAlgTool::run
(
const
std::unique_ptr<IDataCollector>& dc,
24
const
EventContext& ctx)
const
{
25
26
if
(dc){dc->collect(*
this
,
"start"
);}
27
28
SG::ReadHandle<xAOD::gFexJetRoIContainer>
inContainer(
m_gFexJetRoIKey
, ctx);
29
CHECK
(inContainer.
isValid
());
30
31
ATH_MSG_DEBUG
(
"Number of gFexRhoROIs read in "
<< inContainer->size());
32
if
(inContainer->size() != 3){
33
ATH_MSG_ERROR
(
"Expected 3 input gFex Rho TOBs. I received "
<< inContainer->size());
34
}
35
36
using
OutContainer=
GlobalSim::IOBitwise::gFexRhoTOBContainer
;
37
auto
outContainer = std::make_unique<OutContainer>();
38
39
uint
rho_bits = 0;
40
uint
rho_scale = 0;
41
for
(
auto
tob:*inContainer){
42
ATH_MSG_DEBUG
(
"tob->gFexTobEt() "
<< tob->gFexTobEt());
43
rho_bits += tob->gFexTobEt();
44
rho_scale = tob->tobEtScale();
45
}
46
47
outContainer->push_back(std::make_unique<IOBitwise::gFexRhoTOB>(rho_bits, rho_scale));
48
49
for
(
auto
tob:*outContainer){
50
ATH_MSG_DEBUG
(
"tob->gFexTobEt() "
<< tob->rho_bits());
51
}
52
53
auto
h_write =
SG::WriteHandle<OutContainer>
(
m_gFexRhoTOBContainerKey
,
54
ctx);
55
CHECK
(h_write.record(std::move(outContainer)));
56
57
if
(dc){dc->collect(*
this
,
"end"
);}
58
59
return
StatusCode::SUCCESS;
60
}
61
62
std::string
gFexRhoCvtrAlgTool::toString
()
const
{
63
return
"gFexRhoRoI to gFexRhoTOB converter"
;
64
}
65
}
66
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition
AthMsgStreamMacros.h:33
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition
Control/AthenaKernel/AthenaKernel/errorcheck.h:422
uint
unsigned int uint
Definition
LArOFPhaseFill.cxx:19
GlobalSim::gFexRhoCvtrAlgTool::m_gFexRhoTOBContainerKey
SG::WriteHandleKey< GlobalSim::IOBitwise::gFexRhoTOBContainer > m_gFexRhoTOBContainerKey
Definition
gFexRhoCvtrAlgTool.h:51
GlobalSim::gFexRhoCvtrAlgTool::m_gFexJetRoIKey
SG::ReadHandleKey< xAOD::gFexJetRoIContainer > m_gFexJetRoIKey
Definition
gFexRhoCvtrAlgTool.h:47
GlobalSim::gFexRhoCvtrAlgTool::toString
virtual std::string toString() const override
Definition
gFexRhoCvtrAlgTool.cxx:62
GlobalSim::gFexRhoCvtrAlgTool::initialize
virtual StatusCode initialize() override
Initialize function running before first event.
Definition
gFexRhoCvtrAlgTool.cxx:15
GlobalSim::gFexRhoCvtrAlgTool::run
virtual StatusCode run(const std::unique_ptr< IDataCollector > &, const EventContext &ctx) const override
Main functional block running for each event.
Definition
gFexRhoCvtrAlgTool.cxx:23
GlobalSim::gFexRhoCvtrAlgTool::gFexRhoCvtrAlgTool
gFexRhoCvtrAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition
gFexRhoCvtrAlgTool.cxx:9
SG::ReadHandle
Definition
StoreGate/StoreGate/ReadHandle.h:67
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
SG::WriteHandle
Definition
StoreGate/StoreGate/WriteHandle.h:73
gFexRhoCvtrAlgTool.h
GlobalSim::IOBitwise::gFexRhoTOBContainer
DataVector< GlobalSim::IOBitwise::gFexRhoTOB > gFexRhoTOBContainer
Definition
gFexRhoTOB.h:93
GlobalSim
AlgTool to read in LArStripNeighborhoods, and run the BDT Algorithm.
Definition
Trigger/TrigT1/Global/GlobalSimulation/src/Egamma1BDT/Egamma1BDT/BDT.h:11
type
Generated on
for ATLAS Offline Software by
1.17.0