ATLAS Offline Software
Loading...
Searching...
No Matches
StripSpacepointInputsCondAlg.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
5
6#include <exception>
7#include <vecmem/memory/host_memory_resource.hpp>
8
13
14namespace ActsTrk {
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
26 const EventContext& ctx) const {
28 // The scheduler may revisit an already available IOV for out-of-order events.
29 if (output.isValid())
30 return StatusCode::SUCCESS;
32 ctx);
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
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x,...)
#define ATH_MSG_ERROR(x,...)
This is an Identifier helper class for the SCT subdetector.
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_elements
SG::ReadCondHandleKey< InDet::SiElementPropertiesTable > m_properties
StatusCode execute(const EventContext &ctx) const override
ToolHandle< IDeviceStripSPFormationAlgProviderTool > m_provider
SG::WriteCondHandleKey< StripSpacepointConditions > m_output
const ServiceHandle< StoreGateSvc > & detStore() const
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
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.