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