ATLAS Offline Software
Loading...
Searching...
No Matches
ViewCreatorFSROITool.cxx
Go to the documentation of this file.
1
2/*
3Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
4*/
5
8
9using namespace TrigCompositeUtils;
10
11ViewCreatorFSROITool::ViewCreatorFSROITool(const std::string& type, const std::string& name, const IInterface* parent)
12 : base_class(type, name, parent)
13 {}
14
15
17 ATH_CHECK( m_roisWriteHandleKey.initialize() );
18
19 if ( !m_roiupdater.empty() ) ATH_CHECK( m_roiupdater.retrieve() );
20
21 return StatusCode::SUCCESS;
22}
23
24
25StatusCode ViewCreatorFSROITool::attachROILinks(TrigCompositeUtils::DecisionContainer& decisions, const EventContext& ctx) const {
26
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}
#define ATH_CHECK
Evaluate an expression and check for errors.
Athena::TPCnvVers::Current TrigRoiDescriptor
static constexpr bool FULLSCAN
convenient
ToolHandle< IRoiUpdaterTool > m_roiupdater
virtual StatusCode attachROILinks(TrigCompositeUtils::DecisionContainer &decisions, const EventContext &ctx) const override
Tool interface method.
SG::WriteHandleKey< TrigRoiDescriptorCollection > m_roisWriteHandleKey
ROI Write Handle key for the FS ROI colletion.
virtual StatusCode initialize() override
ViewCreatorFSROITool(const std::string &type, const std::string &name, const IInterface *parent)
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()