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"
21 #endif // not XAOD_STANDALONE
22 
23 #include "CxxUtils/as_const_ptr.h"
25 
26 using namespace std;
27 
28 namespace xAOD {
29 
30  AuxContainerBase::AuxContainerBase( bool allowDynamicVars )
31  : AuxContainerBase( nullptr, allowDynamicVars ) {
32  }
33 
34  AuxContainerBase::AuxContainerBase( std::pmr::memory_resource* memResource,
35  bool allowDynamicVars )
36  : SG::IAuxStore(),
37  m_auxids(), m_vecs(), m_store( nullptr ), m_storeIO( nullptr ),
38  m_ownsStore( true ),
39  m_locked( false ),
40  m_name( "UNKNOWN" ),
41  m_memResource( memResource ){
42 
43  if( allowDynamicVars ) {
45  m_storeIO = dynamic_cast< SG::IAuxStoreIO* >( m_store );
46  }
47  }
48 
58  : SG::IAuxStore(),
59  m_auxids(), m_vecs(), m_store( nullptr ), m_storeIO( nullptr ),
60  m_ownsStore( true ),
61  m_locked( false ),
62  m_memResource( parent.m_memResource )
63  {
64  // Keep the source unmutable during copy
65  guard_t guard( parent.m_mutex );
66  m_name = parent.m_name;
67 
68  // Unfortunately the dynamic variables can not be copied this easily...
69  if( parent.m_store ) {
70  m_ownsStore = false;
71  // cppcheck-suppress copyCtorPointerCopying
72  m_store = parent.m_store;
73  m_storeIO = dynamic_cast< SG::IAuxStoreIO* >( m_store );
75  }
76  }
77 
84  std::pmr::memory_resource* memResource )
85  : SG::IAuxStore(),
86  m_auxids(), m_vecs(),
87  m_store( store ),
88  m_storeIO( nullptr ), m_ownsStore( false ),
89  m_locked( false),
90  m_name( "UNKNOWN" ),
91  m_memResource( memResource ){
92 
93  m_storeIO = dynamic_cast< SG::IAuxStoreIO* >( m_store );
94  if( m_store ) {
96  }
97  }
98 
100 
103  for( ; itr != end; ++itr ) {
104  if( ! *itr ) continue;
105  delete *itr;
106  }
107 
108  if( m_store && m_ownsStore ) delete m_store;
109  }
110 
119 
120  // Protect against self-assignment:
121  if( this == &rhs ) return *this;
122 
123  // Keep the objects locked during copy
124  std::scoped_lock lck{m_mutex, rhs.m_mutex};
125 
126  // Clean up after the old dynamic store:
127  if( m_store && m_ownsStore ) {
128  m_auxids -= m_store->getAuxIDs();
129  delete m_store;
130  }
131  m_store = nullptr;
132  m_storeIO = nullptr;
133  m_ownsStore = true;
134 
135  // Take posession of the new dynamic store:
136  if( rhs.m_store ) {
137  m_store = rhs.m_store;
138  m_ownsStore = false;
139  m_storeIO = dynamic_cast< SG::IAuxStoreIO* >( m_store );
141  }
142 
143  m_name = rhs.m_name;
144 
145  return *this;
146  }
147 
149  //
150  // Implementation of the SG::IAuxStoreHolder functions
151  //
152 
154  {
155  return m_store;
156  }
157 
158  std::pmr::memory_resource* AuxContainerBase::memResource()
159  {
160  const std::pmr::memory_resource* cptr = m_memResource.get();
161  std::pmr::memory_resource* ptr ATLAS_THREAD_SAFE = const_cast<std::pmr::memory_resource*>( cptr );
162  if( !ptr ) {
163 #ifndef XAOD_STANDALONE
164  const EventContext& ctx = Gaudi::Hive::currentContext();
165  if( Atlas::hasExtendedEventContext( ctx ) ) {
166  ptr = Atlas::getExtendedEventContext( ctx ).memResource();
167  }
168  if( !ptr )
169 #endif
170  {
171  ptr = std::pmr::get_default_resource();
172  }
173  if( ptr ) {
174  m_memResource.set( ptr );
175  }
176  }
177  return ptr;
178  }
179 
181  {
182  return m_store;
183  }
184 
195 
196  // Guard against multi-threaded execution:
197  guard_t guard( m_mutex );
198 
199  // Check that no funny business is going on:
200  if( m_store == store ) return;
201 
202  // Clean up the current store object:
203  if( m_store && m_ownsStore ) {
204  m_auxids -= m_store->getAuxIDs();
205  delete m_store;
206  }
207  m_store = nullptr;
208  m_storeIO = nullptr;
209 
210  // Take posession of the new object:
211  m_store = store;
212  m_storeIO = dynamic_cast< SG::IAuxStoreIO* >( m_store );
213  m_ownsStore = true;
214  if( m_store ) {
216  }
217 
218  return;
219  }
220 
221  //
223 
225  //
226  // Implementation of the SG::IConstAuxStore functions
227  //
228 
229  const void* AuxContainerBase::getData( auxid_t auxid ) const {
230 
231  // Guard against multi-threaded execution:
232  guard_t guard( m_mutex );
233 
234  if( ( auxid >= m_vecs.size() ) || ( ! m_vecs[ auxid ] ) ) {
235  if( m_store ) {
236  const void* result = m_store->getData( auxid );
237  if( result ) {
238  auxid_set_t& auxids_nc ATLAS_THREAD_SAFE =
239  const_cast<auxid_set_t&> (m_auxids);
240  auxids_nc.insert( auxid );
242  auxid_t linked_id = r.linkedVariable( auxid );
243  if (linked_id != SG::null_auxid) {
244  auxids_nc.insert( linked_id );
245  }
246  }
247  return result;
248  } else {
249  std::cout << "ERROR xAOD::AuxContainerBase::getData "
250  << "Unknown variable ("
252  << ") requested" << std::endl;
253  return nullptr;
254  }
255  }
256 
257  // Update the statistics for this variable. The dynamic store registers
258  // its own variable accesses.
260 
261  return m_vecs[ auxid ]->toPtr();
262  }
263 
266 
267  // Return the full list of IDs:
268  return getWritableAuxIDs();
269  }
270 
272  {
273  guard_t guard( m_mutex );
274  if (m_store) {
275  return m_store->isDecoration (auxid);
276  }
277  return false;
278  }
279 
281  size_t capacity ) {
282  {
283  // Guard against multi-threaded execution:
284  guard_t guard( m_mutex );
285 
286  // Check if we have it as a static variable:
287  if( ( auxid >= m_vecs.size() ) || ( ! m_vecs[ auxid ] ) ) {
288  // If not, but we have a dynamic store, push it in there:
289  if( m_store ) {
290  void* result = m_store->getDecoration( auxid, size, capacity );
291  if( result ) {
292  m_auxids.insert( auxid );
294  auxid_t linked_id = r.linkedVariable( auxid );
295  if (linked_id != SG::null_auxid) {
296  m_auxids.insert( linked_id );
297  }
298  }
299  return result;
300  }
301  // If we don't have a dynamic store, complain:
302  else {
303  std::cout << "ERROR xAOD::AuxContainerBase::getDecoration "
304  << "Can't provide variable "
306  << std::endl;
307  return nullptr;
308  }
309  }
310 
311  // If the container is locked, static variables can't be accessed this
312  // way:
313  if( m_locked ) {
314  throw SG::ExcStoreLocked( auxid );
315  }
316  }
317 
318  // If the container is not locked, then fall back on the normal accessor
319  // function:
320  return getData( auxid, size, capacity );
321  }
322 
324 
325  // Guard against multi-threaded execution:
326  guard_t guard( m_mutex );
327 
328  // Lock the object and its dynamic store:
329  m_locked = true;
330  if( m_store ) {
331  m_store->lock();
332  }
333 
334  return;
335  }
336 
338 
339  // Guard against multi-threaded execution:
340  guard_t guard( m_mutex );
341 
342  // Clear the decorations from the dynamic store:
343  bool anycleared = false;
344  if( m_store ) {
345  anycleared = m_store->clearDecorations();
346  }
347  // Early exit if there were no decorations.
348  if (!anycleared) return false;
349 
350  // Construct the list of managed auxiliary variables from scratch after
351  // the cleanup:
353  for( auxid_t auxid = 0; auxid < m_vecs.size(); ++auxid ) {
354  if( m_vecs[ auxid ] ) {
355  ids.insert( auxid );
356  }
357  }
358  if( m_store ) {
359  ids.insert (m_store->getAuxIDs());
360  }
361  m_auxids = ids;
362 
363  return true;
364  }
365 
368  {
369  guard_t guard (m_mutex);
370  if (m_store) {
371  m_store->lockDecoration (auxid);
372  }
373  }
374 
375 
377  {
379  auxid_t linked_id = r.linkedVariable( auxid );
380  if (linked_id != SG::null_auxid) {
381  guard_t guard( m_mutex );
382  if (linked_id < m_vecs.size() && m_vecs[ linked_id ]) {
383  return m_vecs[ linked_id ];
384  }
385  if (m_store) {
386  return CxxUtils::as_const_ptr(m_store)->linkedVector( auxid );
387  }
388  }
389  return nullptr;
390  }
391 
392 
394  {
396  auxid_t linked_id = r.linkedVariable( auxid );
397  if (linked_id != SG::null_auxid) {
398  guard_t guard( m_mutex );
399  if (linked_id < m_vecs.size() && m_vecs[ linked_id ]) {
400  return m_vecs[ linked_id ];
401  }
402  if (m_store) {
403  return m_store->linkedVector( auxid );
404  }
405  }
406  return nullptr;
407  }
408 
409 
410  size_t AuxContainerBase::size() const {
411 
412  // Guard against multi-threaded execution:
413  guard_t guard (m_mutex);
414 
415  // Try to find a variable:
416  for (SG::auxid_t i : m_auxids) {
417  if( ( i < m_vecs.size() ) && m_vecs[ i ] && !m_vecs[ i ]->isLinked()) {
418  size_t sz = m_vecs[ i ]->size();
419  if( sz > 0 ) {
420  return sz;
421  }
422  }
423  }
424 
425  // If we didn't find any, let's ask the dynamic store:
426  if( m_store ) {
427  return m_store->size();
428  }
429 
430  // If we don't have any variables, then the size must be null:
431  return 0;
432  }
433 
434  //
436 
438  //
439  // Implementation of the SG::IAuxStore functions
440  //
441 
442  void* AuxContainerBase::getData( auxid_t auxid, size_t size,
443  size_t capacity ) {
444 
445  // Guard against multi-threaded execution:
446  guard_t guard( m_mutex );
447 
448  if( ( auxid >= m_vecs.size() ) || ( ! m_vecs[ auxid ] ) ) {
449 
450  if( m_store ) {
451  void* result = m_store->getData( auxid, size, capacity );
452  if( result ) {
453  m_auxids.insert( auxid );
455  auxid_t linked_id = r.linkedVariable( auxid );
456  if (linked_id != SG::null_auxid) {
457  m_auxids.insert( linked_id );
458  }
459  }
460  return result;
461  } else {
462  std::cout << "ERROR xAOD::AuxContainerBase::getData "
463  << "Unknown variable ("
465  << ") requested" << std::endl;
466  return nullptr;
467  }
468  }
469  m_vecs[ auxid ]->reserve( capacity );
470  if (m_vecs[ auxid ]->size() < size) {
471  m_vecs[ auxid ]->resize( size );
472  }
473 
474  return m_vecs[ auxid ]->toPtr();
475  }
476 
479 
480  // Return the full list of known IDs. The constness of this object's
481  // members comes from the object being const or not.
482  return m_auxids;
483  }
484 
486 
487  // Guard against multi-threaded execution:
488  guard_t guard( m_mutex );
489 
490  // This operation is not allowed on a locked container:
491  if( m_locked ) {
492  throw SG::ExcStoreLocked( "resize" );
493  }
494 
495  // Do the operation on the static variables:
496  bool nomoves = true;
497  for (SG::IAuxTypeVector* v : m_vecs) {
498  if(v && !v->isLinked()) {
499  if (!v->resize( size ))
500  nomoves = false;
501  }
502  }
503 
504  // Do the operation on the dynamic variables:
505  if( m_store ) {
506  if (!m_store->resize( size ))
507  nomoves = false;
508  }
509 
510  return nomoves;
511  }
512 
514 
515  // Guard against multi-threaded execution:
516  guard_t guard( m_mutex );
517 
518  // This operation is not allowed on a locked container:
519  if( m_locked ) {
520  throw SG::ExcStoreLocked( "reserve" );
521  }
522 
523  // Do the operation on the static variables:
524  for (SG::IAuxTypeVector* v : m_vecs) {
525  if(v && !v->isLinked()) {
526  v->reserve( size );
527  }
528  }
529 
530  // Do the operation on the dynamic variables:
531  if( m_store ) {
532  m_store->reserve( size );
533  }
534 
535  return;
536  }
537 
538  void AuxContainerBase::shift( size_t pos, ptrdiff_t offs ) {
539 
540  // Guard against multi-threaded execution:
541  guard_t guard( m_mutex );
542 
543  // This operation is not allowed on a locked container:
544  if( m_locked ) {
545  throw SG::ExcStoreLocked( "shift" );
546  }
547 
548  // Do the operation on the static variables:
549  for (SG::IAuxTypeVector* v : m_vecs) {
550  if(v && !v->isLinked()) {
551  v->shift( pos, offs );
552  }
553  }
554 
555  // Do the operation on the dynamic variables:
556  if( m_store ) {
557  m_store->shift( pos, offs );
558  }
559 
560  return;
561  }
562 
563 
565  IAuxStore& other,
566  const SG::auxid_set_t& ignore_in ) {
567  // Guard against multi-threaded execution:
568  guard_t guard( m_mutex );
569 
570  // This operation is not allowed on a locked container:
571  if( m_locked ) {
572  throw SG::ExcStoreLocked( "insertMove" );
573  }
574 
576  bool nomove = true;
577  size_t other_size = other.size();
578 
579  SG::auxid_set_t ignore = ignore_in;
580 
581  // Do the operation on the static variables:
582  for (SG::auxid_t id : m_auxids) {
583  SG::IAuxTypeVector* v_dst = nullptr;
584  if (id < m_vecs.size())
585  v_dst = m_vecs[id];
586  // Skip linked vars --- they should be taken care of by the parent var.
587  if (v_dst && !v_dst->isLinked()) {
588  ignore.insert (id);
589  if (other.getData (id)) {
590  void* src_ptr = other.getData (id, other_size, other_size);
591  if (src_ptr) {
592  if (!v_dst->insertMove (pos, src_ptr,
593  reinterpret_cast<char*>(src_ptr) + other_size*r.getEltSize(id),
594  other))
595  nomove = false;
596  }
597  }
598  else {
599  const void* orig = v_dst->toPtr();
600  v_dst->shift (pos, other_size);
601  if (orig != v_dst->toPtr())
602  nomove = false;
603  }
604  }
605  }
606 
607  // Do the operation on the dynamic variables:
608  if( m_store ) {
609  if (!m_store->insertMove( pos, other, ignore ))
610  nomove = false;
611 
612  // Notice any new variables added as a result of this.
614  }
615 
616  return nomove;
617  }
618 
619 
621  const SG::AuxDataOption& option ) {
622 
623  guard_t guard (m_mutex);
624  if (id < m_vecs.size() && m_vecs[id] != nullptr)
625  return m_vecs[id]->setOption (option);
626 
627  if (m_store)
628  return m_store->setOption (id, option);
629  return false;
630  }
631 
632 
633  //
635 
637  //
638  // Implementation of the SG::IAuxStoreIO functions
639  //
640 
641  const void* AuxContainerBase::getIOData( auxid_t auxid ) const {
642 
643  // Guard against multi-threaded execution:
644  guard_t guard( m_mutex );
645 
646  // If the variable is not static, look for it in the dynamic store:
647  if( ( auxid >= m_vecs.size() ) || ( ! m_vecs[ auxid ] ) ) {
648  if( m_storeIO ) {
649  return m_storeIO->getIOData( auxid );
650  } else {
651  std::cout << "ERROR xAOD::AuxContainerBase::getIOData "
652  << "Unknown variable ("
654  << ") requested" << std::endl;
655  return nullptr;
656  }
657  }
658 
659  // Update the statistics for this variable. The dynamic store registers
660  // its own variable accesses.
662 
663  return m_vecs[ auxid ]->toVector();
664  }
665 
666  const std::type_info* AuxContainerBase::getIOType( auxid_t auxid ) const {
667 
668  // Guard against multi-threaded execution:
669  guard_t guard( m_mutex );
670 
671  // If the variable is not static, ask the dynamic store:
672  if( ( auxid >= m_vecs.size() ) || ( ! m_vecs[ auxid ] ) ) {
673  if( m_storeIO ) {
674  return m_storeIO->getIOType( auxid );
675  }
676  }
677 
678  // Fall back on getting the information from the registry:
679  return SG::AuxTypeRegistry::instance().getVecType( auxid );
680  }
681 
684 
685  // Guard against multi-threaded execution:
686  guard_t guard( m_mutex );
687 
688  // All the variables handled by the internal store are dynamic
689  // if such a store exists:
690  if( m_storeIO ) {
691  // I mean, all the variables. Not just the ones reported as dynamic
692  // by the internal object. Because the internal object may be something
693  // that was put into this one in order to achieve data slimming.
694  return m_store->getAuxIDs();
695  }
696  // In case we don't use an internal store, there are no dynamic
697  // variables:
698  static const auxid_set_t dummy (0);
699  return dummy;
700  }
701 
704 
705  // Guard against multi-threaded execution:
706  guard_t guard( m_mutex );
707 
708  // All the variables handled by the internal store are dynamic
709  // if such a store exists:
710  if( m_storeIO ) {
711  // I mean, all the variables. Not just the ones reported as dynamic
712  // by the internal object. Because the internal object may be something
713  // that was put into this one in order to achieve data slimming.
714  return m_store->getAuxIDs();
715  }
716 
717  // In case we don't use an internal store, there are no dynamic
718  // variables:
719  return auxid_set_t();
720  }
721 
722  //
724 
725  const char* AuxContainerBase::name() const {
726 
727  return m_name.c_str();
728  }
729 
730  void AuxContainerBase::setName( const char* name ) {
731 
732  m_name = name;
733  return;
734  }
735 
736 } // 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:245
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:323
SG::IAuxTypeVector::isLinked
bool isLinked() const
Return true if this variable is linked from another one.
Definition: IAuxTypeVector.h:221
xAOD::AuxContainerBase::setStore
virtual void setStore(SG::IAuxStore *store) override
Set a different internal store object.
Definition: AuxContainerBase.cxx:194
beamspotman.r
def r
Definition: beamspotman.py:676
store
StoreGateSvc * store
Definition: fbtTestBasics.cxx:69
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:666
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:725
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
xAOD::AuxContainerBase::clearDecorations
virtual bool clearDecorations() override
Clear all decorations.
Definition: AuxContainerBase.cxx:337
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:49
xAOD::AuxContainerBase::m_store
SG::IAuxStore * m_store
Internal dynamic auxiliary store object.
Definition: AuxContainerBase.h:231
xAOD::AuxContainerBase::memResource
std::pmr::memory_resource * memResource()
Return the memory resource to use.
Definition: AuxContainerBase.cxx:158
xAOD::AuxContainerBase::linkedVector
virtual const SG::IAuxTypeVector * linkedVector(SG::auxid_t auxid) const override
Return interface for a linked variable.
Definition: AuxContainerBase.cxx:376
xAOD::AuxContainerBase::operator=
AuxContainerBase & operator=(const AuxContainerBase &rhs)
Assignment operator.
Definition: AuxContainerBase.cxx:118
SG::AuxTypeRegistry::getName
std::string getName(SG::auxid_t auxid) const
Return the name of an aux data item.
Definition: AuxTypeRegistry.cxx:277
xAOD::AuxContainerBase::guard_t
AthContainers_detail::lock_guard< mutex_t > guard_t
Definition: AuxContainerBase.h:241
xAOD::AuxContainerBase::getAuxIDs
virtual const auxid_set_t & getAuxIDs() const override
Get the types(names) of variables handled by this container.
Definition: AuxContainerBase.cxx:265
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:620
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:271
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
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
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:242
xAOD::AuxContainerBase::resize
virtual bool resize(size_t size) override
Resize the arrays to a given size.
Definition: AuxContainerBase.cxx:485
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:99
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:153
SG::AuxTypeRegistry
Handle mappings between names and auxid_t.
Definition: AuxTypeRegistry.h:62
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:410
DiTauMassTools::ignore
void ignore(T &&)
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:54
xAOD::AuxContainerBase::getDynamicAuxIDs
virtual const auxid_set_t & getDynamicAuxIDs() const override
Get the types(names) of variables created dynamically.
Definition: AuxContainerBase.cxx:683
xAOD::AuxContainerBase::reserve
virtual void reserve(size_t size) override
Reserve a given size for the arrays.
Definition: AuxContainerBase.cxx:513
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:226
xAOD::AuxContainerBase::m_vecs
std::vector< SG::IAuxTypeVector * > m_vecs
Internal list of all managed variables.
Definition: AuxContainerBase.h:228
lumiFormat.i
int i
Definition: lumiFormat.py:92
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:538
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.
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:328
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:280
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:703
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:194
python.subdetectors.mmg.ids
ids
Definition: mmg.py:8
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:478
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:229
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:157
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:248
SG::IAuxTypeVector::insertMove
virtual bool insertMove(size_t pos, void *beg, void *end, IAuxStore &srcStore)=0
Insert elements into the vector via move semantics.
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:564
xAOD::AuxContainerBase::m_locked
bool m_locked
Has the container been locked?
Definition: AuxContainerBase.h:237
SG::IAuxTypeVector
Abstract interface for manipulating vectors of arbitrary types.
Definition: IAuxTypeVector.h:40
xAOD::AuxContainerBase::lockDecoration
virtual void lockDecoration(SG::auxid_t auxid) override
Lock a decoration.
Definition: AuxContainerBase.cxx:367
xAOD::AuxContainerBase::m_ownsStore
bool m_ownsStore
Flag deciding if the object owns the dynamic store or not.
Definition: AuxContainerBase.h:235
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:233
xAOD::AuxContainerBase::AuxContainerBase
AuxContainerBase(bool allowDynamicVars=true)
Default constructor.
Definition: AuxContainerBase.cxx:30
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:641
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:730
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.