ATLAS Offline Software
Loading...
Searching...
No Matches
TrigGenericHypoTool.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
7
8TrigGenericHypoTool::TrigGenericHypoTool(const std::string& type, const std::string& name, const IInterface* parent) :
9 AthAlgTool(type, name, parent),
10 m_decisionId(HLT::Identifier::fromToolName(name)) {}
11
12
14
15 ATH_CHECK(m_passKey.initialize());
16 return StatusCode::SUCCESS;
17}
18
19
20StatusCode TrigGenericHypoTool::decide(const std::vector<TrigGenericHypoTool::HypoToolInfo>& input) const{
21 ATH_MSG_DEBUG("Executing decide() of " << name());
22
24
25 for ( const TrigGenericHypoTool::HypoToolInfo& hypoInfo : input ) {
26 if ( TrigCompositeUtils::passed( m_decisionId.numeric(), hypoInfo.previousDecisionIDs ) ) {
27 int decisionPassed = trigCompositePassed(*hypoInfo.trigComp);
28 if (decisionPassed==1) {
29 TrigCompositeUtils::addDecisionID( m_decisionId.numeric(), hypoInfo.decision );
30 }
31 }
32 }
33
34 return StatusCode::SUCCESS;
35}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x)
Handle class for reading a decoration on an object.
Handle class for reading a decoration on an object.
StatusCode decide(const std::vector< HypoToolInfo > &input) const
HLT::Identifier m_decisionId
TrigGenericHypoTool(const std::string &type, const std::string &name, const IInterface *parent)
SG::ReadDecorHandleKey< xAOD::TrigCompositeContainer > m_passKey
virtual StatusCode initialize() override
It used to be useful piece of code for replacing actual SG with other store of similar functionality ...
bool passed(DecisionID id, const DecisionIDContainer &idSet)
checks if required decision ID is in the set of IDs in the container
void addDecisionID(DecisionID id, Decision *d)
Appends the decision (given as ID) to the decision object.