ATLAS Offline Software
Loading...
Searching...
No Matches
ViewCreatorNamedROITool Class Reference

Basic ROI provider tool which retrieves and re-attaches an existing named ElementLink. More...

#include <ViewCreatorNamedROITool.h>

Inheritance diagram for ViewCreatorNamedROITool:
Collaboration diagram for ViewCreatorNamedROITool:

Public Member Functions

 ViewCreatorNamedROITool (const std::string &type, const std::string &name, const IInterface *parent)
virtual ~ViewCreatorNamedROITool ()=default
virtual StatusCode attachROILinks (TrigCompositeUtils::DecisionContainer &decisions, const EventContext &ctx) const override
 Tool interface method.

Public Attributes

Gaudi::Property< std::string > m_roiLinkName

Detailed Description

Basic ROI provider tool which retrieves and re-attaches an existing named ElementLink.

Every Decision object in decisions must have a single most-recent element link with name configured via "ROILinkName" property

Definition at line 18 of file ViewCreatorNamedROITool.h.

Constructor & Destructor Documentation

◆ ViewCreatorNamedROITool()

ViewCreatorNamedROITool::ViewCreatorNamedROITool ( const std::string & type,
const std::string & name,
const IInterface * parent )

Definition at line 11 of file ViewCreatorNamedROITool.cxx.

12 : base_class(type, name, parent)
13 {}

◆ ~ViewCreatorNamedROITool()

virtual ViewCreatorNamedROITool::~ViewCreatorNamedROITool ( )
virtualdefault

Member Function Documentation

◆ attachROILinks()

StatusCode ViewCreatorNamedROITool::attachROILinks ( TrigCompositeUtils::DecisionContainer & decisions,
const EventContext & ctx ) const
overridevirtual

Tool interface method.

Context not used in this tool implementation.

Definition at line 15 of file ViewCreatorNamedROITool.cxx.

15 {
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>(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}
#define ATH_MSG_ERROR(x)
Gaudi::Property< std::string > m_roiLinkName
const std::string & roiString()
void findLinks(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...
static const unsigned int lastFeatureOfType
Run 3 "enum". Only return the final feature along each route through the navigation.

Member Data Documentation

◆ m_roiLinkName

Gaudi::Property< std::string > ViewCreatorNamedROITool::m_roiLinkName
Initial value:
{this,"ROILinkName","UNSPECIFIED",
"Name of linked ROI from a previous step."}

Definition at line 30 of file ViewCreatorNamedROITool.h.

30 {this,"ROILinkName","UNSPECIFIED",
31 "Name of linked ROI from a previous step."};

The documentation for this class was generated from the following files: