ATLAS Offline Software
Trigger
TrigSteer
DecisionHandling
src
ViewCreatorInitialROITool.cxx
Go to the documentation of this file.
1
2
/*
3
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
4
*/
5
6
#include "
TrigSteeringEvent/TrigRoiDescriptorCollection.h
"
7
#include "
ViewCreatorInitialROITool.h
"
8
9
using namespace
TrigCompositeUtils
;
10
11
ViewCreatorInitialROITool::ViewCreatorInitialROITool
(
const
std::string&
type
,
const
std::string&
name
,
const
IInterface*
parent
)
12
: base_class(
type
,
name
,
parent
)
13
{}
14
15
StatusCode
ViewCreatorInitialROITool::attachROILinks
(
TrigCompositeUtils::DecisionContainer
&
decisions
,
const
EventContext&)
const
{
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
}
ViewCreatorInitialROITool::attachROILinks
virtual StatusCode attachROILinks(TrigCompositeUtils::DecisionContainer &decisions, const EventContext &ctx) const override
Tool interface method.
Definition:
ViewCreatorInitialROITool.cxx:15
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition:
AthMsgStreamMacros.h:33
TrigCompositeUtils::initialRoIString
const std::string & initialRoIString()
Definition:
TrigCompositeUtilsRoot.cxx:868
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition:
PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
test_pyathena.parent
parent
Definition:
test_pyathena.py:15
ViewCreatorInitialROITool.h
xAOD::TrigComposite_v1
Class used to describe composite objects in the HLT.
Definition:
TrigComposite_v1.h:52
DataVector
Derived DataVector<T>.
Definition:
DataVector.h:581
xAOD::decisions
decisions
Definition:
TrigComposite_v1.cxx:101
ViewCreatorInitialROITool::ViewCreatorInitialROITool
ViewCreatorInitialROITool(const std::string &type, const std::string &name, const IInterface *parent)
Definition:
ViewCreatorInitialROITool.cxx:11
name
std::string name
Definition:
Control/AthContainers/Root/debug.cxx:221
python.CaloScaleNoiseConfig.type
type
Definition:
CaloScaleNoiseConfig.py:78
TrigCompositeUtils
Definition:
Event/xAOD/xAODTrigger/xAODTrigger/TrigComposite.h:19
TrigCompositeUtils::roiString
const std::string & roiString()
Definition:
TrigCompositeUtilsRoot.cxx:876
TrigRoiDescriptorCollection.h
Generated on Thu Nov 7 2024 21:31:29 for ATLAS Offline Software by
1.8.18