ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigT1
Global
GlobalSimulation
src
FEX_Unpacker
eFexCvtrAlgTool.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 "
./eFexCvtrAlgTool.h
"
6
#include "
../IO/eEmTOB.h
"
7
8
namespace
GlobalSim
{
9
10
eFexCvtrAlgTool::eFexCvtrAlgTool
(
const
std::string&
type
,
11
const
std::string& name,
12
const
IInterface* parent):
13
base_class(
type
, name, parent){
14
}
15
16
StatusCode
eFexCvtrAlgTool::initialize
() {
17
CHECK
(
m_eEmRoIKey
.initialize());
18
CHECK
(
m_eEmTOBContainerKey
.initialize());
19
20
return
StatusCode::SUCCESS;
21
}
22
23
StatusCode
24
eFexCvtrAlgTool::run
(
const
std::unique_ptr<IDataCollector>& dc,
25
const
EventContext& ctx)
const
{
26
27
if
(dc){dc->collect(*
this
,
"start"
);}
28
29
SG::ReadHandle<xAOD::eFexEMRoIContainer>
inContainer(
m_eEmRoIKey
, ctx);
30
CHECK
(inContainer.
isValid
());
31
32
ATH_MSG_DEBUG
(
"Number of eFexROIs read in "
<< inContainer->size());
33
34
using
OutContainer=
GlobalSim::IOBitwise::eEmTOBContainer
;
35
36
auto
outContainer = std::make_unique<OutContainer>();
37
38
outContainer->reserve(inContainer->size());
39
40
41
using
ConcTOB=
GlobalSim::IOBitwise::eEmTOB
;
42
std::transform(std::cbegin(*inContainer),
43
std::cend(*inContainer),
44
std::back_inserter(*outContainer),
45
[](
const
auto
& inTob){
46
return
new
ConcTOB(*inTob);});
47
48
auto
h_write =
SG::WriteHandle<OutContainer>
(
m_eEmTOBContainerKey
,
49
ctx);
50
CHECK
(h_write.record(std::move(outContainer)));
51
52
if
(dc){dc->collect(*
this
,
"end"
);}
53
54
return
StatusCode::SUCCESS;
55
}
56
57
std::string
eFexCvtrAlgTool::toString
()
const
{
58
return
"eFexRoI to eEmTOB converter"
;
59
}
60
}
61
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x,...)
Definition
AthMsgStreamMacros.h:43
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition
Control/AthenaKernel/AthenaKernel/errorcheck.h:422
eEmTOB.h
GlobalSim::IOBitwise::eEmTOB
Definition
Global/GlobalSimulation/src/IO/eEmTOB.h:24
GlobalSim::eFexCvtrAlgTool::run
virtual StatusCode run(const std::unique_ptr< IDataCollector > &, const EventContext &ctx) const override
Main functional block running for each event.
Definition
eFexCvtrAlgTool.cxx:24
GlobalSim::eFexCvtrAlgTool::m_eEmRoIKey
SG::ReadHandleKey< xAOD::eFexEMRoIContainer > m_eEmRoIKey
Definition
eFexCvtrAlgTool.h:46
GlobalSim::eFexCvtrAlgTool::m_eEmTOBContainerKey
SG::WriteHandleKey< GlobalSim::IOBitwise::eEmTOBContainer > m_eEmTOBContainerKey
Definition
eFexCvtrAlgTool.h:50
GlobalSim::eFexCvtrAlgTool::eFexCvtrAlgTool
eFexCvtrAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition
eFexCvtrAlgTool.cxx:10
GlobalSim::eFexCvtrAlgTool::toString
virtual std::string toString() const override
Definition
eFexCvtrAlgTool.cxx:57
GlobalSim::eFexCvtrAlgTool::initialize
virtual StatusCode initialize() override
Initialize function running before first event.
Definition
eFexCvtrAlgTool.cxx:16
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
eFexCvtrAlgTool.h
GlobalSim::IOBitwise::eEmTOBContainer
DataVector< GlobalSim::IOBitwise::eEmTOB > eEmTOBContainer
Definition
Global/GlobalSimulation/src/IO/eEmTOB.h:114
GlobalSim
AlgTool to read in LArStripNeighborhoods, and run the BDT Algorithm.
Definition
BitSpec.h:23
type
Generated on
for ATLAS Offline Software by
1.17.0