ATLAS Offline Software
Loading...
Searching...
No Matches
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
8namespace GlobalSim {
9
11 const std::string& name,
12 const IInterface* parent):
13 base_class(type, name, parent){
14 }
15
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
30 CHECK(inContainer.isValid());
31
32 ATH_MSG_DEBUG("Number of eFexROIs read in " << inContainer->size());
33
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
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
#define ATH_MSG_DEBUG(x)
#define CHECK(...)
Evaluate an expression and check for errors.
virtual StatusCode run(const std::unique_ptr< IDataCollector > &, const EventContext &ctx) const override
Main functional block running for each event.
SG::ReadHandleKey< xAOD::eFexEMRoIContainer > m_eEmRoIKey
SG::WriteHandleKey< GlobalSim::IOBitwise::eEmTOBContainer > m_eEmTOBContainerKey
eFexCvtrAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
virtual std::string toString() const override
virtual StatusCode initialize() override
Initialize function running before first event.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
DataVector< GlobalSim::IOBitwise::eEmTOB > eEmTOBContainer
AlgTool to read in LArStripNeighborhoods, and run the BDT Algorithm.