ATLAS Offline Software
Loading...
Searching...
No Matches
L1InfoHypoTool.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
5#include "L1InfoHypoTool.h"
6
7L1InfoHypoTool::L1InfoHypoTool(const std::string& type, const std::string& name, const IInterface* parent) :
8 base_class(type, name, parent),
9 m_decisionId(HLT::Identifier::fromToolName(name)) {}
10
11
13
14 ATH_CHECK(m_ctpUnpackingTool.retrieve());
15
16 return StatusCode::SUCCESS;
17}
18
19
20StatusCode L1InfoHypoTool::decide(const std::vector<IL1InfoHypoTool::L1Info>& input) const{
21 ATH_MSG_DEBUG("Executing decide() of " << name());
22
23 std::vector<IL1InfoHypoTool::L1Info* > positive( input.size() );
24
25 for ( const IL1InfoHypoTool::L1Info& hypoInfo : input ) {
26 if ( hypoInfo.previousDecisionsIDs.count( m_decisionId.numeric() ) > 0 ) {
27 bool decisionPassed = false;
28 ATH_CHECK(m_ctpUnpackingTool->passBeforePrescaleSelection(hypoInfo.roib, m_l1ItemNames, decisionPassed));
29 if (decisionPassed) {
30 TrigCompositeUtils::addDecisionID( m_decisionId.numeric(), hypoInfo.decision );
31 }
32 }
33 }
34
35 return StatusCode::SUCCESS;
36}
37
39 return m_decisionId;
40}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x)
HLT::Identifier m_decisionId
virtual StatusCode initialize() override
StatusCode decide(const std::vector< IL1InfoHypoTool::L1Info > &input) const override
Gaudi::Property< std::vector< std::string > > m_l1ItemNames
const HLT::Identifier & getId() const override
ToolHandle< ICTPUnpackingTool > m_ctpUnpackingTool
L1InfoHypoTool(const std::string &type, const std::string &name, const IInterface *parent)
It used to be useful piece of code for replacing actual SG with other store of similar functionality ...
void addDecisionID(DecisionID id, Decision *d)
Appends the decision (given as ID) to the decision object.