ATLAS Offline Software
TrigEgammaTLAPhotonHypoTool.cxx
Go to the documentation of this file.
1 /*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
5 #include "GaudiKernel/StatusCode.h"
6 
10 
16 
17 TrigEgammaTLAPhotonHypoTool::TrigEgammaTLAPhotonHypoTool(const std::string& type, const std::string& name, const IInterface* parent):
19  m_decisionId(HLT::Identifier::fromToolName(name))
20  {}
21 
23 
25 {
26  return StatusCode::SUCCESS;
27 }
28 
30 {
31  return StatusCode::SUCCESS;
32 }
33 
35 {
36 
37  for (auto decision : *outputDecisions )
38  {
39  // creates container of Decision identifiers that will be filled with the previous decisions attached to the object
40  DecisionIDContainer previousDecisionIDs;
41  // not sure whtat this does
42  const auto previousDecisionEL = TrigCompositeUtils::getLinkToPrevious(decision).at(0);
43  decisionIDs(*previousDecisionEL, previousDecisionIDs);
44  // if we are sure that there is only one decision added by the parent HypoAlg (it should be), then checking that count > 0
45  // is equivalent to checking if the previous decision was positive-NO
46  // checks that the decision corresponding to the chain name is positive? uff
47  if (previousDecisionIDs.count( m_decisionId.numeric()) > 0)
48  {
49  TrigCompositeUtils::addDecisionID(getId().numeric(), decision );
50  }
51  }
52  return StatusCode::SUCCESS;
53 
54 }
55 
57  return m_decisionId;
58 }
TrigCompositeUtils::DecisionID
unsigned int DecisionID
Definition: TrigComposite_v1.h:27
TrigCompositeUtils::DecisionContainer
xAOD::TrigCompositeContainer DecisionContainer
Definition: Event/xAOD/xAODTrigger/xAODTrigger/TrigCompositeContainer.h:21
TrigCompositeUtils.h
HLT::Identifier::numeric
TrigCompositeUtils::DecisionID numeric() const
numeric ID
Definition: TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h:47
TrigCompositeUtils::addDecisionID
void addDecisionID(DecisionID id, Decision *d)
Appends the decision (given as ID) to the decision object.
Definition: TrigCompositeUtilsRoot.cxx:61
TrigEgammaTLAPhotonHypoTool::decide
StatusCode decide(TrigCompositeUtils::DecisionContainer *decisionContainer) const
Definition: TrigEgammaTLAPhotonHypoTool.cxx:34
TrigEgammaTLAPhotonHypoTool.h
HLT
It used to be useful piece of code for replacing actual SG with other store of similar functionality ...
Definition: HLTResultReader.h:26
TrigCompositeUtils::getLinkToPrevious
const std::vector< ElementLink< DecisionContainer > > getLinkToPrevious(const Decision *d)
returns links to previous decision object 'seed'
Definition: TrigCompositeUtilsRoot.cxx:156
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
test_pyathena.parent
parent
Definition: test_pyathena.py:15
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
HLT::Identifier
Definition: TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h:20
TrigCompositeContainer.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
TrigCompositeUtils::Decision
xAOD::TrigComposite Decision
Definition: Event/xAOD/xAODTrigger/xAODTrigger/TrigComposite.h:20
TrigEgammaTLAPhotonHypoTool::finalize
StatusCode finalize()
Definition: TrigEgammaTLAPhotonHypoTool.cxx:29
TrigEgammaTLAPhotonHypoTool::initialize
StatusCode initialize()
Definition: TrigEgammaTLAPhotonHypoTool.cxx:24
TrigCompositeUtils::DecisionIDContainer
std::set< DecisionID > DecisionIDContainer
Definition: TrigComposite_v1.h:28
TrigEgammaTLAPhotonHypoTool::getId
const HLT::Identifier & getId() const
Definition: TrigEgammaTLAPhotonHypoTool.cxx:56
TrigEgammaTLAPhotonHypoTool::~TrigEgammaTLAPhotonHypoTool
~TrigEgammaTLAPhotonHypoTool()
Definition: TrigEgammaTLAPhotonHypoTool.cxx:22
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
HLTIdentifier.h
TrigCompositeUtils::decisionIDs
void decisionIDs(const Decision *d, DecisionIDContainer &destination)
Extracts DecisionIDs stored in the Decision object.
Definition: TrigCompositeUtilsRoot.cxx:67
TrigEgammaTLAPhotonHypoTool::m_decisionId
HLT::Identifier m_decisionId
Definition: TrigEgammaTLAPhotonHypoTool.h:31
AthAlgTool
Definition: AthAlgTool.h:26
TrigEgammaTLAPhotonHypoTool::TrigEgammaTLAPhotonHypoTool
TrigEgammaTLAPhotonHypoTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: TrigEgammaTLAPhotonHypoTool.cxx:17