ATLAS Offline Software
Loading...
Searching...
No Matches
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
6
7namespace GlobalSim {
8
10 const std::string& name,
11 const IInterface* parent):
12 base_class(type, name, parent){
13 }
14
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
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
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
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
#define ATH_MSG_ERROR(x)
#define ATH_MSG_DEBUG(x)
#define CHECK(...)
Evaluate an expression and check for errors.
unsigned int uint
SG::WriteHandleKey< GlobalSim::IOBitwise::gFexRhoTOBContainer > m_gFexRhoTOBContainerKey
SG::ReadHandleKey< xAOD::gFexJetRoIContainer > m_gFexJetRoIKey
virtual std::string toString() const override
virtual StatusCode initialize() override
Initialize function running before first event.
virtual StatusCode run(const std::unique_ptr< IDataCollector > &, const EventContext &ctx) const override
Main functional block running for each event.
gFexRhoCvtrAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
virtual bool isValid() override final
Can the handle be successfully dereferenced?
DataVector< GlobalSim::IOBitwise::gFexRhoTOB > gFexRhoTOBContainer
Definition gFexRhoTOB.h:93
AlgTool to read in LArStripNeighborhoods, and run the BDT Algorithm.