ATLAS Offline Software
Loading...
Searching...
No Matches
EFTrackingXrtAlgorithm Class Reference

Generic Athena algorithm for running xclbin kernels, creating a mapping between store gate keys and kernel interfaces. More...

#include <EFTrackingXrtAlgorithm.h>

Inheritance diagram for EFTrackingXrtAlgorithm:
Collaboration diagram for EFTrackingXrtAlgorithm:

Public Member Functions

 EFTrackingXrtAlgorithm (const std::string &name, ISvcLocator *pSvcLocator)
StatusCode initialize () override final
StatusCode execute (const EventContext &ctx) const override final
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.
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
virtual void setFilterPassed (bool state, const EventContext &ctx) const
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

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

Private Attributes

SG::ReadHandleKeyArray< std::vector< unsigned long > > m_inputDataStreamKeys {this, "inputDataStreamKeys", {}}
 Keys to access encoded 64bit words following the EFTracking specification.
SG::ReadHandleKeyArray< std::vector< unsigned long > > m_vSizeDataStreamKeys {this, "vSizeDataStreamKeys", {}}
SG::WriteHandleKeyArray< std::vector< unsigned long > > m_outputDataStreamKeys {this, "outputDataStreamKeys", {}}
ServiceHandle< AthXRT::IDeviceMgmtSvcm_DeviceMgmtSvc
ServiceHandle< IChronoSvc > m_chronoSvc
Gaudi::Property< std::vector< std::tuple< std::string, std::string, int > > > m_inputInterfaces
Gaudi::Property< std::vector< std::tuple< std::string, std::string, int > > > m_vSizeInterfaces
Gaudi::Property< std::vector< std::tuple< std::string, std::string, int > > > m_outputInterfaces
Gaudi::Property< std::vector< std::tuple< std::string, int, std::string, int > > > m_sharedInterfaces
Gaudi::Property< std::vector< std::vector< std::string > > > m_kernelOrder
Gaudi::Property< std::size_t > m_bufferSize
std::map< std::string, std::unique_ptr< xrt::kernel > > m_kernels {}
std::map< std::string, std::unique_ptr< xrt::run > > m_runs {}
std::vector< xrt::bo > m_inputBuffers ATLAS_THREAD_SAFE {}
std::vector< xrt::bo > m_outputBuffers ATLAS_THREAD_SAFE {}
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

Detailed Description

Generic Athena algorithm for running xclbin kernels, creating a mapping between store gate keys and kernel interfaces.

Three interface types are supported, inputs, vSizes and outputs. Inputs and outputs are for memory mapped interfaces. VSizes tell the kernel how long an input is (based on the size() of the associated std::vector (retrieved from store gate).

Definition at line 35 of file EFTrackingXrtAlgorithm.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ EFTrackingXrtAlgorithm()

EFTrackingXrtAlgorithm::EFTrackingXrtAlgorithm ( const std::string & name,
ISvcLocator * pSvcLocator )

Definition at line 9 of file EFTrackingXrtAlgorithm.cxx.

12 : AthReentrantAlgorithm(name, pSvcLocator)
13{}

Member Function Documentation

◆ cardinality()

unsigned int AthCommonReentrantAlgorithm< Gaudi::Algorithm >::cardinality ( ) const
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.

64{
65 return 0;
66}

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

Definition at line 212 of file EFTrackingXrtAlgorithm.cxx.

213{
214 ATH_CHECK(m_inputDataStreamKeys.size() == m_inputBuffers.size());
215 std::size_t inputHandleIndex = 0;
216 for (
217 const SG::ReadHandleKey<std::vector<unsigned long>>& inputDataStreamKey :
219 ) {
220 SG::ReadHandle<std::vector<unsigned long>> inputDataStream(inputDataStreamKey, ctx);
221 ATH_MSG_DEBUG("Writing: " << inputDataStream.name());
222 unsigned long* inputMap = m_inputBuffers.at(inputHandleIndex).map<unsigned long*>();
223
224 ATH_CHECK(inputDataStream->size() <= m_bufferSize);
225
226 ATH_MSG_DEBUG("Copy " + inputDataStream.name() + " from storegate to host side map");
227 {
228 Athena::Chrono chrono(
229 "Copy " + inputDataStream.name() + " from storegate to host side map",
230 m_chronoSvc.get()
231 );
232
233 for (std::size_t index = 0; index < inputDataStream->size(); index++) {
234 inputMap[index] = inputDataStream->at(index);
235 }
236 }
237
238 ATH_MSG_DEBUG("Copy " + inputDataStream.name() + " from host side map to device");
239 {
240 Athena::Chrono chrono(
241 "Copy " + inputDataStream.name() + " from host side map to device",
242 m_chronoSvc.get()
243 );
244
245 m_inputBuffers.at(inputHandleIndex).sync(XCL_BO_SYNC_BO_TO_DEVICE);
246 }
247
248 inputHandleIndex++;
249 }
250
252 std::size_t vSizeHandleIndex = 0;
253 for (
254 const SG::ReadHandleKey<std::vector<unsigned long>>& vSizeDataStreamKey :
256 ) {
257 SG::ReadHandle<std::vector<unsigned long>> vSizeDataStream(vSizeDataStreamKey, ctx);
258 const auto& [kernelName, storeGateKey, argumentIndex] = m_vSizeInterfaces[vSizeHandleIndex];
259 ATH_MSG_DEBUG("Setting VSize: " << kernelName << ", " << vSizeDataStream.name() << ", " << vSizeDataStream->size());
260
261 m_runs.at(kernelName)->set_arg(argumentIndex, vSizeDataStream->size());
262 vSizeHandleIndex++;
263 }
264
265 ATH_MSG_DEBUG("Run kernels");
266 {
267 Athena::Chrono chrono("Run kernels", m_chronoSvc.get());
268
269 for (const auto& kernelNames : m_kernelOrder) {
270 for (const auto& kernelName : kernelNames) {
271 ATH_MSG_DEBUG("Running: " << kernelName);
272 m_runs.at(kernelName)->start();
273 }
274
275 for (const auto& kernelName : kernelNames) {
276 ATH_MSG_DEBUG("Waiting: " << kernelName);
277 m_runs.at(kernelName)->wait();
278 }
279 }
280 }
281
282 std::size_t outputHandleIndex = 0;
283 for (
284 const SG::WriteHandleKey<std::vector<unsigned long>>& outputDataStreamKey :
286 ) {
287 SG::WriteHandle<std::vector<unsigned long>> outputDataStream(outputDataStreamKey, ctx);
288 ATH_CHECK(outputDataStream.record(std::make_unique<std::vector<unsigned long>>(m_bufferSize)));
289
290 ATH_MSG_DEBUG("Copy " + outputDataStream.name() + " from device to host side map");
291 {
292 Athena::Chrono chrono(
293 "Copy " + outputDataStream.name() + " from device to host side map",
294 m_chronoSvc.get()
295 );
296
297 m_outputBuffers.at(outputHandleIndex).sync(XCL_BO_SYNC_BO_FROM_DEVICE);
298 }
299
300 const unsigned long* outputMap = m_outputBuffers.at(outputHandleIndex).map<unsigned long*>();
301 ATH_MSG_DEBUG("Copy " + outputDataStream.name() + " from host side map to storegate");
302 {
303 Athena::Chrono chrono(
304 "Copy " + outputDataStream.name() + " from host side map to storegate",
305 m_chronoSvc.get()
306 );
307
308 for (std::size_t index = 0; index < outputDataStream->size(); index++) {
309 outputDataStream->at(index) = outputMap[index];
310 }
311 }
312
313 outputHandleIndex++;
314 }
315
316 return StatusCode::SUCCESS;
317}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x)
Gaudi::Property< std::vector< std::tuple< std::string, std::string, int > > > m_vSizeInterfaces
SG::ReadHandleKeyArray< std::vector< unsigned long > > m_vSizeDataStreamKeys
std::map< std::string, std::unique_ptr< xrt::run > > m_runs
Gaudi::Property< std::vector< std::vector< std::string > > > m_kernelOrder
SG::ReadHandleKeyArray< std::vector< unsigned long > > m_inputDataStreamKeys
Keys to access encoded 64bit words following the EFTracking specification.
SG::WriteHandleKeyArray< std::vector< unsigned long > > m_outputDataStreamKeys
Gaudi::Property< std::size_t > m_bufferSize
ServiceHandle< IChronoSvc > m_chronoSvc
str index
Definition DeMoScan.py:362

◆ 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 & AthCommonReentrantAlgorithm< 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 94 of file AthCommonReentrantAlgorithm.cxx.

90{
91 // If we didn't find any symlinks to add, just return the collection
92 // from the base class. Otherwise, return the extended collection.
93 if (!m_extendedExtraObjects.empty()) {
95 }
97}
An algorithm that can be simultaneously executed in multiple threads.

◆ filterPassed()

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

Definition at line 96 of file AthCommonReentrantAlgorithm.h.

96 {
97 return execState( ctx ).filterPassed();
98 }
virtual bool filterPassed(const EventContext &ctx) const

◆ initialize()

StatusCode EFTrackingXrtAlgorithm::initialize ( )
finaloverride

Definition at line 15 of file EFTrackingXrtAlgorithm.cxx.

15 {
16 ATH_MSG_INFO("Initializing " << name());
17
18 ATH_CHECK(m_DeviceMgmtSvc.retrieve());
19 ATH_CHECK(m_chronoSvc.retrieve());
20 ATH_CHECK(m_inputDataStreamKeys.initialize());
21 ATH_CHECK(m_vSizeDataStreamKeys.initialize());
23
24 for (const auto& [kernelName, storeGateKey, argumentIndex] : m_inputInterfaces) {
26 "Setting up " <<
27 kernelName <<
28 " to read " <<
29 storeGateKey <<
30 " into argument " <<
31 argumentIndex
32 );
33
34 const std::vector<std::shared_ptr<xrt::device>> devices =
35 m_DeviceMgmtSvc->get_xrt_devices_by_kernel_name(kernelName);
36
37 ATH_CHECK(devices.size() != 0);
38
39 if (!m_kernels.contains(kernelName)) {
40 m_kernels[kernelName] = std::make_unique<xrt::kernel>(
41 *(devices[0]),
42 (devices[0])->get_xclbin_uuid(),
43 kernelName,
44 xrt::kernel::cu_access_mode::exclusive
45 );
46 }
47
48 ATH_CHECK(m_kernels[kernelName].get() != nullptr);
49 m_inputBuffers.emplace_back(
50 *(devices[0]),
51 sizeof(unsigned long) * m_bufferSize,
52 xrt::bo::flags::normal,
53 m_kernels[kernelName]->group_id(argumentIndex)
54 );
55
56 if (!m_runs.contains(kernelName)) {
57 m_runs[kernelName] = std::make_unique<xrt::run>(*m_kernels[kernelName]);
58 }
59
60 ATH_CHECK(m_runs[kernelName].get() != nullptr);
61 m_runs[kernelName]->set_arg(argumentIndex, m_inputBuffers.back());
62 }
63
64 for (const auto& [kernelName, storeGateKey, argumentIndex] : m_vSizeInterfaces) {
66 "Setting up " <<
67 kernelName <<
68 " to get input size from " <<
69 storeGateKey <<
70 " for argument " <<
71 argumentIndex
72 );
73
74 const std::vector<std::shared_ptr<xrt::device>> devices =
75 m_DeviceMgmtSvc->get_xrt_devices_by_kernel_name(kernelName);
76
77 ATH_CHECK(devices.size() != 0);
78
79 if (!m_kernels.contains(kernelName)) {
80 m_kernels[kernelName] = std::make_unique<xrt::kernel>(
81 *(devices[0]),
82 (devices[0])->get_xclbin_uuid(),
83 kernelName,
84 xrt::kernel::cu_access_mode::exclusive
85 );
86 }
87
88 ATH_CHECK(m_kernels[kernelName].get() != nullptr);
89
90 if (!m_runs.contains(kernelName)) {
91 m_runs[kernelName] = std::make_unique<xrt::run>(*m_kernels[kernelName]);
92 }
93
94 ATH_CHECK(m_runs[kernelName].get() != nullptr);
95 }
96
97 for (const auto& [kernelName, storeGateKey, argumentIndex] : m_outputInterfaces) {
99 "Setting up " <<
100 kernelName <<
101 " to write " <<
102 storeGateKey <<
103 " from argument " <<
104 argumentIndex
105 );
106
107 const std::vector<std::shared_ptr<xrt::device>> devices =
108 m_DeviceMgmtSvc->get_xrt_devices_by_kernel_name(kernelName);
109
110 ATH_CHECK(devices.size() != 0);
111
112 if (!m_kernels.contains(kernelName)) {
113 m_kernels[kernelName] = std::make_unique<xrt::kernel>(
114 *(devices[0]),
115 devices[0]->get_xclbin_uuid(),
116 kernelName,
117 xrt::kernel::cu_access_mode::exclusive
118 );
119 }
120
121 m_outputBuffers.emplace_back(
122 *(devices[0]),
123 sizeof(unsigned long) * m_bufferSize,
124 xrt::bo::flags::normal,
125 m_kernels[kernelName]->group_id(argumentIndex)
126 );
127
128 if (!m_runs.contains(kernelName)) {
129 m_runs[kernelName] = std::make_unique<xrt::run>(*m_kernels[kernelName]);
130 }
131
132 ATH_CHECK(m_runs[kernelName].get() != nullptr);
133 m_runs[kernelName]->set_arg(argumentIndex, m_outputBuffers.back());
134 }
135
136 for (const auto& [kernelName, argumentIndex, sourceKernelName, sourceArgumentIndex] : m_sharedInterfaces) {
138 "Setting up shared buffer between " <<
139 kernelName <<
140 " argument " <<
141 argumentIndex <<
142 " and " <<
143 sourceKernelName <<
144 " argument " <<
145 sourceArgumentIndex
146 );
147
148 const std::vector<std::shared_ptr<xrt::device>> devices =
149 m_DeviceMgmtSvc->get_xrt_devices_by_kernel_name(kernelName);
150
151 ATH_CHECK(devices.size() != 0);
152
153 if (!m_kernels.contains(kernelName)) {
154 m_kernels[kernelName] = std::make_unique<xrt::kernel>(
155 *(devices[0]),
156 devices[0]->get_xclbin_uuid(),
157 kernelName,
158 xrt::kernel::cu_access_mode::exclusive
159 );
160 }
161
162 if (!m_runs.contains(kernelName)) {
163 m_runs[kernelName] = std::make_unique<xrt::run>(*m_kernels[kernelName]);
164 }
165
166 ATH_CHECK(m_runs[kernelName].get() != nullptr);
167
168 std::size_t index = 0;
169 for (const auto& [outputKernelName, outputStoreGateKey, outputArgumentIndex] : m_outputInterfaces) {
170 if (
171 outputKernelName == sourceKernelName &&
172 outputArgumentIndex == sourceArgumentIndex
173 ) {
174 m_runs[kernelName]->set_arg(argumentIndex, m_outputBuffers[index]);
175
176 break;
177 }
178
179 index++;
180 }
181 }
182
183 for (const auto& kernelNames : m_kernelOrder) {
184 for (const auto& kernelName : kernelNames) {
185 const std::vector<std::shared_ptr<xrt::device>> devices =
186 m_DeviceMgmtSvc->get_xrt_devices_by_kernel_name(kernelName);
187
188 ATH_CHECK(devices.size() != 0);
189
190 if (!m_kernels.contains(kernelName)) {
191 ATH_MSG_DEBUG("Creating kernel: " << kernelName);
192
193 m_kernels[kernelName] = std::make_unique<xrt::kernel>(
194 *(devices[0]),
195 devices[0]->get_xclbin_uuid(),
196 kernelName,
197 xrt::kernel::cu_access_mode::exclusive
198 );
199
200 if (!m_runs.contains(kernelName)) {
201 m_runs[kernelName] = std::make_unique<xrt::run>(*m_kernels[kernelName]);
202 }
203
204 ATH_CHECK(m_runs[kernelName].get() != nullptr);
205 }
206 }
207 }
208
209 return StatusCode::SUCCESS;
210}
#define ATH_MSG_INFO(x)
Gaudi::Property< std::vector< std::tuple< std::string, std::string, int > > > m_inputInterfaces
std::map< std::string, std::unique_ptr< xrt::kernel > > m_kernels
Gaudi::Property< std::vector< std::tuple< std::string, int, std::string, int > > > m_sharedInterfaces
Gaudi::Property< std::vector< std::tuple< std::string, std::string, int > > > m_outputInterfaces
ServiceHandle< AthXRT::IDeviceMgmtSvc > m_DeviceMgmtSvc
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition hcg.cxx:130

