ATLAS Offline Software
Loading...
Searching...
No Matches
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
6
7namespace ActsTrk {
8
10 ISvcLocator* pSvcLocator)
11 : AthReentrantAlgorithm(name, pSvcLocator)
12{}
13
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
24StatusCode 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());
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}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x)
RegionsOfInterestCreatorAlg(const std::string &name, ISvcLocator *pSvcLocator)
ToolHandle< ActsTrk::IRoICreatorTool > m_roiTool
SG::WriteHandleKey< TrigRoiDescriptorCollection > m_roiCollectionKey
virtual StatusCode execute(const EventContext &ctx) const override
An algorithm that can be simultaneously executed in multiple threads.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
pointer_type ptr()
Dereference the pointer.
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())