ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigMonitoring
TrigSteerMonitor
src
DecisionCollectorTool.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 "
DecisionCollectorTool.h
"
6
7
8
StatusCode
DecisionCollectorTool::initialize
() {
9
ATH_CHECK
(
m_decisionsKey
.initialize() );
10
renounceArray
(
m_decisionsKey
);
11
return
StatusCode::SUCCESS;
12
}
13
14
void
DecisionCollectorTool::getSequencesNames
( std::set<std::string>& output )
const
{
15
for
(
const
auto
& decisionKey:
m_decisionsKey
) {
16
output.insert(decisionKey.key());
17
}
18
}
19
20
namespace
{
21
// Helper to avoid code duplication
22
void
fillDecisions(
SG::ReadHandle<TrigCompositeUtils::DecisionContainer>
& handle,
23
std::vector<TrigCompositeUtils::DecisionID>& output) {
24
for
(
const
TrigCompositeUtils::Decision
* d : *handle.cptr() ) {
25
output.insert( output.end(),
26
TrigCompositeUtils::decisionIDs
( d ).begin(),
27
TrigCompositeUtils::decisionIDs
( d ).end() );
28
}
29
}
30
}
31
32
void
DecisionCollectorTool::getDecisions
( std::vector<TrigCompositeUtils::DecisionID>& output,
33
const
EventContext& ctx )
const
{
34
for
(
const
auto
& decisionKey:
m_decisionsKey
) {
35
auto
handle =
SG::makeHandle
( decisionKey, ctx );
36
if
( handle.isValid() ) {
37
fillDecisions(handle, output);
38
}
39
}
40
}
41
42
void
DecisionCollectorTool::getDecisions
( std::vector<TrigCompositeUtils::DecisionID>& decisions,
43
std::set<std::string>& sequences,
44
const
EventContext& ctx )
const
{
45
for
(
const
auto
& decisionKey:
m_decisionsKey
) {
46
auto
handle =
SG::makeHandle
( decisionKey, ctx );
47
if
( handle.isValid() ) {
48
fillDecisions(handle, decisions);
49
sequences.insert(decisionKey.key());
50
}
51
}
52
}
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
DecisionCollectorTool.h
AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray
void renounceArray(SG::VarHandleKeyArray &handlesArray)
Definition
AthCommonDataStore.h:364
DecisionCollectorTool::initialize
virtual StatusCode initialize() override
Definition
DecisionCollectorTool.cxx:8
DecisionCollectorTool::m_decisionsKey
SG::ReadHandleKeyArray< TrigCompositeUtils::DecisionContainer > m_decisionsKey
Definition
DecisionCollectorTool.h:33
DecisionCollectorTool::getSequencesNames
void getSequencesNames(std::set< std::string > &) const
Get configured sequence names.
Definition
DecisionCollectorTool.cxx:14
DecisionCollectorTool::getDecisions
void getDecisions(std::vector< TrigCompositeUtils::DecisionID > &, const EventContext &) const
Get decision IDs for the current event.
Definition
DecisionCollectorTool.cxx:32
SG::ReadHandle
Definition
StoreGate/StoreGate/ReadHandle.h:67
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition
ReadCondHandle.h:269
TrigCompositeUtils::Decision
xAOD::TrigComposite Decision
Definition
TrigComposite.h:20
TrigCompositeUtils::decisionIDs
void decisionIDs(const Decision *d, DecisionIDContainer &destination)
Extracts DecisionIDs stored in the Decision object.
Definition
TrigCompositeUtilsRoot.cxx:65
Generated on
for ATLAS Offline Software by
1.17.0