◆ 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()

◆ 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 AthCommonReentrantAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Definition at line 100 of file AthCommonReentrantAlgorithm.h.

100 {
102 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const

◆ sysExecute()

StatusCode AthCommonReentrantAlgorithm< 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.

Definition at line 85 of file AthCommonReentrantAlgorithm.cxx.

77{
78 return BaseAlg::sysExecute (ctx);
79}

◆ sysInitialize()

StatusCode AthCommonReentrantAlgorithm< 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 HypoBase, and InputMakerBase.

Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.

107 {
109
110 if (sc.isFailure()) {
111 return sc;
112 }
113
114 ServiceHandle<ICondSvc> cs("CondSvc",name());
115 for (auto h : outputHandles()) {
116 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
117 // do this inside the loop so we don't create the CondSvc until needed
118 if ( cs.retrieve().isFailure() ) {
119 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
120 return StatusCode::SUCCESS;
121 }
122 if (cs->regHandle(this,*h).isFailure()) {
124 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
125 << " with CondSvc");
126 }
127 }
128 }
129 return sc;
130}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_WARNING(x)
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

◆ ATLAS_THREAD_SAFE [1/2]

std::vector<xrt::bo> m_inputBuffers EFTrackingXrtAlgorithm::ATLAS_THREAD_SAFE {}
mutableprivate

Definition at line 104 of file EFTrackingXrtAlgorithm.h.

104{};

◆ ATLAS_THREAD_SAFE [2/2]

std::vector<xrt::bo> m_outputBuffers EFTrackingXrtAlgorithm::ATLAS_THREAD_SAFE {}
mutableprivate

Definition at line 105 of file EFTrackingXrtAlgorithm.h.

105{};

◆ m_bufferSize

Gaudi::Property<std::size_t> EFTrackingXrtAlgorithm::m_bufferSize
private
Initial value:
{
this,
"bufferSize",
8192,
"Capacity of xrt buffers in terms of 64bit words."
}

Definition at line 93 of file EFTrackingXrtAlgorithm.h.

93 {
94 this,
95 "bufferSize",
96 8192,
97 "Capacity of xrt buffers in terms of 64bit words."
98 };

◆ m_chronoSvc

ServiceHandle<IChronoSvc> EFTrackingXrtAlgorithm::m_chronoSvc
private
Initial value:
{
this,
"ChronoStatSvc",
"ChronoStatSvc",
"Stop watch"
}

Definition at line 51 of file EFTrackingXrtAlgorithm.h.

51 {
52 this,
53 "ChronoStatSvc",
54 "ChronoStatSvc",
55 "Stop watch"
56 };

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

ServiceHandle<AthXRT::IDeviceMgmtSvc> EFTrackingXrtAlgorithm::m_DeviceMgmtSvc
private
Initial value:
{
this,
"DeviceMgmtSvc",
"AthXRT::DeviceMgmtSvc",
"The XRT device manager service to use"
}

Definition at line 44 of file EFTrackingXrtAlgorithm.h.

