Skip to content
Snippets Groups Projects
Commit 0ed33e2d authored by Walter Lampl's avatar Walter Lampl
Browse files

Merge branch 'TowerContainer_findTower_bug' into 'master'

Changing eFEX FindTower function and eTowerContainer map

See merge request !46363
parents 4e76d1b7 225cf434
9 merge requests!69091Fix correlated smearing bug in JER in JetUncertainties in 22.0,!58791DataQualityConfigurations: Modify L1Calo config for web display,!51674Fixing hotSpotInHIST for Run3 HIST,!50012RecExConfig: Adjust log message levels from GetRunNumber and GetLBNumber,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!46538Draft: Added missing xAOD::TrigConfKeys from DESDM_MCP,!46514TGC Digitization: Implementation of signal propagation time between the sensor edge and ASD,!46363Changing eFEX FindTower function and eTowerContainer map
...@@ -27,6 +27,8 @@ ...@@ -27,6 +27,8 @@
#include "CxxUtils/CachedValue.h" #include "CxxUtils/CachedValue.h"
#include "AthLinks/tools/findInContainer.h" #include "AthLinks/tools/findInContainer.h"
#include <unordered_map>
namespace LVL1 { namespace LVL1 {
class eTowerContainer : public DataVector<LVL1::eTower> class eTowerContainer : public DataVector<LVL1::eTower>
...@@ -74,7 +76,7 @@ class eTowerContainer : public DataVector<LVL1::eTower> ...@@ -74,7 +76,7 @@ class eTowerContainer : public DataVector<LVL1::eTower>
IMessageSvc* msgSvc() const; IMessageSvc* msgSvc() const;
//* @brief Keeps track of the towerID of each eTower associated to each MAP index *. //* @brief Keeps track of the towerID of each eTower associated to each MAP index *.
std::map<int,int> m_map_towerID_containerIndex; std::unordered_map<int,int> m_map_towerID_containerIndex;
}; };
} }
......
...@@ -29,24 +29,24 @@ void eTowerContainer::print() const { ...@@ -29,24 +29,24 @@ void eTowerContainer::print() const {
} }
const LVL1::eTower * eTowerContainer::findTower(int towerID) const const LVL1::eTower * eTowerContainer::findTower(int towerID) const{
{ const auto it = m_map_towerID_containerIndex.find(towerID);
int container_index = -1;
container_index = m_map_towerID_containerIndex.find(towerID)->second; const int container_index = it->second;
if(container_index >= 0){ if (container_index < 0) {
return nullptr;
}
return (*this)[container_index]; return (*this)[container_index];
}
return nullptr;
} }
LVL1::eTower * eTowerContainer::findTower(int towerID) LVL1::eTower * eTowerContainer::findTower(int towerID){
{ const auto it = m_map_towerID_containerIndex.find(towerID);
int container_index = -1;
container_index = m_map_towerID_containerIndex.find(towerID)->second; const int container_index = it->second;
if(container_index >= 0){ if (container_index < 0) {
return nullptr;
}
return (*this)[container_index]; return (*this)[container_index];
}
return nullptr;
} }
void eTowerContainer::clearContainerMap() void eTowerContainer::clearContainerMap()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment