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

Tool to create an output collection containing a single Full Scan ROI descriptor. More...

#include <ViewCreatorFSROITool.h>

Inheritance diagram for ViewCreatorFSROITool:
Collaboration diagram for ViewCreatorFSROITool:

Public Member Functions

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

Public Attributes

SG::WriteHandleKey< TrigRoiDescriptorCollectionm_roisWriteHandleKey
 ROI Write Handle key for the FS ROI colletion.
ToolHandle< IRoiUpdaterToolm_roiupdater { this, "RoiUpdater", "", "Roi Updater" }

Detailed Description

Tool to create an output collection containing a single Full Scan ROI descriptor.

Every Decision Object passed to the tool in decisions is set to use this FS ROI.

Definition at line 21 of file ViewCreatorFSROITool.h.

Constructor & Destructor Documentation

◆ ViewCreatorFSROITool()

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

Definition at line 11 of file ViewCreatorFSROITool.cxx.

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

◆ ~ViewCreatorFSROITool()

virtual ViewCreatorFSROITool::~ViewCreatorFSROITool ( )
virtualdefault

Member Function Documentation

◆ attachROILinks()

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

Tool interface method.

Definition at line 25 of file ViewCreatorFSROITool.cxx.

25 {
26
27 SG::WriteHandle<TrigRoiDescriptorCollection> roisWriteHandle = createAndStoreNoAux(m_roisWriteHandleKey, ctx);
28
29 if ( m_roiupdater.empty() ) {
30 roisWriteHandle->push_back( new TrigRoiDescriptor( RoiDescriptor::FULLSCAN ) );
31 }
32 else {
33 roisWriteHandle->push_back( m_roiupdater->execute( ctx ) );
34 }
35
36 const ElementLink<TrigRoiDescriptorCollection> roiEL = ElementLink<TrigRoiDescriptorCollection>( *roisWriteHandle, /*index =*/ 0, ctx );
37
38 for ( Decision* outputDecision : decisions ) {
39 outputDecision->setObjectLink( roiString(), roiEL );
40 }
41
42 return StatusCode::SUCCESS;
43}
Athena::TPCnvVers::Current TrigRoiDescriptor
static constexpr bool FULLSCAN
convenient
ToolHandle< IRoiUpdaterTool > m_roiupdater
SG::WriteHandleKey< TrigRoiDescriptorCollection > m_roisWriteHandleKey
ROI Write Handle key for the FS ROI colletion.
SG::WriteHandle< CONT > createAndStoreNoAux(const SG::WriteHandleKey< CONT > &key, const EventContext &ctx)
Creates and right away records the Container CONT with the key.
const std::string & roiString()

◆ initialize()

StatusCode ViewCreatorFSROITool::initialize ( )
overridevirtual

Definition at line 16 of file ViewCreatorFSROITool.cxx.

16 {
17 ATH_CHECK( m_roisWriteHandleKey.initialize() );
18
19 if ( !m_roiupdater.empty() ) ATH_CHECK( m_roiupdater.retrieve() );
20
21 return StatusCode::SUCCESS;
22}
#define ATH_CHECK
Evaluate an expression and check for errors.

Member Data Documentation

◆ m_roisWriteHandleKey

SG::WriteHandleKey< TrigRoiDescriptorCollection > ViewCreatorFSROITool::m_roisWriteHandleKey
Initial value:
{this,"RoisWriteHandleKey","",
"Name of the ROI collection produced by this tool."}

ROI Write Handle key for the FS ROI colletion.

Definition at line 38 of file ViewCreatorFSROITool.h.

38 {this,"RoisWriteHandleKey","",
39 "Name of the ROI collection produced by this tool."};

◆ m_roiupdater

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

Definition at line 41 of file ViewCreatorFSROITool.h.

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

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