ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigSteer
DecisionHandling
src
ViewCreatorNamedROITool.cxx
Go to the documentation of this file.
1
2
/*
3
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
4
*/
5
6
#include "
TrigSteeringEvent/TrigRoiDescriptorCollection.h
"
7
#include "
ViewCreatorNamedROITool.h
"
8
9
using namespace
TrigCompositeUtils
;
10
11
ViewCreatorNamedROITool::ViewCreatorNamedROITool
(
const
std::string&
type
,
const
std::string& name,
const
IInterface* parent)
12
: base_class(
type
, name, parent)
13
{}
14
15
StatusCode
ViewCreatorNamedROITool::attachROILinks
(
TrigCompositeUtils::DecisionContainer
& decisions,
const
EventContext& ctx)
const
{
16
// Locate "NamedRoI" for each Decision object, re-attach the ElementLink as "roi" to the current Decision object.
17
for
(
Decision
* outputDecision : decisions ) {
18
const
std::vector<LinkInfo<TrigRoiDescriptorCollection>> myROI =
findLinks<TrigRoiDescriptorCollection>
(ctx, outputDecision,
m_roiLinkName
,
TrigDefs::lastFeatureOfType
);
19
20
if
(myROI.size() != 1) {
21
ATH_MSG_ERROR
(
"Did not find exactly one '"
<<
m_roiLinkName
<<
"' for Decision object index "
<< outputDecision->index()
22
<<
", found "
<< myROI.size() <<
". Unable to supply single ROI to spawn EventView on."
);
23
}
24
25
outputDecision->setObjectLink(
roiString
(), myROI.at(0).link);
26
}
27
return
StatusCode::SUCCESS;
28
}
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition
AthMsgStreamMacros.h:33
TrigRoiDescriptorCollection.h
ViewCreatorNamedROITool.h
ViewCreatorNamedROITool::m_roiLinkName
Gaudi::Property< std::string > m_roiLinkName
Definition
ViewCreatorNamedROITool.h:30
ViewCreatorNamedROITool::attachROILinks
virtual StatusCode attachROILinks(TrigCompositeUtils::DecisionContainer &decisions, const EventContext &ctx) const override
Tool interface method.
Definition
ViewCreatorNamedROITool.cxx:15
ViewCreatorNamedROITool::ViewCreatorNamedROITool
ViewCreatorNamedROITool(const std::string &type, const std::string &name, const IInterface *parent)
Definition
ViewCreatorNamedROITool.cxx:11
TrigCompositeUtils
Definition
TrigComposite.h:19
TrigCompositeUtils::Decision
xAOD::TrigComposite Decision
Definition
TrigComposite.h:20
TrigCompositeUtils::roiString
const std::string & roiString()
Definition
TrigCompositeUtils.h:420
TrigCompositeUtils::findLinks
void findLinks(const EventContext &ctx, const Decision *start, const std::string &linkName, std::vector< LinkInfo< T > > &links, unsigned int behaviour=TrigDefs::allFeaturesOfType, std::set< const xAOD::TrigComposite * > *fullyExploredFrom=nullptr)
search back the TC links for the object of type T linked to the one of TC (recursively) Populates pro...
TrigCompositeUtils::DecisionContainer
xAOD::TrigCompositeContainer DecisionContainer
Definition
TrigCompositeContainer.h:21
TrigDefs::lastFeatureOfType
static const unsigned int lastFeatureOfType
Run 3 "enum". Only return the final feature along each route through the navigation.
Definition
TrigEvent/TrigDecisionInterface/TrigDecisionInterface/Conditions.h:68
type
Generated on
for ATLAS Offline Software by
1.17.0