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

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

#include <xAODToTracccMeasurementConverterAlg.h>

Inheritance diagram for ActsTrk::xAODToTracccMeasurementConverterAlg:

Classes

struct  MeasurementRecord
 Host side description of a measurement before it is written to the traccc collection. More...

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 algorithm.
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< StoreGateSvcStoreGateSvc_t

Private Member Functions

StatusCode condIndexFor (const Identifier &moduleId, unsigned int &condIndex) const
 Look up the traccc conditions index for an Athena module identifier.
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

const PixelIDm_pixelID {nullptr}
const SCT_IDm_stripID {nullptr}
std::unordered_map< std::uint64_t, unsigned int > m_detrayIdToCondIndex {}
std::atomic< unsigned long > m_nPixel = 0
 The object counters for debug prints in finalize method {.
std::atomic< unsigned long > m_nStrip = 0
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 host resident cluster container names

{@

SG::ReadHandleKey< xAOD::PixelClusterContainerm_inputPixelClustersKey
SG::ReadHandleKey< xAOD::StripClusterContainerm_inputStripClustersKey
The output device resident measurement collection name

{@

SG::WriteHandleKey< traccc::edm::measurement_collection::buffer > m_outputMeasKey
The output host resident index map names

{@

SG::WriteHandleKey< std::vector< unsigned int > > m_outputMeasToPixelKey
SG::WriteHandleKey< std::vector< unsigned int > > m_outputMeasToStripKey
The memory resources and copy tools

{@

ToolHandle< AthDevice::IMemoryResourcesToolm_MRs
ToolHandle< AthDevice::ICopiesToolm_copiesTool
The detector description objects retrieved from the detector store

{@

Gaudi::Property< std::string > m_geoIdMappingObjectName
Gaudi::Property< std::string > m_hostCondObjectName
Gaudi::Property< std::string > m_hostDesignObjectName
const ActsTrk::GeometryIdMappingm_geoIdMapping {nullptr}
const traccc::detector_conditions_description::host * m_hostCond {nullptr}
const traccc::detector_design_description::host * m_hostDesign {nullptr}

Detailed Description

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

This algorithm retrieves the xAOD pixel and strip cluster containers from the event store, converts them to a single traccc measurement collection sorted by detray surface identifier, copies the collection to the device and records the resulting device resident buffer in the event store.

The mappings from the traccc measurement indices to the xAOD cluster indices are recorded in the event store, so that downstream algorithms can relate device resident objects referencing the measurements to the host clusters.

Author
Jackson Burzynski jacks.nosp@m.on.c.nosp@m.arl.b.nosp@m.urzy.nosp@m.nski@.nosp@m.cern.nosp@m..ch

Definition at line 51 of file xAODToTracccMeasurementConverterAlg.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Member Function Documentation

◆ condIndexFor()

StatusCode ActsTrk::xAODToTracccMeasurementConverterAlg::condIndexFor ( const Identifier & moduleId,
unsigned int & condIndex ) const
private

Look up the traccc conditions index for an Athena module identifier.

Definition at line 53 of file xAODToTracccMeasurementConverterAlg.cxx.

55{
56 const auto detrayIdOpt = m_geoIdMapping->athenaToDetray(moduleId);
57 if (!detrayIdOpt.has_value()) {
58 ATH_MSG_ERROR("No detray id found for Athena identifier " << moduleId);
59 return StatusCode::FAILURE;
60 }
61 const auto it = m_detrayIdToCondIndex.find(*detrayIdOpt);
62 if (it == m_detrayIdToCondIndex.end()) {
63 ATH_MSG_ERROR("No detray conditions entry found for detray id " << *detrayIdOpt);
64 return StatusCode::FAILURE;
65 }
66 condIndex = it->second;
67 return StatusCode::SUCCESS;
68}
#define ATH_MSG_ERROR(x,...)
std::unordered_map< std::uint64_t, unsigned int > m_detrayIdToCondIndex

◆ 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::xAODToTracccMeasurementConverterAlg::execute ( const EventContext & ctx) const
overridevirtual

Function executing the algorithm.

Definition at line 70 of file xAODToTracccMeasurementConverterAlg.cxx.

71{
72 using size_type = traccc::edm::measurement_collection::buffer::size_type;
73 constexpr unsigned int invalidIndex = std::numeric_limits<unsigned int>::max();
74
75 auto pixelClusters = SG::makeHandle(m_inputPixelClustersKey, ctx);
76 ATH_CHECK(pixelClusters.isValid());
77 auto stripClusters = SG::makeHandle(m_inputStripClustersKey, ctx);
78 ATH_CHECK(stripClusters.isValid());
79
80 const unsigned int nPixel = pixelClusters->size();
81 const unsigned int nStrip = stripClusters->size();
82 const size_type nMeas = nPixel + nStrip;
83 ATH_MSG_DEBUG("Found " << nPixel << " pixel clusters and " << nStrip
84 << " strip clusters, total " << nMeas << " clusters");
85
86 std::vector<MeasurementRecord> records;
87 records.reserve(nMeas);
88
89 for (const xAOD::PixelCluster* cl : *pixelClusters) {
91 rec.isPixel = true;
92 rec.hostIndex = cl->index();
93 const Identifier moduleId = m_pixelID->wafer_id(IdentifierHash{cl->identifierHash()});
94 ATH_CHECK(condIndexFor(moduleId, rec.condIndex));
95 rec.geometryId = m_hostCond->geometry_id()[rec.condIndex].value();
96 const auto locPos = cl->localPosition<2>();
97 const auto locCov = cl->localCovariance<2>();
98 rec.localPosition = {locPos(0, 0), locPos(1, 0)};
99 rec.localVariance = {locCov(0, 0), locCov(1, 1)};
100 rec.diameter = cl->widthInEta();
101 records.push_back(rec);
102 }
103
104 for (const xAOD::StripCluster* cl : *stripClusters) {
106 rec.isPixel = false;
107 rec.hostIndex = cl->index();
108 const Identifier moduleId = m_stripID->wafer_id(IdentifierHash{cl->identifierHash()});
109 ATH_CHECK(condIndexFor(moduleId, rec.condIndex));
110 rec.geometryId = m_hostCond->geometry_id()[rec.condIndex].value();
111
112 // The measured coordinate is given by the module subspace, the other
113 // coordinate is set to the centre of the module design
114 const unsigned int designIdx = m_hostCond->module_to_design_id()[rec.condIndex];
115 const unsigned int measuredAxis = static_cast<unsigned int>(m_hostDesign->subspace()[designIdx][0]);
116 const unsigned int otherAxis = (measuredAxis == 0u) ? 1u : 0u;
117 const auto& otherEdges = (otherAxis == 0u) ? m_hostDesign->bin_edges_x()[designIdx]
118 : m_hostDesign->bin_edges_y()[designIdx];
119 float otherCentre = 0.f;
120 float otherVariance = 0.f;
121 if (!otherEdges.empty()) {
122 const float width = otherEdges.back() - otherEdges.front();
123 otherCentre = 0.5f * (otherEdges.front() + otherEdges.back());
124 otherVariance = width * width / 12.f;
125 }
126
127 const auto locPos = cl->localPosition<1>();
128 const auto locCov = cl->localCovariance<1>();
129 rec.localPosition[measuredAxis] = locPos(0, 0);
130 rec.localVariance[measuredAxis] = locCov(0, 0);
131 rec.localPosition[otherAxis] = otherCentre;
132 rec.localVariance[otherAxis] = otherVariance;
133 records.push_back(rec);
134 }
135
136 // The traccc track finding requires the measurements to be sorted by surface
137 std::vector<unsigned int> order(records.size());
138 std::iota(order.begin(), order.end(), 0u);
139 std::sort(order.begin(), order.end(), [&records](unsigned int lhs, unsigned int rhs) {
140 const MeasurementRecord& a = records[lhs];
141 const MeasurementRecord& b = records[rhs];
142 if (a.geometryId != b.geometryId) return a.geometryId < b.geometryId;
143 if (a.localPosition[0] != b.localPosition[0]) return a.localPosition[0] < b.localPosition[0];
144 return a.localPosition[1] < b.localPosition[1];
145 });
146
147 std::pmr::memory_resource* hostMR = m_MRs->hostMR();
148 auto hostCopy = m_copiesTool->hostCopy(ctx);
149 auto measHostBuffer = std::make_unique<traccc::edm::measurement_collection::buffer>(
150 nMeas, hostMR ? *hostMR : m_MRs->mainMR());
151 hostCopy->setup(*measHostBuffer)->wait();
152
153 // Create a "device" collection around the buffer to work on it
154 traccc::edm::measurement_collection::device measurements{*measHostBuffer};
155
156 auto measToPixel = std::make_unique<std::vector<unsigned int>>(nMeas, invalidIndex);
157 auto measToStrip = std::make_unique<std::vector<unsigned int>>(nMeas, invalidIndex);
158
159 // The traccc buffers are not default initialized: all members must be set.
160 for (size_type i = 0; i < nMeas; ++i) {
161 const MeasurementRecord& rec = records[order[i]];
162 const unsigned int designIdx = m_hostCond->module_to_design_id()[rec.condIndex];
163
164 auto meas = measurements.at(i);
165 meas.local_position() = rec.localPosition;
166 meas.local_variance() = rec.localVariance;
167 meas.dimensions() = static_cast<unsigned int>(m_hostDesign->dimensions()[designIdx]);
168 meas.time() = 0.f;
169 meas.diameter() = rec.diameter;
170 meas.identifier() = i;
171 meas.surface_link() = m_hostCond->geometry_id()[rec.condIndex];
172 meas.set_subspace(m_hostDesign->subspace()[designIdx]);
173 meas.cluster_index() = rec.hostIndex;
174
175 if (rec.isPixel) {
176 (*measToPixel)[i] = rec.hostIndex;
177 } else {
178 (*measToStrip)[i] = rec.hostIndex;
179 }
180 }
181
182 auto measHandle = SG::makeHandle(m_outputMeasKey, ctx);
183 if (hostMR) {
184 auto deviceCopy = m_copiesTool->deviceCopy(ctx);
185 auto measDeviceBuffer = std::make_unique<traccc::edm::measurement_collection::buffer>(
186 measHostBuffer->capacity(), m_MRs->mainMR());
187
188 // We ignore() the setup and wait() on the copy to allow parallelism.
189 deviceCopy->setup(*measDeviceBuffer)->ignore();
190 (*deviceCopy)(*measHostBuffer, *measDeviceBuffer)->wait();
191 ATH_CHECK(measHandle.record(std::move(measDeviceBuffer)));
192 } else {
193 ATH_CHECK(measHandle.record(std::move(measHostBuffer)));
194 }
195
196 auto measToPixelHandle = SG::makeHandle(m_outputMeasToPixelKey, ctx);
197 ATH_CHECK(measToPixelHandle.record(std::move(measToPixel)));
198 auto measToStripHandle = SG::makeHandle(m_outputMeasToStripKey, ctx);
199 ATH_CHECK(measToStripHandle.record(std::move(measToStrip)));
200
201 m_nPixel += nPixel;
202 m_nStrip += nStrip;
203
204 ATH_MSG_DEBUG("Wrote " << nMeas << " measurements to '"
205 << m_outputMeasKey.key() << "'");
206 return StatusCode::SUCCESS;
207}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x,...)
const double width
StatusCode condIndexFor(const Identifier &moduleId, unsigned int &condIndex) const
Look up the traccc conditions index for an Athena module identifier.
ToolHandle< AthDevice::IMemoryResourcesTool > m_MRs
SG::ReadHandleKey< xAOD::StripClusterContainer > m_inputStripClustersKey
SG::WriteHandleKey< std::vector< unsigned int > > m_outputMeasToPixelKey
SG::ReadHandleKey< xAOD::PixelClusterContainer > m_inputPixelClustersKey
SG::WriteHandleKey< traccc::edm::measurement_collection::buffer > m_outputMeasKey
const traccc::detector_design_description::host * m_hostDesign
SG::WriteHandleKey< std::vector< unsigned int > > m_outputMeasToStripKey
const traccc::detector_conditions_description::host * m_hostCond
std::atomic< unsigned long > m_nPixel
The object counters for debug prints in finalize method {.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
@ u
Enums for curvilinear frames.
Definition ParamDefs.h:77
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
order
Configure Herwig7.
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
@ nStrip
Get number of strips.
Definition TauDefs.h:204
StripCluster_v1 StripCluster
Define the version of the strip cluster class.
PixelCluster_v1 PixelCluster
Define the version of the pixel cluster class.
Host side description of a measurement before it is written to the traccc collection.

◆ 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::xAODToTracccMeasurementConverterAlg::finalize ( )
overridevirtual

Function finalizing the algorithm.

Definition at line 209 of file xAODToTracccMeasurementConverterAlg.cxx.

210{
211 ATH_MSG_DEBUG("Finalizing.");
212
213 ATH_MSG_INFO("Converted total number of pixel clusters = " << m_nPixel
214 << " and total number of strip clusters = " << m_nStrip);
215
216 return StatusCode::SUCCESS;
217}
#define ATH_MSG_INFO(x,...)

◆ initialize()

StatusCode ActsTrk::xAODToTracccMeasurementConverterAlg::initialize ( )
overridevirtual

Function initializing the algorithm.

Definition at line 19 of file xAODToTracccMeasurementConverterAlg.cxx.

20{
21 ATH_MSG_DEBUG("Initializing.");
22
25
26 ATH_CHECK(m_outputMeasKey.initialize());
29
30 ATH_CHECK(m_MRs.retrieve());
31 ATH_CHECK(m_copiesTool.retrieve());
32
33 ATH_CHECK(detStore()->retrieve(m_pixelID, "PixelID"));
34 ATH_CHECK(detStore()->retrieve(m_stripID, "SCT_ID"));
38
39 // NOTE: m_detrayIdToCondIndex is built once here;
40 // meaning it is only valid as long as the geometry does not change.
41 const auto& gids = m_hostCond->geometry_id();
42 m_detrayIdToCondIndex.reserve(gids.size());
43 for (unsigned int i = 0; i < gids.size(); ++i) {
44 m_detrayIdToCondIndex[gids[i].value()] = i;
45 }
46 ATH_MSG_INFO("Built detray->detcond map with "
47 << m_detrayIdToCondIndex.size() << " entries");
48
49 ATH_MSG_DEBUG("Successfully initialized");
50 return StatusCode::SUCCESS;
51}
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 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
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 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setFilterPassed()

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

Set filter decision:

Reimplemented in AthFilterAlgorithm.

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, AthFilterAlgorithm, 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 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }

Member Data Documentation

◆ m_copiesTool

ToolHandle<AthDevice::ICopiesTool> ActsTrk::xAODToTracccMeasurementConverterAlg::m_copiesTool
private
Initial value:
{
this, "CopiesTool", "", "Tool that provides host and device copy objects"}

Definition at line 108 of file xAODToTracccMeasurementConverterAlg.h.

108 {
109 this, "CopiesTool", "", "Tool that provides host and device copy objects"};

◆ m_detrayIdToCondIndex

std::unordered_map<std::uint64_t, unsigned int> ActsTrk::xAODToTracccMeasurementConverterAlg::m_detrayIdToCondIndex {}
private

Definition at line 131 of file xAODToTracccMeasurementConverterAlg.h.

131{};

◆ m_detStore

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

Pointer to StoreGate (detector store by default).

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

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

Pointer to StoreGate (event store by default).

Definition at line 390 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_geoIdMapping

const ActsTrk::GeometryIdMapping* ActsTrk::xAODToTracccMeasurementConverterAlg::m_geoIdMapping {nullptr}
private

Definition at line 123 of file xAODToTracccMeasurementConverterAlg.h.

123{nullptr};

◆ m_geoIdMappingObjectName

Gaudi::Property<std::string> ActsTrk::xAODToTracccMeasurementConverterAlg::m_geoIdMappingObjectName
private
Initial value:
{
this, "GeoIdMappingObjectName", "TracccGeometryIdMapping",
"StoreGate name for the detray/acts/athena geo id mapping"}

Definition at line 114 of file xAODToTracccMeasurementConverterAlg.h.

114 {
115 this, "GeoIdMappingObjectName", "TracccGeometryIdMapping",
116 "StoreGate name for the detray/acts/athena geo id mapping"};

◆ m_hostCond

const traccc::detector_conditions_description::host* ActsTrk::xAODToTracccMeasurementConverterAlg::m_hostCond {nullptr}
private

Definition at line 124 of file xAODToTracccMeasurementConverterAlg.h.

124{nullptr};

◆ m_hostCondObjectName

Gaudi::Property<std::string> ActsTrk::xAODToTracccMeasurementConverterAlg::m_hostCondObjectName
private
Initial value:
{
this, "HostConditionsObjectName", "TracccHostCondConfig",
"Traccc host conditions object"}

Definition at line 117 of file xAODToTracccMeasurementConverterAlg.h.

117 {
118 this, "HostConditionsObjectName", "TracccHostCondConfig",
119 "Traccc host conditions object"};

◆ m_hostDesign

const traccc::detector_design_description::host* ActsTrk::xAODToTracccMeasurementConverterAlg::m_hostDesign {nullptr}
private

Definition at line 125 of file xAODToTracccMeasurementConverterAlg.h.

125{nullptr};

◆ m_hostDesignObjectName

Gaudi::Property<std::string> ActsTrk::xAODToTracccMeasurementConverterAlg::m_hostDesignObjectName
private
Initial value:
{
this, "HostDigitizationObjectName", "TracccHostDigitizationConfig",
"Traccc host digitization object"}

Definition at line 120 of file xAODToTracccMeasurementConverterAlg.h.

120 {
121 this, "HostDigitizationObjectName", "TracccHostDigitizationConfig",
122 "Traccc host digitization object"};

◆ m_inputPixelClustersKey

SG::ReadHandleKey<xAOD::PixelClusterContainer> ActsTrk::xAODToTracccMeasurementConverterAlg::m_inputPixelClustersKey
private
Initial value:
{
this, "InputPixelClusters", "ITkPixelClusters", "Input xAOD pixel clusters"}

Definition at line 80 of file xAODToTracccMeasurementConverterAlg.h.

80 {
81 this, "InputPixelClusters", "ITkPixelClusters", "Input xAOD pixel clusters"};

◆ m_inputStripClustersKey

SG::ReadHandleKey<xAOD::StripClusterContainer> ActsTrk::xAODToTracccMeasurementConverterAlg::m_inputStripClustersKey
private
Initial value:
{
this, "InputStripClusters", "ITkStripClusters", "Input xAOD strip clusters"}

Definition at line 82 of file xAODToTracccMeasurementConverterAlg.h.

82 {
83 this, "InputStripClusters", "ITkStripClusters", "Input xAOD strip clusters"};

◆ m_MRs

ToolHandle<AthDevice::IMemoryResourcesTool> ActsTrk::xAODToTracccMeasurementConverterAlg::m_MRs
private
Initial value:
{
this, "MemoryResourcesTool", "",
"The memory resources tool to use for allocating memory on the host and the device"}

Definition at line 105 of file xAODToTracccMeasurementConverterAlg.h.

105 {
106 this, "MemoryResourcesTool", "",
107 "The memory resources tool to use for allocating memory on the host and the device"};

◆ m_nPixel

std::atomic<unsigned long> ActsTrk::xAODToTracccMeasurementConverterAlg::m_nPixel = 0
mutableprivate

The object counters for debug prints in finalize method {.

Definition at line 135 of file xAODToTracccMeasurementConverterAlg.h.

◆ m_nStrip

std::atomic<unsigned long> ActsTrk::xAODToTracccMeasurementConverterAlg::m_nStrip = 0
mutableprivate

Definition at line 136 of file xAODToTracccMeasurementConverterAlg.h.

◆ m_outputMeasKey

SG::WriteHandleKey<traccc::edm::measurement_collection::buffer> ActsTrk::xAODToTracccMeasurementConverterAlg::m_outputMeasKey
private
Initial value:
{
this, "OutputTracccMeasurements", "TracccMeasurementCollection",
"Output traccc measurement collection buffer"}

Definition at line 88 of file xAODToTracccMeasurementConverterAlg.h.

88 {
89 this, "OutputTracccMeasurements", "TracccMeasurementCollection",
90 "Output traccc measurement collection buffer"};

◆ m_outputMeasToPixelKey

SG::WriteHandleKey<std::vector<unsigned int> > ActsTrk::xAODToTracccMeasurementConverterAlg::m_outputMeasToPixelKey
private
Initial value:
{
this, "OutputMeasToPixelCluster", "TracccMeasToPixelCluster",
"Output mapping from traccc measurement index to xAOD pixel cluster index"}

Definition at line 95 of file xAODToTracccMeasurementConverterAlg.h.

95 {
96 this, "OutputMeasToPixelCluster", "TracccMeasToPixelCluster",
97 "Output mapping from traccc measurement index to xAOD pixel cluster index"};

◆ m_outputMeasToStripKey

SG::WriteHandleKey<std::vector<unsigned int> > ActsTrk::xAODToTracccMeasurementConverterAlg::m_outputMeasToStripKey
private
Initial value:
{
this, "OutputMeasToStripCluster", "TracccMeasToStripCluster",
"Output mapping from traccc measurement index to xAOD strip cluster index"}

Definition at line 98 of file xAODToTracccMeasurementConverterAlg.h.

98 {
99 this, "OutputMeasToStripCluster", "TracccMeasToStripCluster",
100 "Output mapping from traccc measurement index to xAOD strip cluster index"};

◆ m_pixelID

const PixelID* ActsTrk::xAODToTracccMeasurementConverterAlg::m_pixelID {nullptr}
private

Definition at line 128 of file xAODToTracccMeasurementConverterAlg.h.

128{nullptr};

◆ m_stripID

const SCT_ID* ActsTrk::xAODToTracccMeasurementConverterAlg::m_stripID {nullptr}
private

Definition at line 129 of file xAODToTracccMeasurementConverterAlg.h.

129{nullptr};

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


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