ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigHypothesis
TrigHypoCommonTools
src
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
5
#include "
TrigGenericHypoTool.h
"
6
#include "
StoreGate/ReadDecorHandle.h
"
7
8
TrigGenericHypoTool::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
13
StatusCode
TrigGenericHypoTool::initialize
(){
14
15
ATH_CHECK
(
m_passKey
.initialize());
16
return
StatusCode::SUCCESS;
17
}
18
19
20
StatusCode
TrigGenericHypoTool::decide
(
const
std::vector<TrigGenericHypoTool::HypoToolInfo>& input)
const
{
21
ATH_MSG_DEBUG
(
"Executing decide() of "
<< name());
22
23
SG::ReadDecorHandle<xAOD::TrigCompositeContainer, int>
trigCompositePassed(
m_passKey
);
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
}
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x,...)
Definition
AthMsgStreamMacros.h:43
ReadDecorHandle.h
Handle class for reading a decoration on an object.
TrigGenericHypoTool.h
AthAlgTool
Definition
AthAlgTool.h:26
SG::ReadDecorHandle
Handle class for reading a decoration on an object.
Definition
StoreGate/StoreGate/ReadDecorHandle.h:94
TrigGenericHypoTool::decide
StatusCode decide(const std::vector< HypoToolInfo > &input) const
Definition
TrigGenericHypoTool.cxx:20
TrigGenericHypoTool::m_decisionId
HLT::Identifier m_decisionId
Definition
TrigGenericHypoTool.h:36
TrigGenericHypoTool::TrigGenericHypoTool
TrigGenericHypoTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition
TrigGenericHypoTool.cxx:8
TrigGenericHypoTool::m_passKey
SG::ReadDecorHandleKey< xAOD::TrigCompositeContainer > m_passKey
Definition
TrigGenericHypoTool.h:37
TrigGenericHypoTool::initialize
virtual StatusCode initialize() override
Definition
TrigGenericHypoTool.cxx:13
HLT
It used to be useful piece of code for replacing actual SG with other store of similar functionality ...
Definition
HLTResultReader.h:26
Identifier
Definition
IdentifierFieldParser.cxx:14
TrigCompositeUtils::passed
bool passed(DecisionID id, const DecisionIDContainer &idSet)
checks if required decision ID is in the set of IDs in the container
Definition
TrigCompositeUtilsRoot.cxx:118
TrigCompositeUtils::addDecisionID
void addDecisionID(DecisionID id, Decision *d)
Appends the decision (given as ID) to the decision object.
Definition
TrigCompositeUtilsRoot.cxx:59
type
TrigGenericHypoTool::HypoToolInfo
Definition
TrigGenericHypoTool.h:17
Generated on
for ATLAS Offline Software by
1.17.0