44 {
45 this,
46 "DeviceMgmtSvc",
47 "AthXRT::DeviceMgmtSvc",
48 "The XRT device manager service to use"
49 };

◆ 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 AthCommonReentrantAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

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

Empty if no symlinks were found.

Definition at line 114 of file AthCommonReentrantAlgorithm.h.

◆ m_inputDataStreamKeys

SG::ReadHandleKeyArray<std::vector<unsigned long> > EFTrackingXrtAlgorithm::m_inputDataStreamKeys {this, "inputDataStreamKeys", {}}
private

Keys to access encoded 64bit words following the EFTracking specification.

Definition at line 40 of file EFTrackingXrtAlgorithm.h.

40{this, "inputDataStreamKeys", {}};

◆ m_inputInterfaces

Gaudi::Property<std::vector<std::tuple<std::string, std::string, int> > > EFTrackingXrtAlgorithm::m_inputInterfaces
private
Initial value:
{
this,
"inputInterfaces",
{},
""
}

Definition at line 58 of file EFTrackingXrtAlgorithm.h.

58 {
59 this,
60 "inputInterfaces",
61 {},
62 ""
63 };

◆ m_kernelOrder

Gaudi::Property<std::vector<std::vector<std::string> > > EFTrackingXrtAlgorithm::m_kernelOrder
private
Initial value:
{
this,
"kernelOrder",
{},
""
}

Definition at line 86 of file EFTrackingXrtAlgorithm.h.

86 {
87 this,
88 "kernelOrder",
89 {},
90 ""
91 };

◆ m_kernels

std::map<std::string, std::unique_ptr<xrt::kernel> > EFTrackingXrtAlgorithm::m_kernels {}
private

Definition at line 100 of file EFTrackingXrtAlgorithm.h.

100{};

◆ m_outputDataStreamKeys

SG::WriteHandleKeyArray<std::vector<unsigned long> > EFTrackingXrtAlgorithm::m_outputDataStreamKeys {this, "outputDataStreamKeys", {}}
private

Definition at line 42 of file EFTrackingXrtAlgorithm.h.

42{this, "outputDataStreamKeys", {}};

◆ m_outputInterfaces

Gaudi::Property<std::vector<std::tuple<std::string, std::string, int> > > EFTrackingXrtAlgorithm::m_outputInterfaces
private
Initial value:
{
this,
"outputInterfaces",
{},
""
}

Definition at line 72 of file EFTrackingXrtAlgorithm.h.

72 {
73 this,
74 "outputInterfaces",
75 {},
76 ""
77 };

◆ m_runs

std::map<std::string, std::unique_ptr<xrt::run> > EFTrackingXrtAlgorithm::m_runs {}
private

Definition at line 101 of file EFTrackingXrtAlgorithm.h.

101{};

◆ m_sharedInterfaces

Gaudi::Property<std::vector<std::tuple<std::string, int, std::string, int> > > EFTrackingXrtAlgorithm::m_sharedInterfaces
private
Initial value:
{
this,
"sharedInterfaces",
{},
""
}

Definition at line 79 of file EFTrackingXrtAlgorithm.h.

79 {
80 this,
81 "sharedInterfaces",
82 {},
83 ""
84 };

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

◆ m_vSizeDataStreamKeys

SG::ReadHandleKeyArray<std::vector<unsigned long> > EFTrackingXrtAlgorithm::m_vSizeDataStreamKeys {this, "vSizeDataStreamKeys", {}}
private

Definition at line 41 of file EFTrackingXrtAlgorithm.h.

41{this, "vSizeDataStreamKeys", {}};

◆ m_vSizeInterfaces

Gaudi::Property<std::vector<std::tuple<std::string, std::string, int> > > EFTrackingXrtAlgorithm::m_vSizeInterfaces
private
Initial value:
{
this,
"vSizeInterfaces",
{},
""
}

Definition at line 65 of file EFTrackingXrtAlgorithm.h.

65 {
66 this,
67 "vSizeInterfaces",
68 {},
69 ""
70 };

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