ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigHypothesis
TrigStreamerHypo
src
TrigStreamerHypoTool.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
// ********************************************************************
6
//
7
// NAME: TrigStreamerHypoTool.cxx
8
// PACKAGE: Trigger/TrigHypothesis/TrigStreamer
9
//
10
//
11
// ********************************************************************
12
13
#include "
TrigStreamerHypoTool.h
"
14
15
16
TrigStreamerHypoTool::TrigStreamerHypoTool
(
const
std::string&
type
,
17
const
std::string& name,
18
const
IInterface* parent):
19
base_class(
type
, name, parent),
20
m_decisionId
(
HLT
::
Identifier
::fromToolName(name)) {}
21
22
23
TrigStreamerHypoTool::~TrigStreamerHypoTool
() {}
24
25
26
StatusCode
TrigStreamerHypoTool::initialize
() {
27
ATH_MSG_DEBUG
(
"Initializing TrigStreamerHypoTool for "
<< name());
28
return
StatusCode::SUCCESS;
29
}
30
31
StatusCode
TrigStreamerHypoTool::finalize
() {
32
return
StatusCode::SUCCESS;
33
}
34
35
StatusCode
TrigStreamerHypoTool::decide
(std::vector<ITrigStreamerHypoTool::HypoInfo>& hypoInfo)
const
36
{
37
ATH_MSG_DEBUG
(
"Executing decide() of "
<< name() <<
" over "
<< hypoInfo.size() <<
" Decision Objects"
);
38
if
( not
m_pass
) {
39
ATH_MSG_DEBUG
(
"Pass option is false, rejecting"
);
40
return
StatusCode::SUCCESS;
41
}
42
size_t
count
= 0;
43
for
(
ITrigStreamerHypoTool::HypoInfo
& hi : hypoInfo) {
44
// Perform logic-flow check (this HypoTool can only accept the chain if the chain was active also in the previous decision object)
45
if
(
TrigCompositeUtils::passed
(
getId
().numeric(), hi.m_previousDecisionIDs)) {
46
// There is no other pass/fail logic - this is a streamer, we accept unconditionally
47
ATH_MSG_DEBUG
(
"Decision Object at index "
<<
count
<<
" Passed previous trigger step, passing here too."
);
48
TrigCompositeUtils::addDecisionID
(
getId
().numeric(), hi.m_newDecision);
49
}
else
{
50
ATH_MSG_DEBUG
(
"Decision Object at index "
<<
count
<<
" didn't pass previous trigger step. Cannot be accepted here."
);
51
}
52
++
count
;
53
}
54
55
return
StatusCode::SUCCESS;
56
57
}
58
59
const
HLT::Identifier
&
TrigStreamerHypoTool::getId
()
const
{
60
return
m_decisionId
;
61
}
62
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
TrigStreamerHypoTool.h
HLT::Identifier
Definition
TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h:19
TrigStreamerHypoTool::m_pass
Gaudi::Property< bool > m_pass
Definition
TrigStreamerHypoTool.h:40
TrigStreamerHypoTool::m_decisionId
HLT::Identifier m_decisionId
Definition
TrigStreamerHypoTool.h:39
TrigStreamerHypoTool::getId
virtual const HLT::Identifier & getId() const override
Definition
TrigStreamerHypoTool.cxx:59
TrigStreamerHypoTool::initialize
virtual StatusCode initialize() override
Definition
TrigStreamerHypoTool.cxx:26
TrigStreamerHypoTool::TrigStreamerHypoTool
TrigStreamerHypoTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition
TrigStreamerHypoTool.cxx:16
TrigStreamerHypoTool::finalize
virtual StatusCode finalize() override
Definition
TrigStreamerHypoTool.cxx:31
TrigStreamerHypoTool::decide
virtual StatusCode decide(std::vector< ITrigStreamerHypoTool::HypoInfo > &hypoInfo) const override
Definition
TrigStreamerHypoTool.cxx:35
TrigStreamerHypoTool::~TrigStreamerHypoTool
virtual ~TrigStreamerHypoTool()
Definition
TrigStreamerHypoTool.cxx:23
count
int count(std::string s, const std::string ®x)
count how many occurances of a regx are in a string
Definition
hcg.cxx:148
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
ITrigStreamerHypoTool::HypoInfo
Definition
ITrigStreamerHypoTool.h:19
Generated on
for ATLAS Offline Software by
1.17.0