ATLAS Offline Software
Loading...
Searching...
No Matches
RoiSelector.cxx
Go to the documentation of this file.
1
18
19#include "RoiSelector.h"
20
21
25std::vector<IDTPM2::RoiSelector::roi_info_t> IDTPM2::RoiSelector::retrieveRois( const std::string& chainName,
26 const std::string& roiKey,
27 const int& chainLeg ) const {
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}
86
87
emacs: this is -*- c++ -*-
std::vector< roi_info_t > retrieveRois(const std::string &chainName, const std::string &roiKey, const int &chainLeg=-1) const
Retrieve RoIs.
nope - should be used for standalone also, perhaps need to protect the class def bits ifndef XAOD_ANA...
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).