ATLAS Offline Software
Loading...
Searching...
No Matches
ActsTrk::TracccMeasurementDeviceConverterAlg Class Reference

Algorithm converting traccc measurements (device buffer) to xAOD clusters (host container). More...

#include <TracccMeasurementDeviceConverterAlg.h>

Inheritance diagram for ActsTrk::TracccMeasurementDeviceConverterAlg:
Collaboration diagram for ActsTrk::TracccMeasurementDeviceConverterAlg:

Public Member Functions

virtual StatusCode initialize () override
 Function initializing the algorithm.
virtual StatusCode execute (const EventContext &ctx) const override
 Function executing the algorithm.
virtual StatusCode finalize () override
 Function finalizing the algorthm.
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
 Get filter decision:
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 Set filter decision:
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef ServiceHandle< StoreGateSvc > StoreGateSvc_t

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default).
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default).
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared
The input device traccc measurement collection name
SG::ReadHandleKey< traccc::edm::measurement_collection::buffer > m_inputMeasKey
The output host resident cluster collection names

{@

SG::WriteHandleKey< xAOD::PixelClusterContainer > m_outputPixelKey
SG::WriteHandleKey< xAOD::StripClusterContainer > m_outputStripKey
The host memory resource tool to use for memory allocations
ToolHandle< AthDevice::IMemoryResourcesTool > m_mrTool
The copy tool used for copying data from device
ToolHandle< AthDevice::ICopiesTool > m_copiesTool
Tool that provides CUDA streams
ToolHandle< AthCUDA::IStreamTool > m_streamTool
Name of the detector object on device
Gaudi::Property< std::string > m_deviceDetectorName
SG::ReadCondHandleKey< traccc::detector_conditions_description::buffer > m_deviceCondKey
const traccc::detector_buffer * m_detector {nullptr}
std::atomic< int > m_nPix = 0
 The object counters for debug prints in finalize method {.
std::atomic< int > m_nStrip = 0
std::atomic< int > m_nMeas = 0

Detailed Description

Algorithm converting traccc measurements (device buffer) to xAOD clusters (host container).

This algorithm converts the Traccc measurements into dedicated data format on device. The converted data is then transferred to host and used to create the corresponding xAOD cluster objects. The data format is designed to match the memory layout of the xAOD cluster containers so that the on-host "conversion" is only a few memory copy operations.

Author
Fabrice Le Goff flego.nosp@m.ff@c.nosp@m.ern.c.nosp@m.h

Definition at line 60 of file TracccMeasurementDeviceConverterAlg.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 376 of file AthCommonDataStore.h.

Member Function Documentation

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode ActsTrk::TracccMeasurementDeviceConverterAlg::execute ( const EventContext & ctx) const
overridevirtual

Function executing the algorithm.

Definition at line 49 of file TracccMeasurementDeviceConverterAlg.cxx.

50{
51 SG::ReadCondHandle<traccc::detector_conditions_description::buffer>
52 detector_conditions_handle{m_deviceCondKey, ctx};
53 ATH_CHECK(detector_conditions_handle.isValid());
54 if ((*detector_conditions_handle) == nullptr) {
55 ATH_MSG_ERROR("null detector conditions");
56 return StatusCode::FAILURE;
57 }
58 auto const & detector_conditions = **detector_conditions_handle;
59
60 // ---- Create (empty) output objects
61
62 // Create non-owning SG containers
63 auto pixel_cont = std::make_unique<xAOD::PixelClusterContainer>(
65 auto strip_cont = std::make_unique<xAOD::StripClusterContainer>(
67
68 // Create Aux containers
69 auto pixel_aux = std::make_unique<xAOD::PixelClusterAuxContainer>();
70 auto strip_aux = std::make_unique<xAOD::StripClusterAuxContainer>();
71
72 // Associate the Aux container to the containers
73 pixel_cont->setStore(pixel_aux.get());
74 strip_cont->setStore(strip_aux.get());
75
76 // ---- Read input
77 auto device_copy = m_copiesTool->deviceCopy(ctx);
78 cudaStream_t cuda_stream = static_cast<cudaStream_t>(m_streamTool->stream(ctx));
79 auto traccc_measurements = SG::makeHandle(m_inputMeasKey, ctx);
80 ATH_CHECK(traccc_measurements.isValid());
81 traccc::edm::measurement_collection::const_view::size_type const n_meas =
82 device_copy->get_size(*traccc_measurements);
83
84 // ---- Nothing to convert
85 if (n_meas == 0) {
86 // We still need to register empty containers in SG
87 SG::WriteHandle<xAOD::PixelClusterContainer> pixelHandle{m_outputPixelKey, ctx};
88 ATH_CHECK(pixelHandle.record(std::move(pixel_cont), std::move(pixel_aux)));
89
90 SG::WriteHandle<xAOD::StripClusterContainer> stripHandle{m_outputStripKey, ctx};
91 ATH_CHECK(stripHandle.record(std::move(strip_cont), std::move(strip_aux)));
92
93 ATH_MSG_DEBUG("Converted 0 pixel clusters, 0 strip clusters");
94 return StatusCode::SUCCESS;
95 }
96
97 // ---- Create output buffers
98 // They are allocated during the conversion when we know how many pixels and strips there are
99 std::unique_ptr<DevicePixelMeasurementContainer::buffer> converted_pixel_meas_device_buffer{nullptr};
100 std::unique_ptr<DeviceStripMeasurementContainer::buffer> converted_strip_meas_device_buffer{nullptr};
101
102 // ---- Conversion on GPU
103 DevicePixelMeasurementContainer::view::size_type n_pixels = 0;
104 DeviceStripMeasurementContainer::view::size_type n_strips = 0;
105 ATH_CHECK(convertMeasurementsOnGPU(cuda_stream, m_mrTool->mainMR(), *device_copy,
106 m_detector->as_view<traccc::itk_detector>(), detector_conditions,
107 n_meas, *traccc_measurements, n_pixels, n_strips,
108 converted_pixel_meas_device_buffer, converted_strip_meas_device_buffer));
109 if (!converted_pixel_meas_device_buffer or !converted_strip_meas_device_buffer)[[unlikely]]{
110 ATH_MSG_ERROR("nullptr detected");
111 return StatusCode::FAILURE;
112 }
113 // Create const device objects to access the field vectors directly
114 DevicePixelMeasurementContainer::device pixel_meas_device{*converted_pixel_meas_device_buffer};
115 DeviceStripMeasurementContainer::device strip_meas_device{*converted_strip_meas_device_buffer};
116
117 // ---- Feed output SG containers
118
119 // Create data pools
120 DataPool<xAOD::PixelCluster> pixel_pool(ctx, n_pixels);
121 DataPool<xAOD::StripCluster> strip_pool(ctx, n_strips);
122
123 // Reserve space and set element pointers in SG containers
124 pixel_cont->push_new(n_pixels, [&pixel_pool]() {
125 return pixel_pool.nextElementPtr(); });
126 strip_cont->push_new(n_strips, [&strip_pool]() {
127 return strip_pool.nextElementPtr(); });
128
129 // ---- Copy data from vecmem containers on device directly to SG containers
130 { // Pixels
131 auto span_id = s_acc_id.getDataSpan(*pixel_cont);
132 auto span_id_hash = s_acc_id_hash.getDataSpan(*pixel_cont);
133 auto span_local_pos = s_acc_loc_pos_xy.getDataSpan(*pixel_cont);
134 auto span_local_cov = s_acc_loc_cov_xy.getDataSpan(*pixel_cont);
135 auto span_global_pos = s_acc_global_pos.getDataSpan(*pixel_cont);
136 (*device_copy)(
137 vecmem::data::vector_view<unsigned long>(n_pixels, pixel_meas_device.identifier().data()),
138 vecmem::data::vector_view<unsigned long>(n_pixels, span_id.data())
139 )->ignore();
140 (*device_copy)(
141 vecmem::data::vector_view<std::array<float, 2>>(n_pixels, pixel_meas_device.local_position().data()),
142 vecmem::data::vector_view<std::array<float, 2>>(n_pixels, span_local_pos.data())
143 )->ignore();
144 (*device_copy)(
145 vecmem::data::vector_view<std::array<float, 4>>(n_pixels, pixel_meas_device.local_variance().data()),
146 vecmem::data::vector_view<std::array<float, 4>>(n_pixels, span_local_cov.data())
147 )->ignore();
148 (*device_copy)(
149 vecmem::data::vector_view<xAOD::ArrayFloat3>(n_pixels,
150 reinterpret_cast<xAOD::ArrayFloat3*>(pixel_meas_device.global_position().data())),
151 vecmem::data::vector_view<xAOD::ArrayFloat3>(n_pixels, span_global_pos.data())
152 )->ignore();
153 (*device_copy)(
154 vecmem::data::vector_view<unsigned int>(n_pixels, pixel_meas_device.module_id_hash().data()),
155 vecmem::data::vector_view<unsigned int>(n_pixels, span_id_hash.data())
156 )->wait();
157 }
158 { // Strips
159 auto span_id = s_acc_id.getDataSpan(*strip_cont);
160 auto span_id_hash = s_acc_id_hash.getDataSpan(*strip_cont);
161 auto span_local_pos = s_acc_loc_pos_x.getDataSpan(*strip_cont);
162 auto span_local_cov = s_acc_loc_cov_x.getDataSpan(*strip_cont);
163 CUDA_ERROR_CHECK(cudaMemcpy(span_id.data(), strip_meas_device.identifier().data(),
164 sizeof(unsigned long) * n_strips, cudaMemcpyDeviceToHost));
165 CUDA_ERROR_CHECK(cudaMemcpy(span_local_pos.data(), strip_meas_device.local_position().data(),
166 sizeof(float) * n_strips, cudaMemcpyDeviceToHost));
167 CUDA_ERROR_CHECK(cudaMemcpy(span_local_cov.data(), strip_meas_device.local_variance().data(),
168 sizeof(float) * n_strips, cudaMemcpyDeviceToHost));
169 CUDA_ERROR_CHECK(cudaMemcpy(span_id_hash.data(), strip_meas_device.module_id_hash().data(),
170 sizeof(unsigned int) * n_strips, cudaMemcpyDeviceToHost));
171 }
172
173 // ---- Register to SG
174 SG::WriteHandle<xAOD::PixelClusterContainer> pixelHandle{m_outputPixelKey, ctx};
175 ATH_CHECK(pixelHandle.record(std::move(pixel_cont), std::move(pixel_aux)));
176
177 SG::WriteHandle<xAOD::StripClusterContainer> stripHandle{m_outputStripKey, ctx};
178 ATH_CHECK(stripHandle.record(std::move(strip_cont), std::move(strip_aux)));
179
180 // ---- Et voilĂ 
181 ATH_MSG_DEBUG("Converted " << n_pixels << " pixel clusters, "
182 << n_strips << " strip clusters");
183
184 m_nMeas += n_pixels + n_strips;
185 m_nPix += n_pixels;
186 m_nStrip += n_strips;
187
188 return StatusCode::SUCCESS;
189}
#define CUDA_ERROR_CHECK(EXP)
Helper macro used for checking cudaError_t type return values.
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x,...)
#define ATH_MSG_ERROR(x,...)
SG::ReadCondHandleKey< traccc::detector_conditions_description::buffer > m_deviceCondKey
std::atomic< int > m_nPix
The object counters for debug prints in finalize method {.
SG::WriteHandleKey< xAOD::PixelClusterContainer > m_outputPixelKey
SG::ReadHandleKey< traccc::edm::measurement_collection::buffer > m_inputMeasKey
ToolHandle< AthDevice::IMemoryResourcesTool > m_mrTool
SG::WriteHandleKey< xAOD::StripClusterContainer > m_outputStripKey
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
StatusCode convertMeasurementsOnGPU(cudaStream_t stream, vecmem::memory_resource &mr, vecmem::copy const &copy, traccc::itk_detector::view_type const &detector_view, traccc::detector_conditions_description::const_view const &detector_conditions_view, traccc::edm::measurement_collection::const_view::size_type nb_measurements, const traccc::edm::measurement_collection::const_view &input, DevicePixelMeasurementContainer::view::size_type &output_n_pixels, DeviceStripMeasurementContainer::view::size_type &output_n_strips, std::unique_ptr< DevicePixelMeasurementContainer::buffer > &output_pixel_meas, std::unique_ptr< DeviceStripMeasurementContainer::buffer > &output_strip_meas)
@ ALWAYS_TRACK_INDICES
Always track indices, regardless of the setting of the ownership policy.
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
#define unlikely(x)

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthCommonAlgorithm< Gaudi::Algorithm >::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 89 of file AthCommonAlgorithm.cxx.

54{
55 // If we didn't find any symlinks to add, just return the collection
56 // from the base class. Otherwise, return the extended collection.
57 if (!m_extendedExtraObjects.empty()) {
59 }
61}
Common base class for algorithms.

◆ filterPassed()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext & ctx) const
inlinevirtualinherited

Get filter decision:

Definition at line 93 of file AthCommonAlgorithm.h.

93 {
94 return execState( ctx ).filterPassed();
95 }
virtual bool filterPassed(const EventContext &ctx) const
Get filter decision:

◆ finalize()

StatusCode ActsTrk::TracccMeasurementDeviceConverterAlg::finalize ( )
overridevirtual

Function finalizing the algorthm.

Definition at line 191 of file TracccMeasurementDeviceConverterAlg.cxx.

192{
193 ATH_MSG_DEBUG("Finalizing.");
194
195 ATH_MSG_DEBUG("Received total number of measurements = " << m_nMeas
196 << ", of which pixel clusters = " << m_nPix
197 << " and strip clusters = " << m_nStrip);
198
199 ATH_MSG_DEBUG("Successfully finalized");
200 return StatusCode::SUCCESS;
201}

◆ initialize()

StatusCode ActsTrk::TracccMeasurementDeviceConverterAlg::initialize ( )
overridevirtual

Function initializing the algorithm.

Definition at line 32 of file TracccMeasurementDeviceConverterAlg.cxx.

33{
34 ATH_CHECK(m_mrTool.retrieve());
35 ATH_CHECK(m_copiesTool.retrieve());
36 ATH_CHECK(m_streamTool.retrieve());
37
38 ATH_CHECK(m_inputMeasKey.initialize());
39 ATH_CHECK(m_outputPixelKey.initialize());
40 ATH_CHECK(m_outputStripKey.initialize());
41 ATH_CHECK(m_deviceCondKey.initialize());
42
44
45 ATH_MSG_DEBUG("Successfully initialized");
46 return StatusCode::SUCCESS;
47}
const ServiceHandle< StoreGateSvc > & detStore() const

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ isClonable()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::isClonable ( ) const
inlineoverridevirtualinherited

Specify if the algorithm is clonable.

Only relevant for non-reentrant algorithms. Actual number of clones needs to be set via the "Cardinality" property.

Reimplemented in AFP_DigiTop, AlgB, AlgT, BCM_Digitization, CscDigitBuilder, CscDigitToCscRDO, G4AtlasAlg, G4RunAlg, HGTD_Digitization, HiveAlgBase, InDet::GNNSeedingTrackMaker, InDet::SCT_Clusterization, InDet::SiSPGNNTrackMaker, InDet::SiSPSeededTrackFinder, InDet::SiTrackerSpacePointFinder, ISF::SimKernelMT, ITk::StripDigitization, ITkPixelCablingAlg, ITkStripCablingAlg, LArHitEMapMaker, LArTTL1Maker, LUCID_DigiTop, LVL1::L1TopoSimulation, MergeCalibHits, MergeGenericMuonSimHitColl, MergeHijingPars, MergeMcEventCollection, MergeTrackRecordCollection, MergeTruthJets, MergeTruthParticles, MuonDigitizer, PileUpMTAlg, PixelDigitization, RoIBResultToxAOD, SCT_ByteStreamErrorsTestAlg, SCT_CablingCondAlgFromCoraCool, SCT_CablingCondAlgFromText, SCT_ConditionsParameterTestAlg, SCT_ConditionsSummaryTestAlg, SCT_ConfigurationConditionsTestAlg, SCT_Digitization, SCT_FlaggedConditionTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_PrepDataToxAOD, SCT_RawDataToxAOD, SCT_ReadCalibChipDataTestAlg, SCT_ReadCalibDataTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_SiliconConditionsTestAlg, SCT_StripVetoTestAlg, SCT_TdaqEnabledTestAlg, SCT_TestCablingAlg, SCTEventFlagWriter, SCTRawDataProvider, SCTSiLorentzAngleTestAlg, SCTSiPropertiesTestAlg, SGInputLoader, Simulation::BeamEffectsAlg, TileHitVecToCnt, TileMuonFitter, TilePulseForTileMuonReceiver, TileRawChannelMaker, TRTDigitization, and ZDC_DigiTop.

Definition at line 68 of file AthCommonAlgorithm.h.

68 {
69 return true;
70 }

◆ msg()

MsgStream & AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< Gaudi::Algorithm >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 368 of file AthCommonDataStore.h.

369 {
370 h.renounce();
372 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 352 of file AthCommonDataStore.h.

352 {
354 }

◆ setFilterPassed()

virtual void AthCommonAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Set filter decision:

Definition at line 99 of file AthCommonAlgorithm.h.

99 {
101 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const
Set filter decision:

◆ sysExecute()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::sysExecute ( const EventContext & ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Reimplemented in AthAnalysisAlgorithm.

Definition at line 80 of file AthCommonAlgorithm.cxx.

41{
42 return BaseAlg::sysExecute (ctx);
43}

◆ sysInitialize()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthHistogramAlgorithm, HypoBase, InputMakerBase, and PyAthena::Alg.

Definition at line 60 of file AthCommonAlgorithm.cxx.

71 {
73
74 if (sc.isFailure()) {
75 return sc;
76 }
77
78 ServiceHandle<ICondSvc> cs("CondSvc",name());
79 for (auto h : outputHandles()) {
80 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
81 // do this inside the loop so we don't create the CondSvc until needed
82 if ( cs.retrieve().isFailure() ) {
83 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
85 }
86 if (cs->regHandle(this,*h).isFailure()) {
88 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
89 << " with CondSvc");
90 }
91 }
92 }
93 return sc;
94}
#define ATH_MSG_WARNING(x,...)
virtual StatusCode sysInitialize() override
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 298 of file AthCommonDataStore.h.

298 {
299 for (auto &a : m_vhka) {
301 for (auto k : keys) {
302 k->setOwner(this);
303 }
304 }
305 }

Member Data Documentation

◆ m_copiesTool

ToolHandle<AthDevice::ICopiesTool> ActsTrk::TracccMeasurementDeviceConverterAlg::m_copiesTool
private
Initial value:
{
this, "CopiesProviderTool", "", "Tool that provides vecmem copy objects"}

Definition at line 93 of file TracccMeasurementDeviceConverterAlg.h.

93 {
94 this, "CopiesProviderTool", "", "Tool that provides vecmem copy objects"};

◆ m_detector

const traccc::detector_buffer* ActsTrk::TracccMeasurementDeviceConverterAlg::m_detector {nullptr}
private

Definition at line 106 of file TracccMeasurementDeviceConverterAlg.h.

106{nullptr};

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default).

Definition at line 381 of file AthCommonDataStore.h.

◆ m_deviceCondKey

SG::ReadCondHandleKey<traccc::detector_conditions_description::buffer> ActsTrk::TracccMeasurementDeviceConverterAlg::m_deviceCondKey
private
Initial value:
{
this, "DeviceConditionsObjectName", "",
"Key for reading the per-IOV traccc device conditions object"}

Definition at line 102 of file TracccMeasurementDeviceConverterAlg.h.

102 {
103 this, "DeviceConditionsObjectName", "",
104 "Key for reading the per-IOV traccc device conditions object"};

◆ m_deviceDetectorName

Gaudi::Property<std::string> ActsTrk::TracccMeasurementDeviceConverterAlg::m_deviceDetectorName
private
Initial value:
{
this, "DeviceDetectorName", "",
"Detray device detector object"}

Definition at line 99 of file TracccMeasurementDeviceConverterAlg.h.

99 {
100 this, "DeviceDetectorName", "",
101 "Detray device detector object"};

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default).

Definition at line 378 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthCommonAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 108 of file AthCommonAlgorithm.h.

◆ m_inputMeasKey

SG::ReadHandleKey<traccc::edm::measurement_collection::buffer> ActsTrk::TracccMeasurementDeviceConverterAlg::m_inputMeasKey
private
Initial value:
{
this, "InputMeasurements", "TracccMeasurements",
"Input traccc measurement collection buffer"}

Definition at line 75 of file TracccMeasurementDeviceConverterAlg.h.

75 {
76 this, "InputMeasurements", "TracccMeasurements",
77 "Input traccc measurement collection buffer"};

◆ m_mrTool

ToolHandle<AthDevice::IMemoryResourcesTool> ActsTrk::TracccMeasurementDeviceConverterAlg::m_mrTool
private
Initial value:
{
this, "MemoryResourcesTool", "", "Tool that provides memory resources"}

Definition at line 90 of file TracccMeasurementDeviceConverterAlg.h.

90 {
91 this, "MemoryResourcesTool", "", "Tool that provides memory resources"};

◆ m_nMeas

std::atomic<int> ActsTrk::TracccMeasurementDeviceConverterAlg::m_nMeas = 0
mutableprivate

Definition at line 112 of file TracccMeasurementDeviceConverterAlg.h.

◆ m_nPix

std::atomic<int> ActsTrk::TracccMeasurementDeviceConverterAlg::m_nPix = 0
mutableprivate

The object counters for debug prints in finalize method {.

Definition at line 110 of file TracccMeasurementDeviceConverterAlg.h.

◆ m_nStrip

std::atomic<int> ActsTrk::TracccMeasurementDeviceConverterAlg::m_nStrip = 0
mutableprivate

Definition at line 111 of file TracccMeasurementDeviceConverterAlg.h.

◆ m_outputPixelKey

SG::WriteHandleKey<xAOD::PixelClusterContainer> ActsTrk::TracccMeasurementDeviceConverterAlg::m_outputPixelKey
private
Initial value:
{
this, "OutputPixelClusters", "ITkTracccPixelClusters",
"Output xAOD pixel cluster container"}

Definition at line 81 of file TracccMeasurementDeviceConverterAlg.h.

81 {
82 this, "OutputPixelClusters", "ITkTracccPixelClusters",
83 "Output xAOD pixel cluster container"};

◆ m_outputStripKey

SG::WriteHandleKey<xAOD::StripClusterContainer> ActsTrk::TracccMeasurementDeviceConverterAlg::m_outputStripKey
private
Initial value:
{
this, "OutputStripClusters", "ITkTracccStripClusters",
"Output xAOD strip cluster container"}

Definition at line 84 of file TracccMeasurementDeviceConverterAlg.h.

84 {
85 this, "OutputStripClusters", "ITkTracccStripClusters",
86 "Output xAOD strip cluster container"};

◆ m_streamTool

ToolHandle<AthCUDA::IStreamTool> ActsTrk::TracccMeasurementDeviceConverterAlg::m_streamTool
private
Initial value:
{
this, "StreamTool", "", "Tool that provides CUDA streams"}

Definition at line 96 of file TracccMeasurementDeviceConverterAlg.h.

96 {
97 this, "StreamTool", "", "Tool that provides CUDA streams"};

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 387 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
privateinherited

Definition at line 386 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: