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< StoreGateSvc > StoreGateSvc_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 PixelID * m_pixelID {nullptr}
const SCT_ID * m_stripID {nullptr}
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::PixelClusterContainer > m_inputPixelClustersKey
SG::ReadHandleKey< xAOD::StripClusterContainer > m_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::IMemoryResourcesTool > m_MRs
ToolHandle< AthDevice::ICopiesTool > m_copiesTool
The detector description objects retrieved from the detector store

{@

Gaudi::Property< std::string > m_geoIdMappingObjectName
SG::ReadCondHandleKey< traccc::detector_conditions_description::host > m_hostCondKey
Gaudi::Property< std::string > m_hostDesignObjectName
const ActsTrk::GeometryIdMapping * m_geoIdMapping {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 52 of file xAODToTracccMeasurementConverterAlg.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

◆ 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 44 of file xAODToTracccMeasurementConverterAlg.cxx.

46{
47 const auto detrayIdOpt = m_geoIdMapping->athenaToDetray(moduleId);
48 if (!detrayIdOpt.has_value()) {
49 ATH_MSG_ERROR("No detray id found for Athena identifier " << moduleId);
50 return StatusCode::FAILURE;
51 }
52 const auto condIndexOpt = m_geoIdMapping->detrayToDetDescIndex(*detrayIdOpt);
53 if (!condIndexOpt.has_value()) {
54 ATH_MSG_ERROR("No detray conditions entry found for detray id " << *detrayIdOpt);
55 return StatusCode::FAILURE;
56 }
57 condIndex = static_cast<unsigned int>(*condIndexOpt);
58 return StatusCode::SUCCESS;
59}
#define ATH_MSG_ERROR(x,...)

◆ 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 61 of file xAODToTracccMeasurementConverterAlg.cxx.

62{
63 using size_type = traccc::edm::measurement_collection::buffer::size_type;
64 constexpr unsigned int invalidIndex = std::numeric_limits<unsigned int>::max();
65
66 auto pixelClusters = SG::makeHandle(m_inputPixelClustersKey, ctx);
67 ATH_CHECK(pixelClusters.isValid());
68 auto stripClusters = SG::makeHandle(m_inputStripClustersKey, ctx);
69 ATH_CHECK(stripClusters.isValid());
70
71 SG::ReadCondHandle<traccc::detector_conditions_description::host> hostCondHandle{m_hostCondKey, ctx};
72 ATH_CHECK(hostCondHandle.isValid());
73 const traccc::detector_conditions_description::host& hostCond = **hostCondHandle;
74
75 const unsigned int nPixel = pixelClusters->size();
76 const unsigned int nStrip = stripClusters->size();
77 const size_type nMeas = nPixel + nStrip;
78 ATH_MSG_DEBUG("Found " << nPixel << " pixel clusters and " << nStrip
79 << " strip clusters, total " << nMeas << " clusters");
80
81 std::vector<MeasurementRecord> records;
82 records.reserve(nMeas);
83
84 for (const xAOD::PixelCluster* cl : *pixelClusters) {
86 rec.isPixel = true;
87 rec.hostIndex = cl->index();
88 const Identifier moduleId = m_pixelID->wafer_id(IdentifierHash{cl->identifierHash()});
89 ATH_CHECK(condIndexFor(moduleId, rec.condIndex));
90 rec.geometryId = hostCond.geometry_id()[rec.condIndex].value();
91 const auto locPos = cl->localPosition<2>();
92 const auto locCov = cl->localCovariance<2>();
93 rec.localPosition = {locPos(0, 0), locPos(1, 0)};
94 rec.localVariance = {locCov(0, 0), locCov(1, 1)};
95 rec.diameter = cl->widthInEta();
96 records.push_back(rec);
97 }
98
99 for (const xAOD::StripCluster* cl : *stripClusters) {
101 rec.isPixel = false;
102 rec.hostIndex = cl->index();
103 const Identifier moduleId = m_stripID->wafer_id(IdentifierHash{cl->identifierHash()});
104 ATH_CHECK(condIndexFor(moduleId, rec.condIndex));
105 rec.geometryId = hostCond.geometry_id()[rec.condIndex].value();
106
107 // The measured coordinate is given by the module subspace, the other
108 // coordinate is set to the centre of the module design
109 const unsigned int designIdx = hostCond.module_to_design_id()[rec.condIndex];
110 const unsigned int measuredAxis = static_cast<unsigned int>(m_hostDesign->subspace()[designIdx][0]);
111 const unsigned int otherAxis = (measuredAxis == 0u) ? 1u : 0u;
112 const auto& otherEdges = (otherAxis == 0u) ? m_hostDesign->bin_edges_x()[designIdx]
113 : m_hostDesign->bin_edges_y()[designIdx];
114 float otherCentre = 0.f;
115 float otherVariance = 0.f;
116 if (!otherEdges.empty()) {
117 const float width = otherEdges.back() - otherEdges.front();
118 otherCentre = 0.5f * (otherEdges.front() + otherEdges.back());
119 otherVariance = width * width / 12.f;
120 }
121
122 const auto locPos = cl->localPosition<1>();
123 const auto locCov = cl->localCovariance<1>();
124 rec.localPosition[measuredAxis] = locPos(0, 0);
125 rec.localVariance[measuredAxis] = locCov(0, 0);
126 rec.localPosition[otherAxis] = otherCentre;
127 rec.localVariance[otherAxis] = otherVariance;
128 records.push_back(rec);
129 }
130
131 // The traccc track finding requires the measurements to be sorted by surface
132 std::vector<unsigned int> order(records.size());
133 std::iota(order.begin(), order.end(), 0u);
134 std::sort(order.begin(), order.end(), [&records](unsigned int lhs, unsigned int rhs) {
135 const MeasurementRecord& a = records[lhs];
136 const MeasurementRecord& b = records[rhs];
137 if (a.geometryId != b.geometryId) return a.geometryId < b.geometryId;
138 if (a.localPosition[0] != b.localPosition[0]) return a.localPosition[0] < b.localPosition[0];
139 return a.localPosition[1] < b.localPosition[1];
140 });
141
142 std::pmr::memory_resource* hostMR = m_MRs->hostMR();
143 auto hostCopy = m_copiesTool->hostCopy(ctx);
144 auto measHostBuffer = std::make_unique<traccc::edm::measurement_collection::buffer>(
145 nMeas, hostMR ? *hostMR : m_MRs->mainMR());
146 hostCopy->setup(*measHostBuffer)->wait();
147
148 // Create a "device" collection around the buffer to work on it
149 traccc::edm::measurement_collection::device measurements{*measHostBuffer};
150
151 auto measToPixel = std::make_unique<std::vector<unsigned int>>(nMeas, invalidIndex);
152 auto measToStrip = std::make_unique<std::vector<unsigned int>>(nMeas, invalidIndex);
153
154 // The traccc buffers are not default initialized: all members must be set.
155 for (size_type i = 0; i < nMeas; ++i) {
156 const MeasurementRecord& rec = records[order[i]];
157 const unsigned int designIdx = hostCond.module_to_design_id()[rec.condIndex];
158
159 auto meas = measurements.at(i);
160 meas.local_position() = rec.localPosition;
161 meas.local_variance() = rec.localVariance;
162 meas.dimensions() = static_cast<unsigned int>(m_hostDesign->dimensions()[designIdx]);
163 meas.time() = 0.f;
164 meas.diameter() = rec.diameter;
165 meas.identifier() = i;
166 meas.surface_link() = hostCond.geometry_id()[rec.condIndex];
167 meas.set_subspace(m_hostDesign->subspace()[designIdx]);
168 meas.cluster_index() = rec.hostIndex;
169
170 if (rec.isPixel) {
171 (*measToPixel)[i] = rec.hostIndex;
172 } else {
173 (*measToStrip)[i] = rec.hostIndex;
174 }
175 }
176
177 auto measHandle = SG::makeHandle(m_outputMeasKey, ctx);
178 if (hostMR) {
179 auto deviceCopy = m_copiesTool->deviceCopy(ctx);
180 auto measDeviceBuffer = std::make_unique<traccc::edm::measurement_collection::buffer>(
181 measHostBuffer->capacity(), m_MRs->mainMR());
182
183 // We ignore() the setup and wait() on the copy to allow parallelism.
184 deviceCopy->setup(*measDeviceBuffer)->ignore();
185 (*deviceCopy)(*measHostBuffer, *measDeviceBuffer)->wait();
186 ATH_CHECK(measHandle.record(std::move(measDeviceBuffer)));
187 } else {
188 ATH_CHECK(measHandle.record(std::move(measHostBuffer)));
189 }
190
191 auto measToPixelHandle = SG::makeHandle(m_outputMeasToPixelKey, ctx);
192 ATH_CHECK(measToPixelHandle.record(std::move(measToPixel)));
193 auto measToStripHandle = SG::makeHandle(m_outputMeasToStripKey, ctx);
194 ATH_CHECK(measToStripHandle.record(std::move(measToStrip)));
195
196 m_nPixel += nPixel;
197 m_nStrip += nStrip;
198
199 ATH_MSG_DEBUG("Wrote " << nMeas << " measurements to '"
200 << m_outputMeasKey.key() << "'");
201 return StatusCode::SUCCESS;
202}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x,...)
const double width
SG::ReadCondHandleKey< traccc::detector_conditions_description::host > m_hostCondKey
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
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 204 of file xAODToTracccMeasurementConverterAlg.cxx.

205{
206 ATH_MSG_DEBUG("Finalizing.");
207
208 ATH_MSG_INFO("Converted total number of pixel clusters = " << m_nPixel
209 << " and total number of strip clusters = " << m_nStrip);
210
211 return StatusCode::SUCCESS;
212}
#define ATH_MSG_INFO(x,...)

◆ initialize()

StatusCode ActsTrk::xAODToTracccMeasurementConverterAlg::initialize ( )
overridevirtual

Function initializing the algorithm.

Definition at line 20 of file xAODToTracccMeasurementConverterAlg.cxx.

21{
22 ATH_MSG_DEBUG("Initializing.");
23
26
27 ATH_CHECK(m_outputMeasKey.initialize());
30
31 ATH_CHECK(m_MRs.retrieve());
32 ATH_CHECK(m_copiesTool.retrieve());
33
34 ATH_CHECK(detStore()->retrieve(m_pixelID, "PixelID"));
35 ATH_CHECK(detStore()->retrieve(m_stripID, "SCT_ID"));
38 ATH_CHECK(m_hostCondKey.initialize());
39
40 ATH_MSG_DEBUG("Successfully initialized");
41 return StatusCode::SUCCESS;
42}
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::xAODToTracccMeasurementConverterAlg::m_copiesTool
private
Initial value:
{
this, "CopiesTool", "", "Tool that provides host and device copy objects"}

Definition at line 109 of file xAODToTracccMeasurementConverterAlg.h.

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

◆ 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_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_geoIdMapping

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

Definition at line 124 of file xAODToTracccMeasurementConverterAlg.h.

124{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 115 of file xAODToTracccMeasurementConverterAlg.h.

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

◆ m_hostCondKey

SG::ReadCondHandleKey<traccc::detector_conditions_description::host> ActsTrk::xAODToTracccMeasurementConverterAlg::m_hostCondKey
private
Initial value:
{
this, "HostConditionsObjectName", "TracccHostCondConfig",
"Traccc host conditions object"}

Definition at line 118 of file xAODToTracccMeasurementConverterAlg.h.

118 {
119 this, "HostConditionsObjectName", "TracccHostCondConfig",
120 "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 121 of file xAODToTracccMeasurementConverterAlg.h.

121 {
122 this, "HostDigitizationObjectName", "TracccHostDigitizationConfig",
123 "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 81 of file xAODToTracccMeasurementConverterAlg.h.

81 {
82 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 83 of file xAODToTracccMeasurementConverterAlg.h.

83 {
84 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 106 of file xAODToTracccMeasurementConverterAlg.h.

106 {
107 this, "MemoryResourcesTool", "",
108 "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 133 of file xAODToTracccMeasurementConverterAlg.h.

◆ m_nStrip

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

Definition at line 134 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 89 of file xAODToTracccMeasurementConverterAlg.h.

89 {
90 this, "OutputTracccMeasurements", "TracccMeasurementCollection",
91 "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 the index of the xAOD pixel cluster in its owning container"}

Definition at line 96 of file xAODToTracccMeasurementConverterAlg.h.

96 {
97 this, "OutputMeasToPixelCluster", "TracccMeasToPixelCluster",
98 "Output mapping from traccc measurement index to the index of the xAOD pixel cluster in its owning container"};

◆ 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 the index of the xAOD strip cluster in its owning container"}

Definition at line 99 of file xAODToTracccMeasurementConverterAlg.h.

99 {
100 this, "OutputMeasToStripCluster", "TracccMeasToStripCluster",
101 "Output mapping from traccc measurement index to the index of the xAOD strip cluster in its owning container"};

◆ 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 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: