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

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

#include <ViewCreatorInitialROITool.h>

Inheritance diagram for ViewCreatorInitialROITool:
Collaboration diagram for ViewCreatorInitialROITool:

Public Member Functions

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

Public Attributes

ToolHandle< IRoiUpdaterToolm_roiupdater { this, "RoiUpdater", "", "Roi Updater" }

Detailed Description

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

This implies running the EventView spawned for the Decision object on the ROIDescriptor originating from L1.

Every Decision object in decisions must have a single "initialRoI" element link added at the root of the navigation graph for the Decision object.

This basic tool should be replaced with more advanced slice-specific ones where appropriate.

Definition at line 23 of file ViewCreatorInitialROITool.h.

Constructor & Destructor Documentation

◆ ViewCreatorInitialROITool()

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

Definition at line 11 of file ViewCreatorInitialROITool.cxx.

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

◆ ~ViewCreatorInitialROITool()

virtual ViewCreatorInitialROITool::~ViewCreatorInitialROITool ( )
virtualdefault

Member Function Documentation

◆ attachROILinks()

StatusCode ViewCreatorInitialROITool::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 ViewCreatorInitialROITool.cxx.

15 {
16 // Locate "initialRoI" 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, initialRoIString(), TrigDefs::lastFeatureOfType);
19
20 if (myROI.size() != 1) {
21 ATH_MSG_ERROR("Did not find exactly one '" << initialRoIString() << "' for Decision object index " << outputDecision->index()
22 << ", found " << myROI.size() << ". Unable to supply single ROI to spawn EventView on.");
23 for (const auto& li : myROI) {
24 ATH_MSG_ERROR(" -- " << li.link.dataID() << ":" << li.link.index() << ". Dump:" << *(li.source));
25 }
26 }
27
28 outputDecision->setObjectLink(roiString(), myROI.at(0).link);
29 }
30 return StatusCode::SUCCESS;
31}
#define ATH_MSG_ERROR(x)
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...
const std::string & initialRoIString()
static const unsigned int lastFeatureOfType
Run 3 "enum". Only return the final feature along each route through the navigation.

Member Data Documentation

◆ m_roiupdater

ToolHandle<IRoiUpdaterTool> ViewCreatorInitialROITool::m_roiupdater { this, "RoiUpdater", "", "Roi Updater" }

Definition at line 35 of file ViewCreatorInitialROITool.h.

35{ this, "RoiUpdater", "", "Roi Updater" };

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