ATLAS Offline Software
Loading...
Searching...
No Matches
eFexCvtrAlgTool.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 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 EventContext& ctx) const {
25
27 CHECK(inContainer.isValid());
28
29 ATH_MSG_DEBUG("Number of eFexROIs read in " << inContainer->size());
30
32
33 auto outContainer = std::make_unique<OutContainer>();
34
35 outContainer->reserve(inContainer->size());
36
37
38 using ConcTOB=GlobalSim::IOBitwise::eEmTOB;
39 std::transform(std::cbegin(*inContainer),
40 std::cend(*inContainer),
41 std::back_inserter(*outContainer),
42 [](const auto& inTob){
43 return new ConcTOB(*inTob);});
44
46 ctx);
47 CHECK(h_write.record(std::move(outContainer)));
48
49 return StatusCode::SUCCESS;
50 }
51
52 std::string eFexCvtrAlgTool::toString() const {
53 return "eFexRoI to eEmTOB converter";
54 }
55}
56
#define ATH_MSG_DEBUG(x)
#define CHECK(...)
Evaluate an expression and check for errors.
SG::ReadHandleKey< xAOD::eFexEMRoIContainer > m_eEmRoIKey
virtual StatusCode run(const EventContext &ctx) const override
Main functional block running for each event.
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 that to test whether expected the TIP values generated by data supplied by eEmMultTestBench c...