ATLAS Offline Software
Loading...
Searching...
No Matches
LVL1::jFEXLargeRJetAlgo Class Reference

#include <jFEXLargeRJetAlgo.h>

Inheritance diagram for LVL1::jFEXLargeRJetAlgo:
Collaboration diagram for LVL1::jFEXLargeRJetAlgo:

Public Member Functions

 jFEXLargeRJetAlgo (const std::string &type, const std::string &name, const IInterface *parent)
 Constructors.
virtual StatusCode initialize () override
 standard Athena-Algorithm method
virtual ~jFEXLargeRJetAlgo ()
 Destructor.
virtual StatusCode safetyTest () override
virtual void setupCluster (int inputTable[15][15]) override
virtual unsigned int getRingET () override
virtual unsigned int getLargeClusterET (unsigned int smallClusterET, unsigned int largeRingET) const override
virtual void setFPGAEnergy (const std::unordered_map< int, std::vector< int > > &et_map) override
virtual bool getLRjetSat () override
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Static Public Member Functions

static const InterfaceID & interfaceID ()

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

bool getTTowerSat (unsigned int TTID)
int getTTowerET (unsigned int TTID)
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

SG::ReadHandleKey< LVL1::jTowerContainerm_jTowerContainerKey {this, "MyjTowers", "jTowerContainer", "Input container for jTowers"}
SG::ReadHandle< jTowerContainerm_jTowerContainer
ToolHandle< IjFEXSmallRJetAlgom_jFEXSmallRJetAlgoTool {this, "jFEXSmallRJetAlgoTool", "LVL1::jFEXSmallRJetAlgo", "Tool that runs the jFEX Small R Jet algorithm"}
bool m_saturation =false
int m_largeRJetEtRing_IDs [15][15]
std::unordered_map< int, std::vector< int > > m_map_Etvalues
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 22 of file jFEXLargeRJetAlgo.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ jFEXLargeRJetAlgo()

LVL1::jFEXLargeRJetAlgo::jFEXLargeRJetAlgo ( const std::string & type,
const std::string & name,
const IInterface * parent )

Constructors.

Definition at line 18 of file jFEXLargeRJetAlgo.cxx.

18 :
19 AthAlgTool(type, name, parent)
20 {
21 declareInterface<IjFEXLargeRJetAlgo>(this);
22 }
AthAlgTool()
Default constructor:

◆ ~jFEXLargeRJetAlgo()

LVL1::jFEXLargeRJetAlgo::~jFEXLargeRJetAlgo ( )
virtual

Destructor.

Definition at line 25 of file jFEXLargeRJetAlgo.cxx.

26{
27}

Member Function Documentation

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ getLargeClusterET()

unsigned int LVL1::jFEXLargeRJetAlgo::getLargeClusterET ( unsigned int smallClusterET,
unsigned int largeRingET ) const
overridevirtual

Implements LVL1::IjFEXLargeRJetAlgo.

Definition at line 74 of file jFEXLargeRJetAlgo.cxx.

74 {
75 int largeClusterET = smallClusterET + largeRingET;
76 return largeClusterET;
77}

◆ getLRjetSat()

bool LVL1::jFEXLargeRJetAlgo::getLRjetSat ( )
overridevirtual

Implements LVL1::IjFEXLargeRJetAlgo.

Definition at line 64 of file jFEXLargeRJetAlgo.cxx.

64 {
65 m_saturation = false;
66 for(int n =0; n <15; n++) {
67 for(int m =0; m <15; m++) {
69 }
70 }
71 return m_saturation;
72}
bool getTTowerSat(unsigned int TTID)

◆ getRingET()

unsigned int LVL1::jFEXLargeRJetAlgo::getRingET ( )
overridevirtual

Implements LVL1::IjFEXLargeRJetAlgo.

Definition at line 53 of file jFEXLargeRJetAlgo.cxx.

53 {
54 int RingET =0;
55 for(int n =0; n <15; n++) {
56 for(int m =0; m <15; m++) {
58 RingET +=et;
59 }
60 }
61 return RingET;
62}
float et(const xAOD::jFexSRJetRoI *j)
int getTTowerET(unsigned int TTID)

◆ getTTowerET()

int LVL1::jFEXLargeRJetAlgo::getTTowerET ( unsigned int TTID)
private

Definition at line 81 of file jFEXLargeRJetAlgo.cxx.

81 {
82 if(TTID == 0) {
83 return 0;
84 }
85
86 if(m_map_Etvalues.find(TTID) != m_map_Etvalues.end()) {
87 return m_map_Etvalues[TTID][0];
88 }
89
90 //we shouldn't arrive here
91 return 0;
92
93}
std::unordered_map< int, std::vector< int > > m_map_Etvalues

◆ getTTowerSat()

bool LVL1::jFEXLargeRJetAlgo::getTTowerSat ( unsigned int TTID)
private

