ATLAS Offline Software
Loading...
Searching...
No Matches
GlobalSim::gFexRhoCvtrAlgTool Class Reference

AlgTool to extract the gFex Rho information into the GlobalSim TOB system. More...

#include <gFexRhoCvtrAlgTool.h>

Inheritance diagram for GlobalSim::gFexRhoCvtrAlgTool:
Collaboration diagram for GlobalSim::gFexRhoCvtrAlgTool:

Public Member Functions

 gFexRhoCvtrAlgTool (const std::string &type, const std::string &name, const IInterface *parent)
virtual ~gFexRhoCvtrAlgTool () override=default
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.
virtual std::string toString () const override

Private Attributes

SG::ReadHandleKey< xAOD::gFexJetRoIContainerm_gFexJetRoIKey {this, "gFexJetRoIKey", "L1_gFexRhoRoI", "gFexRho EDM"}
SG::WriteHandleKey< GlobalSim::IOBitwise::gFexRhoTOBContainerm_gFexRhoTOBContainerKey

Detailed Description

AlgTool to extract the gFex Rho information into the GlobalSim TOB system.

Definition at line 25 of file gFexRhoCvtrAlgTool.h.

Constructor & Destructor Documentation

◆ gFexRhoCvtrAlgTool()

GlobalSim::gFexRhoCvtrAlgTool::gFexRhoCvtrAlgTool ( const std::string & type,
const std::string & name,
const IInterface * parent )

Definition at line 9 of file gFexRhoCvtrAlgTool.cxx.

11 :
12 base_class(type, name, parent){
13 }

◆ ~gFexRhoCvtrAlgTool()

virtual GlobalSim::gFexRhoCvtrAlgTool::~gFexRhoCvtrAlgTool ( )
overridevirtualdefault

Member Function Documentation

◆ initialize()

StatusCode GlobalSim::gFexRhoCvtrAlgTool::initialize ( )
overridevirtual

Initialize function running before first event.

Definition at line 15 of file gFexRhoCvtrAlgTool.cxx.

15 {
16 CHECK(m_gFexJetRoIKey.initialize());
17 CHECK(m_gFexRhoTOBContainerKey.initialize());
18
19 return StatusCode::SUCCESS;
20 }
#define CHECK(...)
Evaluate an expression and check for errors.
SG::WriteHandleKey< GlobalSim::IOBitwise::gFexRhoTOBContainer > m_gFexRhoTOBContainerKey
SG::ReadHandleKey< xAOD::gFexJetRoIContainer > m_gFexJetRoIKey

◆ run()

StatusCode GlobalSim::gFexRhoCvtrAlgTool::run ( const std::unique_ptr< IDataCollector > & dc,
const EventContext & ctx ) const
overridevirtual

Main functional block running for each event.

Definition at line 23 of file gFexRhoCvtrAlgTool.cxx.

24 {
25
26 if (dc){dc->collect(*this, "start");}
27
28 SG::ReadHandle<xAOD::gFexJetRoIContainer> inContainer(m_gFexJetRoIKey, ctx);
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
53 auto h_write = SG::WriteHandle<OutContainer>(m_gFexRhoTOBContainerKey,
54 ctx);
55 CHECK(h_write.record(std::move(outContainer)));
56
57 if (dc){dc->collect(*this, "end");}
58
59 return StatusCode::SUCCESS;
60 }
#define ATH_MSG_ERROR(x)
#define ATH_MSG_DEBUG(x)
unsigned int uint
DataVector< GlobalSim::IOBitwise::gFexRhoTOB > gFexRhoTOBContainer
Definition gFexRhoTOB.h:93

◆ toString()

std::string GlobalSim::gFexRhoCvtrAlgTool::toString ( ) const
overridevirtual

Definition at line 62 of file gFexRhoCvtrAlgTool.cxx.

62 {
63 return "gFexRhoRoI to gFexRhoTOB converter";
64 }

Member Data Documentation

◆ m_gFexJetRoIKey

SG::ReadHandleKey<xAOD::gFexJetRoIContainer> GlobalSim::gFexRhoCvtrAlgTool::m_gFexJetRoIKey {this, "gFexJetRoIKey", "L1_gFexRhoRoI", "gFexRho EDM"}
private

Definition at line 47 of file gFexRhoCvtrAlgTool.h.

47{this, "gFexJetRoIKey", "L1_gFexRhoRoI", "gFexRho EDM"};

◆ m_gFexRhoTOBContainerKey

SG::WriteHandleKey<GlobalSim::IOBitwise::gFexRhoTOBContainer> GlobalSim::gFexRhoCvtrAlgTool::m_gFexRhoTOBContainerKey
private
Initial value:
{
this,
"gFexRhoTOBs",
"gFexRhoTOBs",
"Key for GlobalSim gFexRhoTOB container"}

Definition at line 51 of file gFexRhoCvtrAlgTool.h.

51 {
52 this,
53 "gFexRhoTOBs",
54 "gFexRhoTOBs",
55 "Key for GlobalSim gFexRhoTOB container"};

The documentation for this class was generated from the following files: