ATLAS Offline Software
Loading...
Searching...
No Matches
AuxStoreBase.cxx
Go to the documentation of this file.
1// Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
2
3// Local include(s).
5
8
9// Framework include(s).
16
17// ROOT include(s):
18#include <TError.h>
19
20#include <atomic>
21
22namespace xAOD::details {
23
25 : m_data{mode, topStore} {}
26
28
30
31 return m_data.m_structMode;
32}
33
35
36 m_data.m_structMode = mode;
37 reset();
38}
39
40const std::string& AuxStoreBase::prefix() const {
41
42 return m_data.m_prefix;
43}
44
46
47 return m_data.m_topStore;
48}
49
50void AuxStoreBase::setTopStore(bool value) {
51
52 m_data.m_topStore = value;
53 reset();
54}
55
56const void* AuxStoreBase::getData(SG::auxid_t auxid) const {
57
58 const SG::IAuxTypeVector* v = getVector(auxid);
59 if (v) {
60 return v->toPtr();
61 }
62 return nullptr;
63}
64
66
67 // Guard against multi-threaded execution:
68 guard_t guard(m_mutex1);
69
70 // Check if the transient store already handles this variable:
71 if (m_data.m_transientStore &&
72 (m_data.m_transientStore->getAuxIDs().test(auxid))) {
73 return m_data.m_transientStore->getVector(auxid);
74 }
75
76 // Access the object through a non-const pointer. This is "safe" because
77 // of the mutex lock above.
78 auto this_nc ATLAS_THREAD_SAFE = const_cast<AuxStoreBase*>(this);
79
80 // Connect this auxiliary variable both to the input and output
81 // if needed:
82 if ((auxid >= m_data.m_vecs.size()) || (!m_data.m_vecs[auxid])) {
83 if ((!this_nc->setupInputData(auxid).isSuccess()) ||
84 (!this_nc->setupOutputData(auxid).isSuccess())) {
85 return nullptr;
86 }
87 }
88
89 // Make sure the variable is up to date:
90 if (this_nc->getEntryFor(auxid).isSuccess() == false) {
91 ::Error("xAOD::AuxStoreBase::getVector",
92 XAOD_MESSAGE("Couldn't read in variable %s"),
93 SG::AuxTypeRegistry::instance().getName(auxid).c_str());
94 return nullptr;
95 }
96
97 // Let the AuxTypeVector object know that the std::vector that it manages
98 // has changed. (This updates the cached span.)
99 SG::IAuxTypeVector* vec = m_data.m_vecs[auxid].get();
100 vec->resize (vec->size());
101
102 // Return the pointer to the object:
103 return vec;
104}
105
107
108 return m_data.m_auxIDs;
109}
110
112
113 return m_data.m_decorIDs;
114}
115
117 std::size_t capacity) {
118
119 // Guard against multi-threaded execution:
120 guard_t guard(m_mutex1);
121
122 // Remember the requested size:
123 m_data.m_size = size;
124
125 // If this is a locked object, deal with it correctly:
126 if (m_locked) {
127 // If the variable exists already and it's a decoration, then let's
128 // give it back.
129 if ((auxid < m_data.m_vecs.size()) && m_data.m_vecs[auxid] &&
130 (auxid < m_data.m_isDecoration.size() &&
131 m_data.m_isDecoration[auxid])) {
132 // Things look okay...
133 m_data.m_vecs[auxid]->reserve(capacity);
134 m_data.m_vecs[auxid]->resize(size);
135 return m_data.m_vecs[auxid]->toPtr();
136 }
137 // If it's in the transient store already, return it from there.
138 // Since in a locked store *everything* is a decoration in the
139 // transient store.
140 if (m_data.m_transientStore &&
141 m_data.m_transientStore->getAuxIDs().test(auxid)) {
142 return m_data.m_transientStore->getDecoration(auxid, size, capacity);
143 }
144 // If we know this auxiliary ID, but it was not found as a decoration
145 // by the previous checks, then we're in trouble.
146 if (m_data.m_auxIDs.test(auxid)) {
147 throw SG::ExcStoreLocked(auxid);
148 }
149 }
150
151 // Check if we want to write this variable to the output:
152 if (!(isAuxIDSelected(auxid) && hasOutput())) {
153
154 // Create the store only when necessary:
155 if (!m_data.m_transientStore) {
156 m_data.m_transientStore = std::make_unique<SG::AuxStoreInternal>(
157 m_data.m_structMode == EStructMode::kObjectStore);
158 if (m_locked) {
159 m_data.m_transientStore->lock();
160 }
161 }
162 // Let the transient store create the decoration:
163 const std::size_t nids = m_data.m_transientStore->getAuxIDs().size();
164 void* result =
165 m_data.m_transientStore->getDecoration(auxid, size, capacity);
166 if (result && (nids != m_data.m_transientStore->getAuxIDs().size())) {
167 if (m_data.m_transientStore->isDecoration(auxid)) {
168 m_data.m_decorIDs.insert(auxid);
169 }
170 std::atomic_thread_fence( std::memory_order_seq_cst );
171 m_data.m_auxIDs.insert(auxid);
172 }
173 // Return the memory address from the transient store:
174 return result;
175 }
176
177 // Doesn't exist yet. So let's make it:
178 if (m_locked) {
179 // If the container is locked, remember that this is a decoration:
180 if (m_data.m_isDecoration.size() <= auxid) {
181 m_data.m_isDecoration.resize(auxid + 1);
182 }
183 m_data.m_isDecoration[auxid] = true;
184 m_data.m_decorIDs.insert(auxid);
185 std::atomic_thread_fence( std::memory_order_seq_cst );
186 }
187 void* result = getData(auxid, size, capacity);
188
189 // Return the pointer made by getData(...):
190 return result;
191}
192
193SG::auxid_set_t AuxStoreBase::getCopyIDs (bool warnUnlocked /*= false*/) const
194{
195 return SG::getCopyIDs (getAuxIDs(), getDecorIDs(), warnUnlocked, {});
196}
197
198
200 if (m_locked) {
201 if (auxid < m_data.m_isDecoration.size() && m_data.m_isDecoration[auxid]) {
202 return true;
203 }
204 if (m_data.m_transientStore) {
205 return m_data.m_transientStore->isDecoration(auxid);
206 }
207 }
208 return false;
209}
210
212
213 // Guard against multi-threaded execution:
214 guard_t guard(m_mutex1);
215
216 m_locked = true;
217 if (m_data.m_transientStore) {
218 m_data.m_transientStore->lock();
219 }
220}
221
223
224 // Guard against multi-threaded execution:
225 guard_t guard(m_mutex1);
226
227 // Clear the transient decorations:
228 bool anycleared = false;
229 if (m_data.m_transientStore) {
230 SG::auxid_set_t old_id_set = m_data.m_transientStore->getAuxIDs();
231
232 // Clear the decorations from the transient store:
233 anycleared = m_data.m_transientStore->clearDecorations();
234
235 // Now remove ids that were cleared.
236 if (anycleared) {
237 old_id_set -= m_data.m_transientStore->getAuxIDs();
238 // old_id_set is now the set of ids that were cleared.
239 m_data.m_auxIDs -= old_id_set;
240 m_data.m_decorIDs.clear();
241 }
242 }
243
244 // The decorations which are going into the output file, are here to stay.
245 // Removing their IDs from the internal set would just cause more problems
246 // in my mind than just leaving them be.
247
248 return anycleared;
249}
250
253 if (m_data.m_transientStore) {
254 m_data.m_transientStore->lockDecoration(auxid);
255 }
256 m_data.m_decorIDs.erase(auxid);
257}
258
259std::size_t AuxStoreBase::size() const {
260
261 // First, try to find a managed vector in the store:
262 for (SG::auxid_t id : m_data.m_auxIDs) {
263 // Make sure that we are still within the bounds of our vector:
264 if (id >= m_data.m_vecs.size())
265 break;
266 // Skip non-existent or linked objects:
267 if (!m_data.m_vecs[id] || m_data.m_vecs[id]->isLinked()) {
268 continue;
269 }
270 // Ask the vector for its size:
271 const std::size_t size = m_data.m_vecs[id]->size();
272 // Only accept a non-zero size. Not sure why...
273 if (size > 0) {
274 return size;
275 }
276 }
277
278 // Check if we have a transient store, and get the size from that:
279 if (m_data.m_transientStore) {
280 return m_data.m_transientStore->size();
281 }
282
283 // Apparently the store is empty:
284 return 0;
285}
286
289 SG::auxid_t linked_id = r.linkedVariable(auxid);
290 guard_t guard(m_mutex1);
291 if (linked_id < m_data.m_vecs.size()) {
292 return m_data.m_vecs[linked_id].get();
293 }
294 if (m_data.m_transientStore) {
295 return CxxUtils::as_const_ptr(m_data.m_transientStore.get())
296 ->linkedVector(auxid);
297 }
298 return nullptr;
299}
300
303 SG::auxid_t linked_id = r.linkedVariable(auxid);
304 guard_t guard(m_mutex1);
305 if (linked_id < m_data.m_vecs.size()) {
306 return m_data.m_vecs[linked_id].get();
307 }
308 if (m_data.m_transientStore) {
309 return m_data.m_transientStore->linkedVector(auxid);
310 }
311 return nullptr;
312}
313
314void AuxStoreBase::toTransient( const EventContext& ctx ) {
315 // Guard against multi-threaded execution:
316 guard_t guard(m_mutex1);
317
318 for (auto& v : m_data.m_vecs) {
319 if (v) {
320 v->toTransient( ctx );
321 }
322 }
323 if (m_data.m_transientStore) {
324 m_data.m_transientStore->toTransient(ctx);
325 }
326}
327
328void* AuxStoreBase::getData(SG::auxid_t auxid, std::size_t size,
329 std::size_t capacity) {
330
331 // Guard against multi-threaded execution:
332 guard_t guard(m_mutex2);
333
334 // Remember the size:
335 m_data.m_size = size;
336
337 // Check if we want to write this variable to the output:
338 if (!(isAuxIDSelected(auxid) && hasOutput())) {
339 // Create the store only when necessary:
340 if (!m_data.m_transientStore) {
341 m_data.m_transientStore = std::make_unique<SG::AuxStoreInternal>(
342 m_data.m_structMode == EStructMode::kObjectStore);
343 if (m_locked) {
344 m_data.m_transientStore->lock();
345 }
346 }
347 // Let the transient store create the variable:
348 std::size_t nids = m_data.m_transientStore->getAuxIDs().size();
349 void* result = m_data.m_transientStore->getData(auxid, size, capacity);
350 if (result && (nids != m_data.m_transientStore->getAuxIDs().size())) {
351 m_data.m_auxIDs.insert(auxid);
352 }
353 // Return the address in the transient memory:
354 return result;
355 }
356
357 // If the variable exists already, and this is a locked store, then
358 // we are in trouble.
359 if (m_locked && (auxid < m_data.m_vecs.size()) && m_data.m_vecs[auxid]) {
360 if (!((auxid < m_data.m_isDecoration.size()) &&
361 m_data.m_isDecoration[auxid])) {
362 throw SG::ExcStoreLocked(auxid);
363 }
364 }
365
366 // Connect this auxiliary variable just to the output:
367 if (setupOutputData(auxid).isFailure()) {
368 ::Error("xAOD::AuxStoreBase::getData",
369 XAOD_MESSAGE("Failed to set up variable %s"),
370 SG::AuxTypeRegistry::instance().getName(auxid).c_str());
371 return nullptr;
372 }
373
374 // Check whether things make sense:
375 if ((m_data.m_structMode == EStructMode::kObjectStore) && (size != 1)) {
376 ::Error("xAOD::AuxStoreBase::getData",
377 XAOD_MESSAGE("Branch creation requested with:"));
378 ::Error("xAOD::AuxStoreBase::getData", XAOD_MESSAGE(" name = %s"),
379 SG::AuxTypeRegistry::instance().getName(auxid).c_str());
380 ::Error("xAOD::AuxStoreBase::getData", XAOD_MESSAGE(" size = %i"),
381 static_cast<int>(size));
382 ::Error("xAOD::AuxStoreBase::getData",
383 XAOD_MESSAGE(" m_structMode = EStructMode::kObjectStore"));
384 return nullptr;
385 }
386
387 // Make sure the variable is of the right size:
388 m_data.m_vecs[auxid]->reserve(capacity);
389 m_data.m_vecs[auxid]->resize(size);
390
391 // Return the object:
392 return m_data.m_vecs[auxid]->toPtr();
393}
394
396
397 return getAuxIDs();
398}
399
400bool AuxStoreBase::resize(std::size_t size) {
401
402 // Guard against multi-threaded execution:
403 guard_t guard(m_mutex1);
404
405 // A sanity check:
406 if ((m_data.m_structMode == EStructMode::kObjectStore) && (size != 1)) {
407 ::Error("xAOD::AuxStoreBase::resize",
408 XAOD_MESSAGE("size = %i for single-object store"),
409 static_cast<int>(size));
410 return false;
411 }
412
413 // Remember the new size:
414 m_data.m_size = size;
415
416 bool nomoves = true;
417 for (auto& v : m_data.m_vecs) {
418 if (v && !v->isLinked()) {
419 if (!v->resize(size)) {
420 nomoves = false;
421 }
422 }
423 }
424 if (m_data.m_transientStore) {
425 if (!m_data.m_transientStore->resize(size)) {
426 nomoves = false;
427 }
428 }
429
430 return nomoves;
431}
432
433void AuxStoreBase::reserve(std::size_t size) {
434
435 // Guard against multi-threaded execution:
436 guard_t guard(m_mutex1);
437
438 // A sanity check:
439 if ((m_data.m_structMode == EStructMode::kObjectStore) && (size != 1)) {
440 ::Error("xAOD::AuxStoreBase::reserve",
441 XAOD_MESSAGE("size = %i for single-object store"),
442 static_cast<int>(size));
443 return;
444 }
445
446 for (auto& v : m_data.m_vecs) {
447 if (v && !v->isLinked()) {
448 v->reserve(size);
449 }
450 }
451
452 if (m_data.m_transientStore) {
453 m_data.m_transientStore->reserve(size);
454 }
455}
456
457void AuxStoreBase::shift(std::size_t pos, std::ptrdiff_t offs) {
458
459 // Guard against multi-threaded execution:
460 guard_t guard(m_mutex1);
461
462 // A sanity check:
463 if (m_data.m_structMode == EStructMode::kObjectStore) {
464 ::Error("xAOD::AuxStoreBase::shift",
465 XAOD_MESSAGE("Should not have been called for single-object "
466 "store"));
467 return;
468 }
469
470 // Adjust the size of the container:
471 if ((static_cast<std::size_t>(std::abs(offs)) > m_data.m_size) &&
472 (offs < 0)) {
473 m_data.m_size = 0;
474 } else {
475 m_data.m_size += offs;
476 }
477
478 for (auto& v : m_data.m_vecs) {
479 if (v && !v->isLinked()) {
480 v->shift(pos, offs);
481 }
482 }
483
484 if (m_data.m_transientStore) {
485 m_data.m_transientStore->shift(pos, offs);
486 }
487}
488
490 const SG::auxid_set_t& ignore_in) {
491 // Guard against multi-threaded execution:
492 guard_t guard(m_mutex1);
493
494 // A sanity check:
495 if (m_data.m_structMode == EStructMode::kObjectStore) {
496 ::Error("xAOD::AuxStoreBase::insertMove",
497 XAOD_MESSAGE("Should not have been called for single-object "
498 "store"));
499 return false;
500 }
501
502 bool nomove = true;
503 std::size_t other_size = other.size();
504
505 SG::auxid_set_t ignore = ignore_in;
506
507 for (SG::auxid_t id : m_data.m_auxIDs) {
508 SG::IAuxTypeVector* v_dst = nullptr;
509 if (id < m_data.m_vecs.size()) {
510 v_dst = m_data.m_vecs[id].get();
511 }
512 if (v_dst && !v_dst->isLinked()) {
513 ignore.insert(id);
514 if (other.getData(id)) {
515 void* src_ptr = other.getData(id, other_size, other_size);
516 if (src_ptr) {
517 if (!v_dst->insertMove(pos, src_ptr, 0, other_size, other)) {
518 nomove = false;
519 }
520 }
521 } else {
522 const void* orig = v_dst->toPtr();
523 v_dst->shift(pos, other_size);
524 if (orig != v_dst->toPtr()) {
525 nomove = false;
526 }
527 }
528 }
529 }
530
531 if (m_data.m_transientStore) {
532 if (!m_data.m_transientStore->insertMove(pos, other, ignore))
533 nomove = false;
534 }
535
536 return nomove;
537}
538
539const void* AuxStoreBase::getIOData(SG::auxid_t auxid) const {
540
541 // Guard against multi-threaded execution:
542 guard_t guard(m_mutex1);
543
544 auto this_nc ATLAS_THREAD_SAFE =
545 const_cast<AuxStoreBase*>(this); // locked above
546
547 // If the variable is coming from the input, and is connected to already.
548 if (hasEntryFor(auxid)) {
549 if (!this_nc->getEntryFor(auxid).isSuccess()) {
550 ::Error("xAOD::AuxStoreBase::getIOData",
551 XAOD_MESSAGE("Couldn't read in variable %s"),
552 SG::AuxTypeRegistry::instance().getName(auxid).c_str());
553 return nullptr;
554 }
555 return getInputObject(auxid);
556 }
557
558 // Check if it's in the transient store:
559 if (m_data.m_transientStore &&
560 m_data.m_transientStore->getAuxIDs().test(auxid)) {
561 return m_data.m_transientStore->getIOData(auxid);
562 }
563
564 // If not, try connecting to it now:
565 if (!this_nc->setupInputData(auxid).isSuccess()) {
566 // This is not actually an error condition anymore. We can end up here
567 // when we decorate constant objects coming from the input file, but
568 // on one event we can't set any decorations. For instance when the
569 // input container is empty. In that case the object will still list
570 // the auxiliary ID belonging to that decoration as being available,
571 // but it really isn't.
572 //
573 // Later on it might be needed to tweak the logic of all of this, but
574 // for now just silently returning 0 seems to do the right thing.
575 return nullptr;
576 }
577
578 // Now we should know this variable:
579 if (!hasEntryFor(auxid)) {
580 ::Fatal("xAOD::AuxStoreBase::getIOData",
581 XAOD_MESSAGE("Internal logic error detected"));
582 return nullptr;
583 }
584
585 // Make sure that the right payload is in memory:
586 if (!this_nc->getEntryFor(auxid).isSuccess()) {
587 ::Error("xAOD::AuxStoreBase::getIOData",
588 XAOD_MESSAGE("Couldn't read in variable %s"),
589 SG::AuxTypeRegistry::instance().getName(auxid).c_str());
590 return nullptr;
591 }
592
593 // Return the pointer.
594 return getInputObject(auxid);
595}
596
598const std::type_info* AuxStoreBase::getIOType(SG::auxid_t auxid) const {
599
600 // Guard against multi-threaded execution:
601 guard_t guard(m_mutex1);
602
603 // If the variable is connected to already:
604 if (hasEntryFor(auxid)) {
605 return getInputType(auxid);
606 }
607
608 // Check if it's in the transient store:
609 if (m_data.m_transientStore &&
610 m_data.m_transientStore->getAuxIDs().test(auxid)) {
611 return m_data.m_transientStore->getIOType(auxid);
612 }
613
614 // If not, try connecting to it now:
615 auto this_nc ATLAS_THREAD_SAFE =
616 const_cast<AuxStoreBase*>(this); // locked above
617 if (!this_nc->setupInputData(auxid).isSuccess()) {
618 ::Error("xAOD::AuxStoreBase::getIOType",
619 XAOD_MESSAGE("Couldn't connect to auxiliary variable "
620 "%i %s"),
621 static_cast<int>(auxid),
622 SG::AuxTypeRegistry::instance().getName(auxid).c_str());
623 return nullptr;
624 }
625
626 // Now we should know this variable:
627 if (!hasEntryFor(auxid)) {
628 ::Fatal("xAOD::AuxStoreBase::getIOType",
629 XAOD_MESSAGE("Internal logic error detected"));
630 return nullptr;
631 }
632
633 // Return the type info:
634 return getInputType(auxid);
635}
636
638
639 // All the auxiliary decorations handled by this object are considered
640 // dynamic:
641 return getAuxIDs();
642}
643
645void AuxStoreBase::selectAux(const std::set<std::string>& attributes) {
646
647 guard_t guard(m_mutex1);
648 m_selection.selectAux(attributes);
649}
650
653
654 // Guard against multi-threaded execution:
655 guard_t guard(m_mutex1);
656 // Leave the calculation up to the internal object:
657 return m_selection.getSelectedAuxIDs(m_data.m_auxIDs);
658}
659
669
670 // A temporary object:
671 SG::auxid_set_t auxids;
672 auxids.insert(auxid);
673
674 // Check if the auxid is returned as a selected ID:
675 return m_selection.getSelectedAuxIDs(auxids).size();
676}
677
678} // namespace xAOD::details
An auxiliary data store that holds data internally.
Handle mappings between names and auxid_t.
std::vector< size_t > vec
Exceptions that can be thrown from AthContainers.
#define XAOD_MESSAGE(MESSAGE)
Simple macro for printing error/verbose messages.
Abstract interface for manipulating vectors of arbitrary types.
Helper for getting a const version of a pointer.
Define macros for attributes used to control the static checker.
#define ATLAS_THREAD_SAFE
Handle mappings between names and auxid_t.
static AuxTypeRegistry & instance()
Return the singleton registry instance.
Exception — Attempted to modify auxiliary data in a locked store.
Interface for non-const operations on an auxiliary store.
Definition IAuxStore.h:51
Abstract interface for manipulating vectors of arbitrary types.
bool isLinked() const
Return true if this variable is linked from another one.
virtual void * toPtr()=0
Return a pointer to the start of the vector's data.
virtual bool insertMove(size_t pos, void *src, size_t src_pos, size_t src_n, IAuxStore &srcStore)=0
Insert elements into the vector via move semantics.
virtual bool shift(size_t pos, ptrdiff_t offs)=0
Shift the elements of the vector.
A set of aux data identifiers.
Definition AuxTypes.h:47
virtual ~AuxStoreBase()
Destructor.
virtual const SG::auxid_set_t & getWritableAuxIDs() const override
Return a set of writable data identifiers.
virtual SG::auxid_set_t getCopyIDs(bool warnUnlocked=false) const override
Get the set of variables that we should deep copy.
virtual void reset()=0
Reset all (transient) information in the object.
virtual void shift(std::size_t pos, std::ptrdiff_t offs) override
Shift the contents of the stored arrays.
virtual const SG::IAuxTypeVector * getVector(SG::auxid_t auxid) const override
Return vector interface for one aux data item.
mutex_t m_mutex1
Mutex objects used for multithreaded synchronisation.
virtual void lockDecoration(SG::auxid_t auxid) override
Lock a decoration.
virtual const void * getIOData(SG::auxid_t auxid) const override
Get a pointer to the data being stored for one aux data item.
virtual StatusCode setupOutputData(SG::auxid_t auxid)=0
Connect a variable to the output.
virtual void toTransient(const EventContext &ctx) override
Call toTransient on contained variables.
virtual const void * getData(SG::auxid_t auxid) const override
Get a pointer to a given array.
AuxSelection m_selection
Object helping to select which auxiliary variables to write.
const std::string & prefix() const
Get the currently configured object name prefix.
void setTopStore(bool value=true)
Set whether the object should behave as a "top store" or not.
virtual bool hasOutput() const =0
Check if an output is being written by the object.
bool isAuxIDSelected(SG::auxid_t auxid) const
Check if an auxiliary variable is selected for ouput writing.
void setStructMode(EStructMode mode)
Set the structure mode of the object to a new value.
virtual const SG::auxid_set_t & getDecorIDs() const override
Get the types(names) of decorations handled by this container.
bool isTopStore() const
Check if the object is a "top store", or not.
virtual const std::type_info * getIOType(SG::auxid_t auxid) const override
Return the type of the data to be stored for one aux data item.
virtual bool insertMove(std::size_t pos, SG::IAuxStore &other, const SG::auxid_set_t &ignore) override
Insert contents of another store via move.
virtual SG::auxid_set_t getSelectedAuxIDs() const override
Get the IDs of the selected aux variables.
virtual const std::type_info * getInputType(SG::auxid_t auxid) const =0
Get the type of an input object, for getIOType().
virtual bool clearDecorations() override
Remove the decorations added so far.
EStructMode
"Structural" modes of the object
@ kObjectStore
The object describes a single object.
virtual bool hasEntryFor(SG::auxid_t auxid) const =0
Check if a given variable is available from the input.
bool m_locked
Is this container locked?
virtual void reserve(std::size_t size) override
Reserve a given size for the arrays.
virtual bool isDecoration(SG::auxid_t auxid) const override
Test if a variable is a decoration.
virtual const SG::auxid_set_t & getDynamicAuxIDs() const override
Get the types(names) of variables created dynamically.
virtual const SG::auxid_set_t & getAuxIDs() const override
Get the types(names) of variables handled by this container.
AuxStoreBase(bool topStore=true, EStructMode mode=EStructMode::kUndefinedStore)
Constructor.
virtual const SG::IAuxTypeVector * linkedVector(SG::auxid_t auxid) const override
Return (const) interface for a linked variable.
virtual void * getDecoration(SG::auxid_t auxid, std::size_t size, std::size_t capacity) override
Get a pointer to a given array, creating the array if necessary.
EStructMode structMode() const
Get what structure mode the object was constructed with.
Members m_data
Member variables of the base class.
AthContainers_detail::lock_guard< mutex_t > guard_t
Guard type for multithreaded synchronisation.
virtual bool resize(std::size_t size) override
Resize the arrays to a given size.
virtual std::size_t size() const override
Return the number of elements in the store.
virtual const void * getInputObject(SG::auxid_t auxid) const =0
Get a pointer to an input object, as it is in memory, for getIOData().
virtual void selectAux(const std::set< std::string > &attributes)
Select dynamic auxiliary attributes for writing.
virtual void lock() override
Lock the object, and don't let decorations be added.
int r
Definition globals.cxx:22
const T * as_const_ptr(const T *p)
Helper for getting a const version of a pointer.
virtual SG::auxid_set_t getCopyIDs(bool warnUnlocked=false) const override
Return the set of variables to copy in a deep copy.
size_t auxid_t
Identifier for a particular aux data item.
Definition AuxTypes.h:27