ATLAS Offline Software
Loading...
Searching...
No Matches
IDTPM2::RoiSelector Class Reference

#include <RoiSelector.h>

Collaboration diagram for IDTPM2::RoiSelector:

Public Types

using roi_info_t = TrigCompositeUtils::LinkInfo<TrigRoiDescriptorCollection>

Public Member Functions

 RoiSelector (const ToolHandle< Trig::TrigDecisionTool > *trigDecTool=0)
 Constructor.
virtual ~RoiSelector ()=default
 Destructor.
std::vector< roi_info_t > retrieveRois (const std::string &chainName, const std::string &roiKey, const int &chainLeg=-1) const
 Retrieve RoIs.
void setTrigDecisionTool (const ToolHandle< Trig::TrigDecisionTool > *trigDecTool)

Private Attributes

const ToolHandle< Trig::TrigDecisionTool > * m_trigDecTool
 do we really need this to be a ToolHandle ?

Detailed Description

Definition at line 23 of file RoiSelector.h.

Member Typedef Documentation

◆ roi_info_t

Constructor & Destructor Documentation

◆ RoiSelector()

IDTPM2::RoiSelector::RoiSelector ( const ToolHandle< Trig::TrigDecisionTool > * trigDecTool = 0)
inline

Constructor.

Definition at line 33 of file RoiSelector.h.

33: m_trigDecTool(trigDecTool) { }
const ToolHandle< Trig::TrigDecisionTool > * m_trigDecTool
do we really need this to be a ToolHandle ?
Definition RoiSelector.h:47

◆ ~RoiSelector()

virtual IDTPM2::RoiSelector::~RoiSelector ( )
virtualdefault

Destructor.

Member Function Documentation

◆ retrieveRois()

std::vector< IDTPM2::RoiSelector::roi_info_t > IDTPM2::RoiSelector::retrieveRois ( const std::string & chainName,
const std::string & roiKey,
const int & chainLeg = -1 ) const

Retrieve RoIs.


--— retrieveRois --—

if ( m_trigDecTool==0 ) need to throw an exception here really ...

maybe it is a tag and probe roi with _probe appended to the end

loop to select RoIs

Don't extract any additional RoIs if a superRoi is requested: In this case, the superRoi would be shared between the different chains

check this is ! a spurious TDT match

remove roi with corrupted link

Definition at line 25 of file RoiSelector.cxx.

27 {
28
30
31 unsigned decisionType = TrigDefs::Physics; // TrigDefs::includeFailedDecisions;
32
33 unsigned featureType = ( roiKey.empty() ) ? TrigDefs::lastFeatureOfType : TrigDefs::allFeaturesOfType;
34
35 std::string roi_key = roiKey;
36
37 std::vector<IDTPM2::RoiSelector::roi_info_t> rois =
38 (*m_trigDecTool)->template features<TrigRoiDescriptorCollection >( Trig::FeatureRequestDescriptor( chainName,
39 decisionType,
40 roi_key,
41 featureType,
43 chainLeg ) );
44
46 if ( rois.empty() ) {
47 roi_key += "_probe";
48 rois = (*m_trigDecTool)->template features<TrigRoiDescriptorCollection >( Trig::FeatureRequestDescriptor( chainName,
49 decisionType,
50 roi_key,
51 featureType,
53 chainLeg ) );
54 }
55
56
57 std::vector<IDTPM2::RoiSelector::roi_info_t> selectedRois;
58
60 for ( size_t ir=0 ; ir<rois.size() ; ir++ ) {
61
64
65 if( roiKey == "SuperRoi" && ir>0 ) continue;
66 if( roiKey.find("Super")!=std::string::npos && ir>0 ) continue;
67
68 const ElementLink<TrigRoiDescriptorCollection> roiLink = rois[ir].link;
69
71 if( !roiKey.empty() && roiLink.dataID() != roi_key ) continue;
72
73 const TrigRoiDescriptor* const* roi = roiLink.cptr();
74
76 if( roi == 0 ) continue;
77
78 // MY_MSG_DEBUG << "Retrieved RoI descriptor for chain " << chainName <<" " <<**roi << endmsg;
79
80 selectedRois.push_back( rois[ir] );
81
82 } // close rois loop
83
84 return selectedRois;
85}
Athena::TPCnvVers::Current TrigRoiDescriptor
int ir
counter of the current depth
Definition fastadd.cxx:49
const std::string & roiString()
static const unsigned int lastFeatureOfType
Run 3 "enum". Only return the final feature along each route through the navigation.
static const unsigned int allFeaturesOfType
Run 3 "enum". Return all features along legs (still with type and container checks).

◆ setTrigDecisionTool()

void IDTPM2::RoiSelector::setTrigDecisionTool ( const ToolHandle< Trig::TrigDecisionTool > * trigDecTool)
inline

Definition at line 41 of file RoiSelector.h.

41{ m_trigDecTool = trigDecTool; }

Member Data Documentation

◆ m_trigDecTool

const ToolHandle<Trig::TrigDecisionTool>* IDTPM2::RoiSelector::m_trigDecTool
private

do we really need this to be a ToolHandle ?

? Can we not just make do with a pointer passed in by the parent tool ? Yes, yes we can.

Definition at line 47 of file RoiSelector.h.


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