ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigEvent
TrigNavStructure
Root
TrigHolderStructure.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
TrigNavStructure/TrigHolderStructure.h
"
6
7
HLT::TrigHolderStructure::TrigHolderStructure
() :
asg
::
AsgMessaging
(
"TrigHolderStructure"
){
8
}
9
10
void
HLT::TrigHolderStructure::reset
(){
11
m_holderByClidAndIndex
.clear();
12
m_lookupLabels
.clear();
13
m_lookupSubIndex
.clear();
14
}
15
16
HLT::BaseHolder
*
HLT::TrigHolderStructure::getBaseHolder
(
class_id_type
clid,
sub_index_type
sti)
const
{
17
if
( sti ==
HLT::invalid_sub_index
){
18
ATH_MSG_DEBUG
(
"requested holder with invalid sub_type_index"
);
19
return
0;
20
}
21
auto
allsti_it =
m_holderByClidAndIndex
.find(clid);
22
if
(allsti_it ==
m_holderByClidAndIndex
.end()){
23
return
0;
24
}
25
auto
sti_holder_map = allsti_it->second;
26
auto
holder_it = sti_holder_map.find(sti);
27
if
(holder_it == sti_holder_map.end()){
28
return
0;
29
}
30
return
holder_it->second.get();
31
}
32
33
34
bool
HLT::TrigHolderStructure::registerHolder
(
const
std::shared_ptr<BaseHolder>& holder){
35
auto
clid = holder->typeClid();
36
auto
subtypeindex = holder->subTypeIndex();
37
const
auto
&
label
= holder->label();
38
39
if
(
getHolder
(clid,subtypeindex)){
40
ATH_MSG_WARNING
(
"we already have a holder like this! clid:"
<< clid <<
" subtypeIndex: "
<< subtypeindex <<
" label: "
<<
label
);
41
return
false
;
42
}
43
44
m_holderByClidAndIndex
[clid][subtypeindex] = holder;
45
m_lookupLabels
[clid][subtypeindex] =
label
;
46
m_lookupSubIndex
[clid][
label
] = subtypeindex;
47
48
return
true
;
49
}
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition
AthMsgStreamMacros.h:32
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
TrigHolderStructure.h
HLT::BaseHolder
Definition
BaseHolder.h:14
HLT::TrigHolderStructure::getBaseHolder
BaseHolder * getBaseHolder(class_id_type clid, sub_index_type sti) const
Definition
TrigHolderStructure.cxx:16
HLT::TrigHolderStructure::m_lookupLabels
std::map< class_id_type, SubIndexToLabelMap > m_lookupLabels
Definition
TrigHolderStructure.h:118
HLT::TrigHolderStructure::reset
void reset()
Definition
TrigHolderStructure.cxx:10
HLT::TrigHolderStructure::getHolder
HolderType * getHolder(class_id_type clid, const std::variant< sub_index_type, std::string > &stiOrLabel) const
Definition
TrigHolderStructure.h:30
HLT::TrigHolderStructure::m_lookupSubIndex
std::map< class_id_type, LabelToSubIndexMap > m_lookupSubIndex
Definition
TrigHolderStructure.h:119
HLT::TrigHolderStructure::registerHolder
bool registerHolder(const std::shared_ptr< BaseHolder > &holder)
Definition
TrigHolderStructure.cxx:34
HLT::TrigHolderStructure::TrigHolderStructure
TrigHolderStructure()
Definition
TrigHolderStructure.cxx:7
HLT::TrigHolderStructure::m_holderByClidAndIndex
std::map< class_id_type, IndexToHolderMap > m_holderByClidAndIndex
Definition
TrigHolderStructure.h:116
asg::AsgMessaging::AsgMessaging
AsgMessaging(const std::string &name)
Constructor with a name.
Definition
AsgMessaging.cxx:17
label
std::string label(const std::string &format, int i)
Definition
label.h:19
HLT::sub_index_type
uint16_t sub_index_type
Definition
Trigger/TrigEvent/TrigNavStructure/Root/Types.h:9
HLT::class_id_type
uint32_t class_id_type
Definition
Trigger/TrigEvent/TrigNavStructure/Root/Types.h:11
HLT::invalid_sub_index
static const index_type invalid_sub_index
Definition
Trigger/TrigEvent/TrigNavStructure/Root/Types.h:16
asg
Definition
DataHandleTestTool.h:28
Generated on
for ATLAS Offline Software by
1.17.0