Definition at line 96 of file jFEXLargeRJetAlgo.cxx.

96 {
97 if(TTID == 0) {
98 return false;
99 }
100
101 const LVL1::jTower * tmpTower = m_jTowerContainer->findTower(TTID);
102 return tmpTower->getTowerSat();
103}
SG::ReadHandle< jTowerContainer > m_jTowerContainer
bool getTowerSat() const
Definition jTower.h:61

◆ initialize()

StatusCode LVL1::jFEXLargeRJetAlgo::initialize ( )
overridevirtual

standard Athena-Algorithm method

Definition at line 28 of file jFEXLargeRJetAlgo.cxx.

29{
30 ATH_CHECK(m_jTowerContainerKey.initialize());
31
32 return StatusCode::SUCCESS;
33
34}
#define ATH_CHECK
Evaluate an expression and check for errors.
SG::ReadHandleKey< LVL1::jTowerContainer > m_jTowerContainerKey

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

const InterfaceID & LVL1::IjFEXLargeRJetAlgo::interfaceID ( )
inlinestaticinherited

Definition at line 34 of file IjFEXLargeRJetAlgo.h.

35 {
37 }
static const InterfaceID IID_IjFEXLargeRJetAlgo("LVL1::IjFEXLargeRJetAlgo", 1, 0)

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ safetyTest()

StatusCode LVL1::jFEXLargeRJetAlgo::safetyTest ( )
overridevirtual

Implements LVL1::IjFEXLargeRJetAlgo.

Definition at line 36 of file jFEXLargeRJetAlgo.cxx.

36 {
37 m_jTowerContainer = SG::ReadHandle<jTowerContainer>(m_jTowerContainerKey);
38 if(! m_jTowerContainer.isValid()) {
39 ATH_MSG_ERROR("Could not retrieve jTowerContainer " << m_jTowerContainerKey.key());
40
41 return StatusCode::FAILURE;
42 }
43
44 return StatusCode::SUCCESS;
45}
#define ATH_MSG_ERROR(x)

◆ setFPGAEnergy()

void LVL1::jFEXLargeRJetAlgo::setFPGAEnergy ( const std::unordered_map< int, std::vector< int > > & et_map)
overridevirtual

Implements LVL1::IjFEXLargeRJetAlgo.

Definition at line 106 of file jFEXLargeRJetAlgo.cxx.

106 {
107 m_map_Etvalues=et_map;
108}

◆ setupCluster()

void LVL1::jFEXLargeRJetAlgo::setupCluster ( int inputTable[15][15])
overridevirtual

Implements LVL1::IjFEXLargeRJetAlgo.

Definition at line 47 of file jFEXLargeRJetAlgo.cxx.

47 {
48
49 std::copy(&inputTable[0][0], &inputTable[0][0] + 225 , &m_largeRJetEtRing_IDs[0][0]);
50
51}

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and DerivationFramework::CfAthAlgTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_jFEXSmallRJetAlgoTool

ToolHandle<IjFEXSmallRJetAlgo> LVL1::jFEXLargeRJetAlgo::m_jFEXSmallRJetAlgoTool {this, "jFEXSmallRJetAlgoTool", "LVL1::jFEXSmallRJetAlgo", "Tool that runs the jFEX Small R Jet algorithm"}
private

Definition at line 47 of file jFEXLargeRJetAlgo.h.

47{this, "jFEXSmallRJetAlgoTool", "LVL1::jFEXSmallRJetAlgo", "Tool that runs the jFEX Small R Jet algorithm"};

◆ m_jTowerContainer

SG::ReadHandle<jTowerContainer> LVL1::jFEXLargeRJetAlgo::m_jTowerContainer
private

Definition at line 46 of file jFEXLargeRJetAlgo.h.

◆ m_jTowerContainerKey

SG::ReadHandleKey<LVL1::jTowerContainer> LVL1::jFEXLargeRJetAlgo::m_jTowerContainerKey {this, "MyjTowers", "jTowerContainer", "Input container for jTowers"}
private

Definition at line 45 of file jFEXLargeRJetAlgo.h.

45{this, "MyjTowers", "jTowerContainer", "Input container for jTowers"};

◆ m_largeRJetEtRing_IDs

int LVL1::jFEXLargeRJetAlgo::m_largeRJetEtRing_IDs[15][15]
private

Definition at line 51 of file jFEXLargeRJetAlgo.h.

◆ m_map_Etvalues

std::unordered_map<int,std::vector<int> > LVL1::jFEXLargeRJetAlgo::m_map_Etvalues
private

Definition at line 53 of file jFEXLargeRJetAlgo.h.

◆ m_saturation

bool LVL1::jFEXLargeRJetAlgo::m_saturation =false
private

Definition at line 50 of file jFEXLargeRJetAlgo.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


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