ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracking
Acts
ActsGPUDataPreparation
src
StripSpacepointInputsCondAlg.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
#include "
StripSpacepointInputsCondAlg.h
"
5
6
#include <exception>
7
#include <vecmem/memory/host_memory_resource.hpp>
8
9
#include "
InDetIdentifier/SCT_ID.h
"
10
#include "
StoreGate/ReadCondHandle.h
"
11
#include "
StoreGate/WriteCondHandle.h
"
12
#include "
StripSpacepointAdapter.h
"
13
14
namespace
ActsTrk
{
15
StatusCode
StripSpacepointInputsCondAlg::initialize
() {
16
ATH_CHECK
(
m_elements
.initialize());
17
ATH_CHECK
(
m_properties
.initialize());
18
ATH_CHECK
(
m_output
.initialize());
19
ATH_CHECK
(
m_provider
.retrieve());
20
ATH_CHECK
(
detStore
()->retrieve(
m_mapping
,
m_mappingName
.value()));
21
ATH_CHECK
(
detStore
()->retrieve(
m_stripId
,
"SCT_ID"
));
22
return
StatusCode::SUCCESS;
23
}
24
25
StatusCode
StripSpacepointInputsCondAlg::execute
(
26
const
EventContext& ctx)
const
{
27
SG::WriteCondHandle<StripSpacepointConditions>
output(
m_output
, ctx);
28
// The scheduler may revisit an already available IOV for out-of-order events.
29
if
(output.isValid())
30
return
StatusCode::SUCCESS;
31
SG::ReadCondHandle<InDetDD::SiDetectorElementCollection>
elements(
m_elements
,
32
ctx);
33
SG::ReadCondHandle<InDet::SiElementPropertiesTable>
properties(
m_properties
,
34
ctx);
35
ATH_CHECK
(elements.
isValid
());
36
ATH_CHECK
(properties.isValid());
37
output.addDependency(elements);
38
output.addDependency(properties);
39
try
{
40
// Host staging is needed only until upload completes. Use the existing
41
// static mapping directly, without building another Identifier map.
42
vecmem::host_memory_resource hostMR;
43
const
auto
inputs =
makeStripSpacepointInputs
(
44
**elements, *
m_stripId
, **properties, *
m_mapping
, hostMR);
45
auto
deviceInputs =
m_provider
->uploadInputs(inputs, ctx);
46
// uploadInputs waits for completion before the CDO is published, allowing
47
// subsequent events to read it from their own CUDA streams.
48
ATH_CHECK
(output.record(std::move(deviceInputs)));
49
ATH_MSG_DEBUG
(
"Recorded Strip SP inputs for "
<< output.getRange());
50
}
catch
(
const
std::exception&
error
) {
51
ATH_MSG_ERROR
(
"Strip SP conditions preparation failed: "
<<
error
.what());
52
return
StatusCode::FAILURE;
53
}
54
return
StatusCode::SUCCESS;
55
}
56
}
// namespace ActsTrk
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:43
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x,...)
Definition
AthMsgStreamMacros.h:47
ReadCondHandle.h
SCT_ID.h
This is an Identifier helper class for the SCT subdetector.
StripSpacepointAdapter.h
StripSpacepointInputsCondAlg.h
WriteCondHandle.h
ActsTrk::StripSpacepointInputsCondAlg::m_mapping
const GeometryIdMapping * m_mapping
Definition
StripSpacepointInputsCondAlg.h:41
ActsTrk::StripSpacepointInputsCondAlg::initialize
StatusCode initialize() override
Definition
StripSpacepointInputsCondAlg.cxx:15
ActsTrk::StripSpacepointInputsCondAlg::m_elements
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_elements
Definition
StripSpacepointInputsCondAlg.h:27
ActsTrk::StripSpacepointInputsCondAlg::m_properties
SG::ReadCondHandleKey< InDet::SiElementPropertiesTable > m_properties
Definition
StripSpacepointInputsCondAlg.h:30
ActsTrk::StripSpacepointInputsCondAlg::m_stripId
const SCT_ID * m_stripId
Definition
StripSpacepointInputsCondAlg.h:42
ActsTrk::StripSpacepointInputsCondAlg::execute
StatusCode execute(const EventContext &ctx) const override
Definition
StripSpacepointInputsCondAlg.cxx:25
ActsTrk::StripSpacepointInputsCondAlg::m_provider
ToolHandle< IDeviceStripSPFormationAlgProviderTool > m_provider
Definition
StripSpacepointInputsCondAlg.h:36
ActsTrk::StripSpacepointInputsCondAlg::m_mappingName
Gaudi::Property< std::string > m_mappingName
Definition
StripSpacepointInputsCondAlg.h:38
ActsTrk::StripSpacepointInputsCondAlg::m_output
SG::WriteCondHandleKey< StripSpacepointConditions > m_output
Definition
StripSpacepointInputsCondAlg.h:33
AthCommonAlgorithm< Gaudi::Algorithm >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
Definition
AthCommonDataStore.h:95
SG::ReadCondHandle
Definition
ReadCondHandle.h:39
SG::ReadCondHandle::isValid
bool isValid()
Definition
ReadCondHandle.h:204
SG::WriteCondHandle
Definition
WriteCondHandle.h:26
ActsTrk
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Definition
MdtCalibInput.h:31
ActsTrk::makeStripSpacepointInputs
StripSpacepointInputs makeStripSpacepointInputs(const InDetDD::SiDetectorElementCollection &elements, const SCT_ID &strip_id, const InDet::SiElementPropertiesTable &properties, const GeometryIdMapping &mapping, vecmem::memory_resource &mr)
Interpret Athena designs/topology using the reference CPU pairing cuts.
Definition
StripSpacepointAdapter.cxx:161
error
Definition
IImpactPoint3dEstimator.h:72
Generated on
for ATLAS Offline Software by
1.17.0