Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
atlas
athena
Commits
225cf434
Commit
225cf434
authored
Sep 08, 2021
by
Sergi Rodriguez Bosca
Browse files
Changing eFEX FindTower function and eTowerContainer map
parent
70aaa42f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Trigger/TrigT1/L1CaloFEX/L1CaloFEXSim/L1CaloFEXSim/eTowerContainer.h
View file @
225cf434
...
...
@@ -27,6 +27,8 @@
#include "CxxUtils/CachedValue.h"
#include "AthLinks/tools/findInContainer.h"
#include <unordered_map>
namespace
LVL1
{
class
eTowerContainer
:
public
DataVector
<
LVL1
::
eTower
>
...
...
@@ -74,7 +76,7 @@ class eTowerContainer : public DataVector<LVL1::eTower>
IMessageSvc
*
msgSvc
()
const
;
//* @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
;
};
}
...
...
Trigger/TrigT1/L1CaloFEX/L1CaloFEXSim/src/eTowerContainer.cxx
View file @
225cf434
...
...
@@ -29,24 +29,24 @@ void eTowerContainer::print() const {
}
const
LVL1
::
eTower
*
eTowerContainer
::
findTower
(
int
towerID
)
const
{
int
container_index
=
-
1
;
container_index
=
m_map_towerID_containerIndex
.
find
(
towerID
)
->
second
;
if
(
container_index
>=
0
){
const
LVL1
::
eTower
*
eTowerContainer
::
findTower
(
int
towerID
)
const
{
const
auto
it
=
m_map_towerID_containerIndex
.
find
(
towerID
);
const
int
container_index
=
it
->
second
;
if
(
container_index
<
0
)
{
return
nullptr
;
}
return
(
*
this
)[
container_index
];
}
return
nullptr
;
}
LVL1
::
eTower
*
eTowerContainer
::
findTower
(
int
towerID
)
{
int
container_index
=
-
1
;
container_index
=
m_map_towerID_containerIndex
.
find
(
towerID
)
->
second
;
if
(
container_index
>=
0
){
LVL1
::
eTower
*
eTowerContainer
::
findTower
(
int
towerID
){
const
auto
it
=
m_map_towerID_containerIndex
.
find
(
towerID
);
const
int
container_index
=
it
->
second
;
if
(
container_index
<
0
)
{
return
nullptr
;
}
return
(
*
this
)[
container_index
];
}
return
nullptr
;
}
void
eTowerContainer
::
clearContainerMap
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment