ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracking
Acts
ActsRegionsOfInterest
src
RegionsOfInterestCreatorAlg.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
src/RegionsOfInterestCreatorAlg.h
"
6
7
namespace
ActsTrk
{
8
9
RegionsOfInterestCreatorAlg::RegionsOfInterestCreatorAlg
(
const
std::string& name,
10
ISvcLocator* pSvcLocator)
11
:
AthReentrantAlgorithm
(name, pSvcLocator)
12
{}
13
14
StatusCode
RegionsOfInterestCreatorAlg::initialize
()
15
{
16
ATH_MSG_DEBUG
(
"Initialising "
<< name() <<
" ..."
);
17
18
ATH_CHECK
(
m_roiCollectionKey
.initialize());
19
ATH_CHECK
(
m_roiTool
.retrieve());
20
21
return
StatusCode::SUCCESS;
22
}
23
24
StatusCode
RegionsOfInterestCreatorAlg::execute
(
const
EventContext& ctx)
const
25
{
26
ATH_MSG_DEBUG
(
"Executing "
<< name() <<
" ..."
);
27
28
ATH_MSG_DEBUG
(
"Creating ROI with key "
<<
m_roiCollectionKey
.key());
29
SG::WriteHandle< TrigRoiDescriptorCollection >
roiCollectionHandle =
SG::makeHandle
(
m_roiCollectionKey
, ctx );
30
ATH_CHECK
( roiCollectionHandle.
record
( std::make_unique< TrigRoiDescriptorCollection >() ) );
31
TrigRoiDescriptorCollection
*collectionRoI = roiCollectionHandle.
ptr
();
32
ATH_CHECK
(collectionRoI !=
nullptr
);
33
34
ATH_CHECK
(
m_roiTool
->defineRegionsOfInterest(ctx, *collectionRoI) );
35
return
StatusCode::SUCCESS;
36
}
37
38
}
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
RegionsOfInterestCreatorAlg.h
ActsTrk::RegionsOfInterestCreatorAlg::RegionsOfInterestCreatorAlg
RegionsOfInterestCreatorAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition
RegionsOfInterestCreatorAlg.cxx:9
ActsTrk::RegionsOfInterestCreatorAlg::m_roiTool
ToolHandle< ActsTrk::IRoICreatorTool > m_roiTool
Definition
RegionsOfInterestCreatorAlg.h:25
ActsTrk::RegionsOfInterestCreatorAlg::m_roiCollectionKey
SG::WriteHandleKey< TrigRoiDescriptorCollection > m_roiCollectionKey
Definition
RegionsOfInterestCreatorAlg.h:28
ActsTrk::RegionsOfInterestCreatorAlg::initialize
virtual StatusCode initialize() override
Definition
RegionsOfInterestCreatorAlg.cxx:14
ActsTrk::RegionsOfInterestCreatorAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition
RegionsOfInterestCreatorAlg.cxx:24
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition
AthReentrantAlgorithm.h:74
SG::WriteHandle< TrigRoiDescriptorCollection >
SG::WriteHandle::record
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
SG::WriteHandle::ptr
pointer_type ptr()
Dereference the pointer.
TrigRoiDescriptorCollection
Definition
TrigRoiDescriptorCollection.h:14
ActsTrk
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Definition
MdtCalibInput.h:31
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition
ReadCondHandle.h:269
Generated on
for ATLAS Offline Software by
1.17.0