ATLAS Offline Software
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 
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 
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 
60  return m_decisionId;
61 }
62 
TrigStreamerHypoTool::~TrigStreamerHypoTool
virtual ~TrigStreamerHypoTool()
Definition: TrigStreamerHypoTool.cxx:23
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:117
TrigCompositeUtils::addDecisionID
void addDecisionID(DecisionID id, Decision *d)
Appends the decision (given as ID) to the decision object.
Definition: TrigCompositeUtilsRoot.cxx:61
TrigStreamerHypoTool::getId
virtual const HLT::Identifier & getId() const override
Definition: TrigStreamerHypoTool.cxx:59
XMLtoHeader.count
count
Definition: XMLtoHeader.py:85
TrigStreamerHypoTool::initialize
virtual StatusCode initialize() override
Definition: TrigStreamerHypoTool.cxx:26
HLT
It used to be useful piece of code for replacing actual SG with other store of similar functionality ...
Definition: HLTResultReader.h:26
TrigStreamerHypoTool::TrigStreamerHypoTool
TrigStreamerHypoTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: TrigStreamerHypoTool.cxx:16
ITrigStreamerHypoTool::HypoInfo
Definition: ITrigStreamerHypoTool.h:19
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TrigStreamerHypoTool::m_decisionId
HLT::Identifier m_decisionId
Definition: TrigStreamerHypoTool.h:45
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
TrigStreamerHypoTool.h
TrigStreamerHypoTool::decide
virtual StatusCode decide(std::vector< ITrigStreamerHypoTool::HypoInfo > &hypoInfo) const override
Definition: TrigStreamerHypoTool.cxx:35
test_pyathena.parent
parent
Definition: test_pyathena.py:15
HLT::Identifier
Definition: TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h:20
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
TrigStreamerHypoTool::finalize
virtual StatusCode finalize() override
Definition: TrigStreamerHypoTool.cxx:31
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
TrigStreamerHypoTool::m_pass
Gaudi::Property< bool > m_pass
Definition: TrigStreamerHypoTool.h:46
Identifier
Definition: IdentifierFieldParser.cxx:14