ATLAS Offline Software
Loading...
Searching...
No Matches
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
14
15
17 const std::string& name,
18 const IInterface* parent):
19 base_class(type, name, parent),
20 m_decisionId(HLT::Identifier::fromToolName(name)) {}
21
22
24
25
27 ATH_MSG_DEBUG("Initializing TrigStreamerHypoTool for " << name());
28 return StatusCode::SUCCESS;
29}
30
32 return StatusCode::SUCCESS;
33}
34
35StatusCode 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
62
#define ATH_MSG_DEBUG(x)
Gaudi::Property< bool > m_pass
virtual const HLT::Identifier & getId() const override
virtual StatusCode initialize() override
TrigStreamerHypoTool(const std::string &type, const std::string &name, const IInterface *parent)
virtual StatusCode finalize() override
virtual StatusCode decide(std::vector< ITrigStreamerHypoTool::HypoInfo > &hypoInfo) const override
int count(std::string s, const std::string &regx)
count how many occurances of a regx are in a string
Definition hcg.cxx:146
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.