ATLAS Offline Software
AuxContainerBase.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // System include(s):
6 #include <iostream>
7 #include <memory_resource>
8 
9 // EDM include(s):
13 
14 // Local include(s):
16 #include "xAODCore/tools/IOStats.h"
18 
19 #ifndef XAOD_STANDALONE
20 # include "GaudiKernel/ThreadLocalContext.h"
22 #endif // not XAOD_STANDALONE
23 
24 #include "CxxUtils/as_const_ptr.h"
26 
27 using namespace std;
28 
29 namespace xAOD {
30 
31  AuxContainerBase::AuxContainerBase( bool allowDynamicVars )
32  : AuxContainerBase( nullptr, allowDynamicVars ) {
33  }
34 
35  AuxContainerBase::AuxContainerBase( std::pmr::memory_resource* memResource,
36  bool allowDynamicVars )
37  : SG::IAuxStore(),
38  m_auxids(), m_vecs(), m_store( nullptr ), m_storeIO( nullptr ),
39  m_ownsStore( true ),
40  m_locked( false ),
41  m_name( "UNKNOWN" ),
42  m_memResource( memResource ){
43 
44  if( allowDynamicVars ) {
46  m_storeIO = dynamic_cast< SG::IAuxStoreIO* >( m_store );
47  }
48  }
49 
59  : SG::IAuxStore(),
60  m_auxids(), m_vecs(), m_store( nullptr ), m_storeIO( nullptr ),
61  m_ownsStore( true ),
62  m_locked( false ),
63  m_memResource( parent.m_memResource )
64  {
65  // Keep the source unmutable during copy
66  guard_t guard( parent.m_mutex );
67  m_name = parent.m_name;
68 
69  // Unfortunately the dynamic variables can not be copied this easily...
70  if( parent.m_store ) {
71  m_ownsStore = false;
72  // cppcheck-suppress copyCtorPointerCopying
73  m_store = parent.m_store;
74  m_storeIO = dynamic_cast< SG::IAuxStoreIO* >( m_store );
76  }
77  }
78 
85  std::pmr::memory_resource* memResource )
86  : SG::IAuxStore(),
87  m_auxids(), m_vecs(),
88  m_store( store ),
89  m_storeIO( nullptr ), m_ownsStore( false ),
90  m_locked( false),
91  m_name( "UNKNOWN" ),
92  m_memResource( memResource ){
93 
94  m_storeIO = dynamic_cast< SG::IAuxStoreIO* >( m_store );
95  if( m_store ) {
97  }
98  }
99 
101 
104  for( ; itr != end; ++itr ) {
105  if( ! *itr ) continue;
106  delete *itr;
107  }
108 
109  if( m_store && m_ownsStore ) delete m_store;
110  }
111 
120 
121  // Protect against self-assignment:
122  if( this == &rhs ) return *this;
123 
124  // Keep the objects locked during copy
125  std::scoped_lock lck{m_mutex, rhs.m_mutex};
126 
127  // Clean up after the old dynamic store:
128  if( m_store && m_ownsStore ) {
129  m_auxids -= m_store->getAuxIDs();
130  delete m_store;
131  }
132  m_store = nullptr;
133  m_storeIO = nullptr;
134  m_ownsStore = true;
135 
136  // Take posession of the new dynamic store:
137  if( rhs.m_store ) {
138  m_store = rhs.m_store;
139  m_ownsStore = false;
140  m_storeIO = dynamic_cast< SG::IAuxStoreIO* >( m_store );
142  }
143 
144  m_name = rhs.m_name;
145 
146  return *this;
147  }
148 
150  //
151  // Implementation of the SG::IAuxStoreHolder functions
152  //
153 
155  {
156  return m_store;
157  }
158 
159  std::pmr::memory_resource* AuxContainerBase::memResource()
160  {
161  const std::pmr::memory_resource* cptr = m_memResource.get();
162  std::pmr::memory_resource* ptr ATLAS_THREAD_SAFE = const_cast<std::pmr::memory_resource*>( cptr );
163  if( !ptr ) {
164 #ifndef XAOD_STANDALONE
165  const EventContext& ctx = Gaudi::Hive::currentContext();
166  if( Atlas::hasExtendedEventContext( ctx ) ) {
167  ptr = Atlas::getExtendedEventContext( ctx ).memResource();
168  }
169  if( !ptr )
170 #endif
171  {
172  ptr = std::pmr::get_default_resource();
173  }
174  if( ptr ) {
175  m_memResource.set( ptr );
176  }
177  }
178  return ptr;
179  }
180 
182  {
183  return m_store;
184  }
185 
196 
197  // Guard against multi-threaded execution:
198  guard_t guard( m_mutex );
199 
200  // Check that no funny business is going on:
201  if( m_store == store ) return;
202 
203  // Clean up the current store object:
204  if( m_store && m_ownsStore ) {
205  m_auxids -= m_store->getAuxIDs();
206  delete m_store;
207  }
208  m_store = nullptr;
209  m_storeIO = nullptr;
210 
211  // Take posession of the new object:
212  m_store = store;
213  m_storeIO = dynamic_cast< SG::IAuxStoreIO* >( m_store );
214  m_ownsStore = true;
215  if( m_store ) {
217  }
218 
219  return;
220  }
221 
222  //
224 
226  //
227  // Implementation of the SG::IConstAuxStore functions
228  //
229 
230  const void* AuxContainerBase::getData( auxid_t auxid ) const {
231 
232  const SG::IAuxTypeVector* v = getVector( auxid );
233  if( v ) {
234  return v->toPtr();
235  }
236  return nullptr;
237  }
238 
240 
241  // Guard against multi-threaded execution:
242  guard_t guard( m_mutex );
243 
244  if( ( auxid >= m_vecs.size() ) || ( ! m_vecs[ auxid ] ) ) {
245  if( m_store ) {
246  const SG::IAuxTypeVector* result = m_store->getVector( auxid );
247  if( result ) {
248  auxid_set_t& auxids_nc ATLAS_THREAD_SAFE =
249  const_cast<auxid_set_t&> (m_auxids);
250  auxids_nc.insert( auxid );
252  auxid_t linked_id = r.linkedVariable( auxid );
253  if (linked_id != SG::null_auxid) {
254  auxids_nc.insert( linked_id );
255  }
256  }
257  return result;
258  } else {
259  std::cout << "ERROR xAOD::AuxContainerBase::getData "
260  << "Unknown variable ("
262  << ") requested" << std::endl;
263  return nullptr;
264  }
265  }
266 
267  // Update the statistics for this variable. The dynamic store registers
268  // its own variable accesses.
270 
271  return m_vecs[ auxid ];
272  }
273 
276 
277  // Return the full list of IDs:
278  return getWritableAuxIDs();
279  }
280 
283 
284  if( m_store ) {
285  return m_store->getDecorIDs();
286  }
287  static const auxid_set_t empty;
288  return empty;
289  }
290 
292  {
293  guard_t guard( m_mutex );
294  if (m_store) {
295  return m_store->isDecoration (auxid);
296  }
297  return false;
298  }
299 
301  size_t capacity ) {
302  {
303  // Guard against multi-threaded execution:
304  guard_t guard( m_mutex );
305 
306  // Check if we have it as a static variable:
307  if( ( auxid >= m_vecs.size() ) || ( ! m_vecs[ auxid ] ) ) {
308  // If not, but we have a dynamic store, push it in there:
309  if( m_store ) {
310  void* result = m_store->getDecoration( auxid, size, capacity );
311  if( result ) {
312  m_auxids.insert( auxid );
314  auxid_t linked_id = r.linkedVariable( auxid );
315  if (linked_id != SG::null_auxid) {
316  m_auxids.insert( linked_id );
317  }
318  }
319  return result;
320  }
321  // If we don't have a dynamic store, complain:
322  else {
323  std::cout << "ERROR xAOD::AuxContainerBase::getDecoration "
324  << "Can't provide variable "
326  << std::endl;
327  return nullptr;
328  }
329  }
330 
331  // If the container is locked, static variables can't be accessed this
332  // way:
333  if( m_locked ) {
334  throw SG::ExcStoreLocked( auxid );
335  }
336  }
337 
338  // If the container is not locked, then fall back on the normal accessor
339  // function:
340  return getData( auxid, size, capacity );
341  }
342 
344 
345  // Guard against multi-threaded execution:
346  guard_t guard( m_mutex );
347 
348  // Lock the object and its dynamic store:
349  m_locked = true;
350  if( m_store ) {
351  m_store->lock();
352  }
353 
354  return;
355  }
356 
358 
359  // Guard against multi-threaded execution:
360  guard_t guard( m_mutex );
361 
362  // Clear the decorations from the dynamic store:
363  bool anycleared = false;
364  if( m_store ) {
365  anycleared = m_store->clearDecorations();
366  }
367  // Early exit if there were no decorations.
368  if (!anycleared) return false;
369 
370  // Construct the list of managed auxiliary variables from scratch after
371  // the cleanup:
373  for( auxid_t auxid = 0; auxid < m_vecs.size(); ++auxid ) {
374  if( m_vecs[ auxid ] ) {
375  ids.insert( auxid );
376  }
377  }
378  if( m_store ) {
379  ids.insert (m_store->getAuxIDs());
380  }
381  m_auxids = ids;
382 
383  return true;
384  }
385 
388  {
389  guard_t guard (m_mutex);
390  if (m_store) {
391  m_store->lockDecoration (auxid);
392  }
393  }
394 
395 
397  {
399  auxid_t linked_id = r.linkedVariable( auxid );
400  if (linked_id != SG::null_auxid) {
401  guard_t guard( m_mutex );
402  if (linked_id < m_vecs.size() && m_vecs[ linked_id ]) {
403  return m_vecs[ linked_id ];
404  }
405  if (m_store) {
406  return CxxUtils::as_const_ptr(m_store)->linkedVector( auxid );
407  }
408  }
409  return nullptr;
410  }
411 
412 
414  {
416  auxid_t linked_id = r.linkedVariable( auxid );
417  if (linked_id != SG::null_auxid) {
418  guard_t guard( m_mutex );
419  if (linked_id < m_vecs.size() && m_vecs[ linked_id ]) {
420  return m_vecs[ linked_id ];
421  }
422  if (m_store) {
423  return m_store->linkedVector( auxid );
424  }
425  }
426  return nullptr;
427  }
428 
429 
430  size_t AuxContainerBase::size() const {
431 
432  // Guard against multi-threaded execution:
433  guard_t guard (m_mutex);
434 
435  // Try to find a variable:
436  for (SG::auxid_t i : m_auxids) {
437  if( ( i < m_vecs.size() ) && m_vecs[ i ] && !m_vecs[ i ]->isLinked()) {
438  size_t sz = m_vecs[ i ]->size();
439  if( sz > 0 ) {
440  return sz;
441  }
442  }
443  }
444 
445  // If we didn't find any, let's ask the dynamic store:
446  if( m_store ) {
447  return m_store->size();
448  }
449 
450  // If we don't have any variables, then the size must be null:
451  return 0;
452  }
453 
454  //
456 
458  //
459  // Implementation of the SG::IAuxStore functions
460  //
461 
462  void* AuxContainerBase::getData( auxid_t auxid, size_t size,
463  size_t capacity ) {
464 
465  // Guard against multi-threaded execution:
466  guard_t guard( m_mutex );
467 
468  if( ( auxid >= m_vecs.size() ) || ( ! m_vecs[ auxid ] ) ) {
469 
470  if( m_store ) {
471  void* result = m_store->getData( auxid, size, capacity );
472  if( result ) {
473  m_auxids.insert( auxid );
475  auxid_t linked_id = r.linkedVariable( auxid );
476  if (linked_id != SG::null_auxid) {
477  m_auxids.insert( linked_id );
478  }
479  }
480  return result;
481  } else {
482  std::cout << "ERROR xAOD::AuxContainerBase::getData "
483  << "Unknown variable ("
485  << ") requested" << std::endl;
486  return nullptr;
487  }
488  }
489  m_vecs[ auxid ]->reserve( capacity );
490  if (m_vecs[ auxid ]->size() < size) {
491  m_vecs[ auxid ]->resize( size );
492  }
493 
494  return m_vecs[ auxid ]->toPtr();
495  }
496 
499 
500  // Return the full list of known IDs. The constness of this object's
501  // members comes from the object being const or not.
502  return m_auxids;
503  }
504 
506 
507  // Guard against multi-threaded execution:
508  guard_t guard( m_mutex );
509 
510  // This operation is not allowed on a locked container:
511  if( m_locked ) {
512  throw SG::ExcStoreLocked( "resize" );
513  }
514 
515  // Do the operation on the static variables:
516  bool nomoves = true;
517  for (SG::IAuxTypeVector* v : m_vecs) {
518  if(v && !v->isLinked()) {
519  if (!v->resize( size ))
520  nomoves = false;
521  }
522  }
523 
524  // Do the operation on the dynamic variables:
525  if( m_store ) {
526  if (!m_store->resize( size ))
527  nomoves = false;
528  }
529 
530  return nomoves;
531  }
532 
534 
535  // Guard against multi-threaded execution:
536  guard_t guard( m_mutex );
537 
538  // This operation is not allowed on a locked container:
539  if( m_locked ) {
540  throw SG::ExcStoreLocked( "reserve" );
541  }
542 
543  // Do the operation on the static variables:
544  for (SG::IAuxTypeVector* v : m_vecs) {
545  if(v && !v->isLinked()) {
546  v->reserve( size );
547  }
548  }
549 
550  // Do the operation on the dynamic variables:
551  if( m_store ) {
552  m_store->reserve( size );
553  }
554 
555  return;
556  }
557 
558  void AuxContainerBase::shift( size_t pos, ptrdiff_t offs ) {
559 
560  // Guard against multi-threaded execution:
561  guard_t guard( m_mutex );
562 
563  // This operation is not allowed on a locked container:
564  if( m_locked ) {
565  throw SG::ExcStoreLocked( "shift" );
566  }
567 
568  // Do the operation on the static variables:
569  for (SG::IAuxTypeVector* v : m_vecs) {
570  if(v && !v->isLinked()) {
571  v->shift( pos, offs );
572  }
573  }
574 
575  // Do the operation on the dynamic variables:
576  if( m_store ) {
577  m_store->shift( pos, offs );
578  }
579 
580  return;
581  }
582 
583 
585  IAuxStore& other,
586  const SG::auxid_set_t& ignore_in ) {
587  // Guard against multi-threaded execution:
588  guard_t guard( m_mutex );
589 
590  // This operation is not allowed on a locked container:
591  if( m_locked ) {
592  throw SG::ExcStoreLocked( "insertMove" );
593  }
594 
595  bool nomove = true;
596  size_t other_size = other.size();
597 
598  SG::auxid_set_t ignore = ignore_in;
599 
600  // Do the operation on the static variables:
601  for (SG::auxid_t id : m_auxids) {
602  SG::IAuxTypeVector* v_dst = nullptr;
603  if (id < m_vecs.size())
604  v_dst = m_vecs[id];
605  // Skip linked vars --- they should be taken care of by the parent var.
606  if (v_dst && !v_dst->isLinked()) {
607  ignore.insert (id);
608  if (other.getData (id)) {
609  void* src_ptr = other.getData (id, other_size, other_size);
610  if (src_ptr) {
611  if (!v_dst->insertMove (pos, src_ptr, 0, other_size,
612  other))
613  nomove = false;
614  }
615  }
616  else {
617  const void* orig = v_dst->toPtr();
618  v_dst->shift (pos, other_size);
619  if (orig != v_dst->toPtr())
620  nomove = false;
621  }
622  }
623  }
624 
625  // Do the operation on the dynamic variables:
626  if( m_store ) {
627  if (!m_store->insertMove( pos, other, ignore ))
628  nomove = false;
629 
630  // Notice any new variables added as a result of this.
632  }
633 
634  return nomove;
635  }
636 
637 
639  const SG::AuxDataOption& option ) {
640 
641  guard_t guard (m_mutex);
642  if (id < m_vecs.size() && m_vecs[id] != nullptr)
643  return m_vecs[id]->setOption (option);
644 
645  if (m_store)
646  return m_store->setOption (id, option);
647  return false;
648  }
649 
650 
651  //
653 
655  //
656  // Implementation of the SG::IAuxStoreIO functions
657  //
658 
659  const void* AuxContainerBase::getIOData( auxid_t auxid ) const {
660 
661  // Guard against multi-threaded execution:
662  guard_t guard( m_mutex );
663 
664  // If the variable is not static, look for it in the dynamic store:
665  if( ( auxid >= m_vecs.size() ) || ( ! m_vecs[ auxid ] ) ) {
666  if( m_storeIO ) {
667  return m_storeIO->getIOData( auxid );
668  } else {
669  std::cout << "ERROR xAOD::AuxContainerBase::getIOData "
670  << "Unknown variable ("
672  << ") requested" << std::endl;
673  return nullptr;
674  }
675  }
676 
677  // Update the statistics for this variable. The dynamic store registers
678  // its own variable accesses.
680 
681  return m_vecs[ auxid ]->toVector();
682  }
683 
684  const std::type_info* AuxContainerBase::getIOType( auxid_t auxid ) const {
685 
686  // Guard against multi-threaded execution:
687  guard_t guard( m_mutex );
688 
689  // If the variable is not static, ask the dynamic store:
690  if( ( auxid >= m_vecs.size() ) || ( ! m_vecs[ auxid ] ) ) {
691  if( m_storeIO ) {
692  return m_storeIO->getIOType( auxid );
693  }
694  }
695 
696  // Fall back on getting the information from the registry:
697  return SG::AuxTypeRegistry::instance().getVecType( auxid );
698  }
699 
702 
703  // Guard against multi-threaded execution:
704  guard_t guard( m_mutex );
705 
706  // All the variables handled by the internal store are dynamic
707  // if such a store exists:
708  if( m_storeIO ) {
709  // I mean, all the variables. Not just the ones reported as dynamic
710  // by the internal object. Because the internal object may be something
711  // that was put into this one in order to achieve data slimming.
712  return m_store->getAuxIDs();
713  }
714  // In case we don't use an internal store, there are no dynamic
715  // variables:
716  static const auxid_set_t dummy (0);
717  return dummy;
718  }
719 
722 
723  // Guard against multi-threaded execution:
724  guard_t guard( m_mutex );
725 
726  // All the variables handled by the internal store are dynamic
727  // if such a store exists:
728  if( m_storeIO ) {
729  // I mean, all the variables. Not just the ones reported as dynamic
730  // by the internal object. Because the internal object may be something
731  // that was put into this one in order to achieve data slimming.
732  return m_store->getAuxIDs();
733  }
734 
735  // In case we don't use an internal store, there are no dynamic
736  // variables:
737  return auxid_set_t();
738  }
739 
740  //
742 
743  const char* AuxContainerBase::name() const {
744 
745  return m_name.c_str();
746  }
747 
748  void AuxContainerBase::setName( const char* name ) {
749 
750  m_name = name;
751  return;
752  }
753 
754 } // namespace xAOD
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
xAOD::AuxContainerBase::m_name
std::string m_name
Name of the container in memory. Set externally.
Definition: AuxContainerBase.h:251
SG::IAuxTypeVector::shift
virtual bool shift(size_t pos, ptrdiff_t offs)=0
Shift the elements of the vector.
xAOD::AuxContainerBase::lock
virtual void lock() override
Lock the container.
Definition: AuxContainerBase.cxx:343
SG::IAuxTypeVector::isLinked
bool isLinked() const
Return true if this variable is linked from another one.
Definition: IAuxTypeVector.h:226
xAOD::AuxContainerBase::setStore
virtual void setStore(SG::IAuxStore *store) override
Set a different internal store object.
Definition: AuxContainerBase.cxx:195
SGTest::store
TestStore store
Definition: TestStore.cxx:23
beamspotman.r
def r
Definition: beamspotman.py:676
xAOD::AuxContainerBase::getIOType
virtual const std::type_info * getIOType(auxid_t auxid) const override
Return the type of the data to be stored for one aux data item.
Definition: AuxContainerBase.cxx:684
xAOD::name
name
Definition: TriggerMenuJson_v1.cxx:29
xAOD::AuxContainerBase::name
const char * name() const
Get the name of the container instance.
Definition: AuxContainerBase.cxx:743
SG::IAuxStore::insertMove
virtual bool insertMove(size_t pos, IAuxStore &other, const SG::auxid_set_t &ignore=SG::auxid_set_t())=0
Move all elements from other to this store.
SG::IConstAuxStore::lockDecoration
virtual void lockDecoration(SG::auxid_t auxid)=0
Lock a decoration.
fitman.sz
sz
Definition: fitman.py:527
get_generator_info.result
result
Definition: get_generator_info.py:21
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
SG::IConstAuxStore::getVector
virtual const IAuxTypeVector * getVector(SG::auxid_t auxid) const =0
Return vector interface for one aux data item.
xAOD::AuxContainerBase::clearDecorations
virtual bool clearDecorations() override
Clear all decorations.
Definition: AuxContainerBase.cxx:357
xAOD::IOStats::stats
ReadStats & stats()
Access the object belonging to the current thread.
Definition: IOStats.cxx:17
SG::AuxTypeRegistry::instance
static AuxTypeRegistry & instance()
Return the singleton registry instance.
Definition: AuxTypeRegistry.cxx:639
xAOD::AuxContainerBase::m_store
SG::IAuxStore * m_store
Internal dynamic auxiliary store object.
Definition: AuxContainerBase.h:237
xAOD::AuxContainerBase::memResource
std::pmr::memory_resource * memResource()
Return the memory resource to use.
Definition: AuxContainerBase.cxx:159
xAOD::AuxContainerBase::linkedVector
virtual const SG::IAuxTypeVector * linkedVector(SG::auxid_t auxid) const override
Return interface for a linked variable.
Definition: AuxContainerBase.cxx:396
ExtendedEventContext.h
xAOD::AuxContainerBase::operator=
AuxContainerBase & operator=(const AuxContainerBase &rhs)
Assignment operator.
Definition: AuxContainerBase.cxx:119
SG::AuxTypeRegistry::getName
std::string getName(SG::auxid_t auxid) const
Return the name of an aux data item.
Definition: AuxTypeRegistry.cxx:881
xAOD::AuxContainerBase::guard_t
AthContainers_detail::lock_guard< mutex_t > guard_t
Definition: AuxContainerBase.h:247
xAOD::AuxContainerBase::getAuxIDs
virtual const auxid_set_t & getAuxIDs() const override
Get the types(names) of variables handled by this container.
Definition: AuxContainerBase.cxx:275
SG::ExcStoreLocked
Exception — Attempted to modify auxiliary data in a locked store.
Definition: Control/AthContainers/AthContainers/exceptions.h:183
xAOD::AuxContainerBase::setOption
virtual bool setOption(auxid_t id, const SG::AuxDataOption &option) override
Make an option setting on an aux variable.
Definition: AuxContainerBase.cxx:638
Atlas::hasExtendedEventContext
bool hasExtendedEventContext(const EventContext &ctx)
Test whether a context object has an extended context installed.
Definition: ExtendedEventContext.cxx:23
exceptions.h
Exceptions that can be thrown from AthContainers.
xAOD::AuxContainerBase::isDecoration
virtual bool isDecoration(auxid_t auxid) const override
Test if a variable is a decoration.
Definition: AuxContainerBase.cxx:291
AuxContainerBase.h
as_const_ptr.h
Helper for getting a const version of a pointer.
xAOD::AuxContainerBase
Common base class for the auxiliary containers.
Definition: AuxContainerBase.h:59
xAOD::other
@ other
Definition: TrackingPrimitives.h:509
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
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
IOStats.h
SG::IAuxStoreIO::getIOType
virtual const std::type_info * getIOType(SG::auxid_t auxid) const =0
Return the type of the data to be stored for one aux data item.
xAOD::AuxContainerBase::m_mutex
mutex_t m_mutex
Definition: AuxContainerBase.h:248
empty
bool empty(TH1 *h)
Definition: computils.cxx:295
xAOD::AuxContainerBase::resize
virtual bool resize(size_t size) override
Resize the arrays to a given size.
Definition: AuxContainerBase.cxx:505
SG::IConstAuxStore::size
virtual size_t size() const =0
Return the number of elements in the store.
SG::IAuxStore::shift
virtual void shift(size_t pos, ptrdiff_t offs)=0
Shift the elements of the container.
SG::IAuxStore::linkedVector
virtual IAuxTypeVector * linkedVector(SG::auxid_t)
Definition: IAuxStore.h:187
xAOD::AuxContainerBase::~AuxContainerBase
~AuxContainerBase()
Destructor.
Definition: AuxContainerBase.cxx:100
SG::IAuxStoreIO
Interface providing I/O for a generic auxiliary store.
Definition: IAuxStoreIO.h:44
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
xAOD::AuxContainerBase::getStore
virtual SG::IAuxStore * getStore() override
Get the currently used internal store object.
Definition: AuxContainerBase.cxx:154
SG::AuxTypeRegistry
Handle mappings between names and auxid_t.
Definition: AuxTypeRegistry.h:61
Atlas::getExtendedEventContext
const ExtendedEventContext & getExtendedEventContext(const EventContext &ctx)
Retrieve an extended context from a context object.
Definition: ExtendedEventContext.cxx:32
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
xAOD::AuxContainerBase::size
virtual size_t size() const override
Get the size of the container.
Definition: AuxContainerBase.cxx:430
DiTauMassTools::ignore
void ignore(T &&)
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:58
xAOD::AuxContainerBase::getDynamicAuxIDs
virtual const auxid_set_t & getDynamicAuxIDs() const override
Get the types(names) of variables created dynamically.
Definition: AuxContainerBase.cxx:701
xAOD::AuxContainerBase::reserve
virtual void reserve(size_t size) override
Reserve a given size for the arrays.
Definition: AuxContainerBase.cxx:533
SG::IAuxStore::setOption
virtual bool setOption(auxid_t, const AuxDataOption &)
Set an option for a given auxiliary variable.
Definition: IAuxStore.h:173
SG::auxid_t
size_t auxid_t
Identifier for a particular aux data item.
Definition: AuxTypes.h:27
SG::IConstAuxStore::clearDecorations
virtual bool clearDecorations()=0
Clear all decorations.
ReadStats.h
xAOD::AuxContainerBase::auxid_set_t
SG::auxid_set_t auxid_set_t
The aux ID set type definition.
Definition: AuxContainerBase.h:65
xAOD::AuxContainerBase::m_auxids
auxid_set_t m_auxids
Internal list of all available variables.
Definition: AuxContainerBase.h:232
xAOD::AuxContainerBase::m_vecs
std::vector< SG::IAuxTypeVector * > m_vecs
Internal list of all managed variables.
Definition: AuxContainerBase.h:234
lumiFormat.i
int i
Definition: lumiFormat.py:85
CxxUtils::ConcurrentBitset::insert
ConcurrentBitset & insert(bit_t bit, bit_t new_nbits=0)
Set a bit to 1.
xAOD::AuxContainerBase::shift
virtual void shift(size_t pos, ptrdiff_t offs) override
Shift the contents of the stored arrays.
Definition: AuxContainerBase.cxx:558
test_pyathena.parent
parent
Definition: test_pyathena.py:15
python.xAODType.dummy
dummy
Definition: xAODType.py:4
SG::IConstAuxStore::getDecoration
virtual void * getDecoration(auxid_t auxid, size_t size, size_t capacity)=0
Return the data vector for one aux data decoration item.
xAOD::AuxContainerBase::getDecorIDs
virtual const auxid_set_t & getDecorIDs() const override
Get the types(names) of decorations handled by this container.
Definition: AuxContainerBase.cxx:282
SG::AuxTypeRegistry::getVecType
const std::type_info * getVecType(SG::auxid_t auxid) const
Return the type of the STL vector used to hold an aux data item.
Definition: AuxTypeRegistry.cxx:936
xAOD::AuxContainerBase::getDecoration
virtual void * getDecoration(auxid_t auxid, size_t size, size_t capacity) override
Get a pointer to a given array, as a decoration.
Definition: AuxContainerBase.cxx:300
xAOD::IOStats::instance
static IOStats & instance()
Singleton object accessor.
Definition: IOStats.cxx:11
SG::AuxDataOption
Hold information about an option setting request.
Definition: AuxDataOption.h:37
xAOD::AuxContainerBase::getSelectedAuxIDs
virtual SG::auxid_set_t getSelectedAuxIDs() const override
Get the IDs of the selected dynamic Aux variables (for writing)
Definition: AuxContainerBase.cxx:721
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:227
python.subdetectors.mmg.ids
ids
Definition: mmg.py:8
xAOD::AuxContainerBase::getVector
virtual const SG::IAuxTypeVector * getVector(SG::auxid_t auxid) const override final
Return vector interface for one aux data item.
Definition: AuxContainerBase.cxx:239
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::AuxContainerBase::getWritableAuxIDs
virtual const auxid_set_t & getWritableAuxIDs() const override
Return a set of writable data identifiers.
Definition: AuxContainerBase.cxx:498
SG::IAuxStoreIO::getIOData
virtual const void * getIOData(SG::auxid_t auxid) const =0
Return a pointer to the data to be stored for one aux data item.
xAOD::AuxContainerBase::getData
virtual const void * getData(auxid_t auxid) const override
Get a pointer to a given array.
Definition: AuxContainerBase.cxx:230
xAOD::ReadStats::readBranch
void readBranch(const std::string &prefix, SG::auxid_t auxid)
Function incrementing the read counter on a specific branch.
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
xAOD::AuxContainerBase::auxid_t
SG::auxid_t auxid_t
The aux ID type definition.
Definition: AuxContainerBase.h:63
SG::IAuxStore
Interface for non-const operations on an auxiliary store.
Definition: IAuxStore.h:48
SG::AuxStoreInternal
An auxiliary data store that holds data internally.
Definition: AuxStoreInternal.h:43
python.PyAthena.v
v
Definition: PyAthena.py:154
xAOD::AuxContainerBase::ATLAS_THREAD_SAFE
CxxUtils::CachedPointer< std::pmr::memory_resource > m_memResource ATLAS_THREAD_SAFE
Memory resource to use for this container.
Definition: AuxContainerBase.h:254
SG::IAuxStore::getData
virtual void * getData(auxid_t auxid, size_t size, size_t capacity)=0
Return the data vector for one aux data item.
xAOD::AuxContainerBase::insertMove
virtual bool insertMove(size_t pos, IAuxStore &other, const SG::auxid_set_t &ignore) override
Insert contents of another store via move.
Definition: AuxContainerBase.cxx:584
xAOD::AuxContainerBase::m_locked
bool m_locked
Has the container been locked?
Definition: AuxContainerBase.h:243
SG::IAuxTypeVector
Abstract interface for manipulating vectors of arbitrary types.
Definition: IAuxTypeVector.h:42
xAOD::AuxContainerBase::lockDecoration
virtual void lockDecoration(SG::auxid_t auxid) override
Lock a decoration.
Definition: AuxContainerBase.cxx:387
xAOD::AuxContainerBase::m_ownsStore
bool m_ownsStore
Flag deciding if the object owns the dynamic store or not.
Definition: AuxContainerBase.h:241
SG::IConstAuxStore::getDecorIDs
virtual const SG::auxid_set_t & getDecorIDs() const =0
Return a set of identifiers for decorations in this store.
AuxTypeRegistry.h
Handle mappings between names and auxid_t.
SG::IConstAuxStore::lock
virtual void lock()=0
Lock the container.
xAOD::AuxContainerBase::m_storeIO
SG::IAuxStoreIO * m_storeIO
The IO interface to the internal auxiliary store.
Definition: AuxContainerBase.h:239
xAOD::AuxContainerBase::AuxContainerBase
AuxContainerBase(bool allowDynamicVars=true)
Default constructor.
Definition: AuxContainerBase.cxx:31
xAOD::AuxContainerBase::getIOData
virtual const void * getIOData(auxid_t auxid) const override
Get a pointer to the data being stored for one aux data item.
Definition: AuxContainerBase.cxx:659
SG::IAuxStore::resize
virtual bool resize(size_t sz)=0
Change the size of all aux data vectors.
SG::auxid_set_t
A set of aux data identifiers.
Definition: AuxTypes.h:47
xAOD::AuxContainerBase::setName
void setName(const char *name)
Set the name of the container instance.
Definition: AuxContainerBase.cxx:748
SG::IConstAuxStore::isDecoration
virtual bool isDecoration(auxid_t auxid) const =0
Test if a particular variable is tagged as a decoration.
checker_macros.h
Define macros for attributes used to control the static checker.
AuxStoreInternal.h
An auxiliary data store that holds data internally.
SG::IConstAuxStore::getAuxIDs
virtual const SG::auxid_set_t & getAuxIDs() const =0
Return a set of identifiers for existing data items in this store.
SG::IAuxTypeVector::toPtr
virtual void * toPtr()=0
Return a pointer to the start of the vector's data.
SG::IAuxStore::reserve
virtual void reserve(size_t sz)=0
Change the capacity of all aux data vectors.