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 EventContext& ctx) const {
24
26 CHECK(inContainer.isValid());
27
28 ATH_MSG_DEBUG("Number of gFexRhoROIs read in " << inContainer->size());
29 if(inContainer->size() != 3){
30 ATH_MSG_ERROR("Expected 3 input gFex Rho TOBs. I received " << inContainer->size());
31 }
32
34 auto outContainer = std::make_unique<OutContainer>();
35
36 uint rho_bits = 0;
37 uint rho_scale = 0;
38 for(auto tob:*inContainer){
39 ATH_MSG_DEBUG("tob->gFexTobEt() " << tob->gFexTobEt());
40 rho_bits += tob->gFexTobEt();
41 rho_scale = tob->tobEtScale();
42 }
43
44 outContainer->push_back(std::make_unique<IOBitwise::gFexRhoTOB>(rho_bits, rho_scale));
45
46 for(auto tob:*outContainer){
47 ATH_MSG_DEBUG("tob->gFexTobEt() " << tob->rho_bits());
48 }
49
51 ctx);
52 CHECK(h_write.record(std::move(outContainer)));
53
54 return StatusCode::SUCCESS;
55 }
56
57 std::string gFexRhoCvtrAlgTool::toString() const {
58 return "gFexRhoRoI to gFexRhoTOB converter";
59 }
60}
61
#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 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 eRatio Algorithm.