ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigHypothesis
TrigEgammaHypo
src
TrigEgammaTLAPhotonHypoTool.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
#include "
TrigEgammaTLAPhotonHypoTool.h
"
5
6
#include "
TrigCompositeUtils/HLTIdentifier.h
"
7
#include "
TrigCompositeUtils/TrigCompositeUtils.h
"
8
#include "
xAODTrigger/TrigCompositeContainer.h
"
9
10
using
TrigCompositeUtils::DecisionID
;
11
using
TrigCompositeUtils::Decision
;
12
using
TrigCompositeUtils::DecisionContainer
;
13
using
TrigCompositeUtils::DecisionIDContainer
;
14
using
TrigCompositeUtils::decisionIDs
;
15
16
TrigEgammaTLAPhotonHypoTool::TrigEgammaTLAPhotonHypoTool
(
const
std::string&
type
,
const
std::string& name,
const
IInterface* parent):
17
AthAlgTool
(
type
, name, parent),
18
m_decisionId
(
HLT
::
Identifier
::fromToolName(name))
19
{}
20
21
TrigEgammaTLAPhotonHypoTool::~TrigEgammaTLAPhotonHypoTool
() {}
22
23
StatusCode
TrigEgammaTLAPhotonHypoTool::initialize
()
24
{
25
return
StatusCode::SUCCESS;
26
}
27
28
StatusCode
TrigEgammaTLAPhotonHypoTool::finalize
()
29
{
30
return
StatusCode::SUCCESS;
31
}
32
33
StatusCode
TrigEgammaTLAPhotonHypoTool::decide
(
TrigCompositeUtils::DecisionContainer
* outputDecisions)
const
34
{
35
36
for
(
auto
decision : *outputDecisions )
37
{
38
// creates container of Decision identifiers that will be filled with the previous decisions attached to the object
39
DecisionIDContainer
previousDecisionIDs;
40
// not sure whtat this does
41
const
auto
previousDecisionEL =
TrigCompositeUtils::getLinkToPrevious
(decision).at(0);
42
decisionIDs
(*previousDecisionEL, previousDecisionIDs);
43
// if we are sure that there is only one decision added by the parent HypoAlg (it should be), then checking that count > 0
44
// is equivalent to checking if the previous decision was positive-NO
45
// checks that the decision corresponding to the chain name is positive? uff
46
if
(previousDecisionIDs.count(
m_decisionId
.numeric()) > 0)
47
{
48
TrigCompositeUtils::addDecisionID
(
getId
().numeric(), decision );
49
}
50
}
51
return
StatusCode::SUCCESS;
52
53
}
54
55
const
HLT::Identifier
&
TrigEgammaTLAPhotonHypoTool::getId
()
const
{
56
return
m_decisionId
;
57
}
decisionIDs
void decisionIDs(const Decision *d, DecisionIDContainer &id)
Extracts DecisionIDs stored in the Decision object.
Definition
TrigCompositeUtilsRoot.cxx:65
TrigCompositeContainer.h
HLTIdentifier.h
TrigCompositeUtils.h
TrigEgammaTLAPhotonHypoTool.h
AthAlgTool::AthAlgTool
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Definition
AthAlgTool.cxx:16
HLT::Identifier
Definition
TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h:19
TrigEgammaTLAPhotonHypoTool::TrigEgammaTLAPhotonHypoTool
TrigEgammaTLAPhotonHypoTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition
TrigEgammaTLAPhotonHypoTool.cxx:16
TrigEgammaTLAPhotonHypoTool::finalize
StatusCode finalize()
Definition
TrigEgammaTLAPhotonHypoTool.cxx:28
TrigEgammaTLAPhotonHypoTool::initialize
StatusCode initialize()
Definition
TrigEgammaTLAPhotonHypoTool.cxx:23
TrigEgammaTLAPhotonHypoTool::getId
const HLT::Identifier & getId() const
Definition
TrigEgammaTLAPhotonHypoTool.cxx:55
TrigEgammaTLAPhotonHypoTool::m_decisionId
HLT::Identifier m_decisionId
Definition
TrigEgammaTLAPhotonHypoTool.h:31
TrigEgammaTLAPhotonHypoTool::decide
StatusCode decide(TrigCompositeUtils::DecisionContainer *decisionContainer) const
Definition
TrigEgammaTLAPhotonHypoTool.cxx:33
TrigEgammaTLAPhotonHypoTool::~TrigEgammaTLAPhotonHypoTool
~TrigEgammaTLAPhotonHypoTool()
Definition
TrigEgammaTLAPhotonHypoTool.cxx:21
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::DecisionID
unsigned int DecisionID
Definition
TrigComposite_v1.h:27
TrigCompositeUtils::Decision
xAOD::TrigComposite Decision
Definition
TrigComposite.h:20
TrigCompositeUtils::getLinkToPrevious
const std::vector< ElementLink< DecisionContainer > > getLinkToPrevious(const Decision *d)
returns links to previous decision object 'seed'
Definition
TrigCompositeUtilsRoot.cxx:157
TrigCompositeUtils::DecisionIDContainer
std::set< DecisionID > DecisionIDContainer
Definition
TrigComposite_v1.h:28
TrigCompositeUtils::DecisionContainer
xAOD::TrigCompositeContainer DecisionContainer
Definition
TrigCompositeContainer.h:21
TrigCompositeUtils::addDecisionID
void addDecisionID(DecisionID id, Decision *d)
Appends the decision (given as ID) to the decision object.
Definition
TrigCompositeUtilsRoot.cxx:59
TrigCompositeUtils::decisionIDs
void decisionIDs(const Decision *d, DecisionIDContainer &destination)
Extracts DecisionIDs stored in the Decision object.
Definition
TrigCompositeUtilsRoot.cxx:65
type
Generated on
for ATLAS Offline Software by
1.17.0