ATLAS Offline Software
Loading...
Searching...
No Matches
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
6
7
9 ATH_CHECK( m_decisionsKey.initialize() );
11 return StatusCode::SUCCESS;
12}
13
14void DecisionCollectorTool::getSequencesNames( std::set<std::string>& output ) const {
15 for (const auto& decisionKey: m_decisionsKey) {
16 output.insert(decisionKey.key());
17 }
18}
19
20namespace {
21 // Helper to avoid code duplication
23 std::vector<TrigCompositeUtils::DecisionID>& output) {
24 for ( const TrigCompositeUtils::Decision* d : *handle.cptr() ) {
25 output.insert( output.end(),
28 }
29 }
30}
31
32void 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
42void 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}
#define ATH_CHECK
Evaluate an expression and check for errors.
void renounceArray(SG::VarHandleKeyArray &handlesArray)
virtual StatusCode initialize() override
SG::ReadHandleKeyArray< TrigCompositeUtils::DecisionContainer > m_decisionsKey
void getSequencesNames(std::set< std::string > &) const
Get configured sequence names.
void getDecisions(std::vector< TrigCompositeUtils::DecisionID > &, const EventContext &) const
Get decision IDs for the current event.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const_pointer_type cptr()
Dereference the pointer.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
void decisionIDs(const Decision *d, DecisionIDContainer &destination)
Extracts DecisionIDs stored in the Decision object.