ATLAS Offline Software
ShallowAuxContainer.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // System include(s):
6 #include <iostream>
7 #include <sstream>
8 #include <stdexcept>
9 #include <atomic>
10 
11 // EDM include(s):
17 
18 // Local include(s):
20 
21 namespace {
22 
23 
24 } // anonymous namespace
25 
26 
27 namespace xAOD {
28 
33  : m_selection(),
34  m_store( new SG::AuxStoreInternal( standalone ) ),
35  m_storeIO( nullptr ), m_ownsStore( true ), m_locked( false ),
36  m_parentLink(), m_parentIO( nullptr ), m_shallowIO( true ),
37  m_auxids (),
38  m_auxidsValid (false),
39  m_name( "UNKNOWN" ) {
40 
41  m_storeIO = dynamic_cast< SG::IAuxStoreIO* >( m_store );
42  }
43 
45  : SG::IAuxStore(), SG::IAuxStoreIO(), SG::IAuxStoreHolder(),
46  m_ownsStore( false ),
47  m_auxids (),
48  m_auxidsValid (false)
49  {
50  // Keep the source unmutable during copy
51  guard_t guard( parent.m_mutex );
52  // cppcheck-suppress copyCtorPointerCopying
53  m_store = parent.m_store;
54  m_storeIO = parent.m_storeIO;
55  m_locked = parent.m_locked;
56  m_parentLink = parent.m_parentLink;
57  m_parentIO = parent.m_parentIO;
58  m_shallowIO = parent.m_shallowIO;
59  m_selection = parent.m_selection;
60  m_name = parent.m_name;
61  }
62 
69  bool standalone )
70  : m_selection(),
71  m_store( new SG::AuxStoreInternal( standalone ) ),
72  m_storeIO( nullptr ), m_ownsStore( true ), m_locked( false ),
73  m_parentLink( parent ), m_parentIO( nullptr ), m_shallowIO( true ),
74  m_auxids (),
75  m_auxidsValid (false),
76  m_name( "UNKNOWN" ) {
77 
78  m_storeIO = dynamic_cast< SG::IAuxStoreIO* >( m_store );
79  m_parentIO = dynamic_cast< const SG::IAuxStoreIO* >( m_parentLink.cptr() );
80  }
81 
83 
84  if( m_ownsStore && m_store ) {
85  delete m_store;
86  }
87  }
88 
91 
92  // Check if anything needs to be done:
93  if( this == &rhs ) {
94  return *this;
95  }
96 
97  // Keep the source unmutable during copy
98  std::scoped_lock lck{m_mutex, rhs.m_mutex};
99 
100  // Clean up if necessary:
101  if( m_ownsStore && m_store ) {
102  delete m_store;
103  m_store = nullptr;
104  }
105 
106  m_selection = rhs.m_selection;
107  m_ownsStore = false;
108  m_store = rhs.m_store;
109  m_storeIO = rhs.m_storeIO;
110  m_locked = rhs.m_locked;
112  m_parentIO = rhs.m_parentIO;
113  m_shallowIO = rhs.m_shallowIO;
114  m_name = rhs.m_name;
115  m_auxids = rhs.m_auxids;
116  m_auxidsValid= rhs.m_auxidsValid;
117 
118  // Return this object:
119  return *this;
120  }
121 
123 
124  return m_parentLink;
125  }
126 
129 
130  guard_t guard (m_mutex);
131  m_parentLink = link;
132  m_parentIO = dynamic_cast< const SG::IAuxStoreIO* >( m_parentLink.cptr() );
133  m_auxidsValid = false;
134  return;
135  }
136 
138 
139  return m_shallowIO;
140  }
141 
143 
144  guard_t guard (m_mutex);
145  m_shallowIO = value;
146  return;
147  }
148 
150  //
151  // Implementation of the SG::IAuxStoreHolder interface
152  //
153 
155  {
156  return m_store;
157  }
158 
160  {
161  return m_store;
162  }
163 
165 
166  // Check if anything needs to be done:
167  guard_t guard (m_mutex);
168  if( store == m_store ) return;
169 
170  if( m_ownsStore && m_store ) {
171  delete m_store;
172  m_store = nullptr;
173  }
174 
175  // Do the assignment:
176  m_store = store;
177  m_storeIO = dynamic_cast< SG::IAuxStoreIO* >( m_store );
178  m_ownsStore = true;
179  m_auxidsValid = false;
180 
181  return;
182  }
183 
184  //
186 
188  //
189  // Implementation of the SG::IConstAuxStore interface
190  //
191 
192  const void* ShallowAuxContainer::getData( auxid_t auxid ) const {
193 
194  const SG::IAuxTypeVector* v = getVector( auxid );
195  if( v ) {
196  return v->toPtr();
197  }
198  return nullptr;
199  }
200 
202 
203  guard_t guard( m_mutex );
204 
205  // Check if we have this variable ourselves. I use getData(...)
206  // instead of getAuxIDs(), as a dynamic store may not have connected
207  // to all the variables yet that it has available...
208  size_t nids = m_store->getAuxIDs().size();
209  const SG::IAuxTypeVector* result = m_store->getVector( auxid );
210  if( result != nullptr && result->toPtr() != nullptr ) {
211  if( nids != m_store->getAuxIDs().size() ) {
212  remakeAuxIDs();
213  }
214  return result;
215  }
216 
217  // If not, then leave it up to the parent object do deal with this:
218  if( m_parentLink.isValid() ) {
219  nids = m_parentLink->getAuxIDs().size();
220  result = m_parentLink->getVector( auxid );
221  if( result && ( nids != m_parentLink->getAuxIDs().size() ) ) {
222  remakeAuxIDs();
223  }
224  return result;
225  }
226 
227  // Apparently the variable wasn't found:
228  return nullptr;
229  }
230 
233 
234  guard_t guard( m_mutex );
235  if (!m_auxidsValid) {
236  remakeAuxIDs();
237  }
238  return m_auxids;
239  }
240 
243 
244  guard_t guard( m_mutex );
245  if (!m_auxidsValid) {
246  remakeAuxIDs();
247  }
248  return m_decorids;
249  }
250 
252  {
253  guard_t guard( m_mutex );
254  if (m_parentLink.isValid()) {
255  if (m_parentLink->isDecoration (auxid)) {
256  return true;
257  }
258  }
259  return m_store->isDecoration (auxid);
260  }
261 
264  size_t size,
265  size_t capacity ) {
266 
267  guard_t guard( m_mutex );
268 
269  // Check if we already have this variable by any chance.
270  const void* cptr = m_store->getData( auxid );
271 
272  // If the parent has such a variable, then we need to check one more
273  // thing. If it's a decoration on the parent, then we should be allowed
274  // to override it in this (possibly locked) shallow copy. But let's leave
275  // the logic of this up to the parent.
276  if( m_locked && m_parentLink.isValid() &&
277  ( m_parentLink->getAuxIDs().count( auxid ) > 0 ) )
278  {
279  if (!m_parentLink->isDecoration (auxid)) {
280  throw SG::ExcStoreLocked (auxid);
281  }
282  }
283 
284  // If we got this far without any exception, then let the internal store
285  // try to provide the decoration for us:
286  const size_t nids = m_store->getAuxIDs().size();
287  void* result = m_store->getDecoration( auxid, size, capacity );
288  if( result && ( nids != m_store->getAuxIDs().size() ) ) {
289  remakeAuxIDs();
290  }
291 
292  // If we already had this variable before, then don't try to overwrite it
293  // with the parent's payload, and finish here already.
294  if( cptr != nullptr ) {
295  return result;
296  }
297 
298  // If the parent doesn't have this variable, then we're done.
299  if( ! m_parentLink.isValid() ) {
300  return result;
301  }
302  const void* pptr = m_parentLink->getData( auxid );
303  if( pptr == nullptr ) {
304  return result;
305  }
306 
307  // If the variable does exist in the parent, then copy it over to this
308  // store before returning.
309 
310  // Get the registry.
312 
313  // Get the type of this variable.
314  const std::type_info* type = reg.getType( auxid );
315  if( type == nullptr ) {
316  std::ostringstream message;
317  message << "Couldn't find the type of auxiliary ID " << auxid;
318  throw std::runtime_error( message.str() );
319  }
320 
321  // And the allocator type for this variable.
322  const std::type_info* allocType = reg.getAllocType( auxid );
323  if( allocType == nullptr ) {
324  std::ostringstream message;
325  message << "Couldn't find the allocator type of auxiliary ID " << auxid;
326  throw std::runtime_error( message.str() );
327  }
328 
329  // Get the vector factory of this variable.
330  const SG::IAuxTypeVectorFactory* factory =
332  if( factory == nullptr ) {
333  std::ostringstream message;
334  message << "Couldn't find a factory for type " << type->name();
335  throw std::runtime_error( message.str() );
336  }
337 
338  // Copy each element of the parent's decoration.
339  factory->copy( auxid,
340  SG::AuxVectorInterface( *this ), 0,
342 
343  // Now we're done.
344  return result;
345  }
346 
347 
350  {
351  guard_t guard (m_mutex);
352  m_locked = true;
353  m_store->lock();
354  }
355 
356 
359  {
360  guard_t guard (m_mutex);
361  m_store->lockDecoration (auxid);
362  m_auxidsValid = false;
363  }
364 
365  size_t ShallowAuxContainer::size() const {
366 
367  guard_t guard( m_mutex );
368  size_t sz = m_store->size();
369  if( sz > 0 ) {
370  return sz;
371  }
372  if( m_parentLink.isValid() ) {
373  return m_parentLink->size();
374  }
375  return 0;
376  }
377 
380  {
381  guard_t guard (m_mutex);
382  bool ret = m_store->clearDecorations();
383  if (ret) {
384  remakeAuxIDs();
385  }
386  return ret;
387  }
388 
389 
390  //
392 
394  //
395  // Implementation of the SG::IAuxStore interface
396  //
397 
399  size_t capacity ) {
400 
401  guard_t guard (m_mutex);
402 
403  // Check if we already have this variable by any chance.
404  const void* cptr = m_store->getData( auxid );
405 
406  // Create the variable in the dynamic store:
407  void* ptr = m_store->getData( auxid, size, capacity );
408 
409  remakeAuxIDs();
410 
411  // If in some weird way we already had this variable before, then don't
412  // try to overwrite it with the parent's payload, and finish here already.
413  if( cptr != nullptr ) {
414  return ptr;
415  }
416 
417  // If the parent doesn't have this variable, then we're done already:
418  if( ! m_parentLink.isValid() ) {
419  return ptr;
420  }
421  const void* pptr = m_parentLink->getData( auxid );
422  if( ! pptr ) {
423  return ptr;
424  }
425 
426  // If the variable does exist in the parent, then copy it over to this
427  // store before returning.
428 
429  // Get the registry:
431 
432  // Get the type of this variable:
433  const std::type_info* type = reg.getType( auxid );
434  if( type == nullptr ) {
435  std::ostringstream message;
436  message << "Couldn't find the type of auxiliary ID " << auxid;
437  throw std::runtime_error( message.str() );
438  }
439 
440  // And the allocator type for this variable.
441  const std::type_info* allocType = reg.getAllocType( auxid );
442  if( allocType == nullptr ) {
443  std::ostringstream message;
444  message << "Couldn't find the allocator type of auxiliary ID " << auxid;
445  throw std::runtime_error( message.str() );
446  }
447 
448  // First let's get the vector factory of this variable:
449  const SG::IAuxTypeVectorFactory* factory =
451  if( factory == nullptr ) {
452  std::ostringstream message;
453  message << "Couldn't find a factory for type " << type->name();
454  throw std::runtime_error( message.str() );
455  }
456 
457  // Copy each element of the parent's decoration:
458  factory->copy( auxid,
459  SG::AuxVectorInterface( *this ), 0,
461 
462  // Now we're done:
463  return ptr;
464  }
465 
468 
469  // Only the variables in the dynamic store are writable. Maybe not
470  // even all of those...
471  return m_store->getWritableAuxIDs();
472  }
473 
475  {
476  if (size == this->size()) {
477  return false;
478  }
479  // Nope, not allowed...
480  throw std::runtime_error( "Trying to call resize on a shallow copy "
481  "container" );
482  }
483 
484  void ShallowAuxContainer::reserve( size_t /*size*/ ) {
485 
486  // Nope, not allowed...
487  throw std::runtime_error( "Trying to call reserve on a shallow copy "
488  "container" );
489  }
490 
491  void ShallowAuxContainer::shift( size_t /*pos*/, ptrdiff_t /*offs*/ ) {
492 
493  // Nope, not allowed...
494  throw std::runtime_error( "Trying to call shift on a shallow copy "
495  "container" );
496  }
497 
498  bool ShallowAuxContainer::insertMove( size_t /*pos*/,
499  IAuxStore& /*other*/,
500  const SG::auxid_set_t& /*ignore*/) {
501 
502  // Nope, not allowed...
503  throw std::runtime_error( "Trying to call insertMove on a shallow copy "
504  "container" );
505  }
506 
507  //
509 
511  //
512  // Implementation of the SG::IAuxStoreIO interface
513  //
514 
515  const void* ShallowAuxContainer::getIOData( auxid_t auxid ) const {
516 
517  guard_t guard (m_mutex);
518  // Do we have it?
519  if( m_storeIO && m_store->getAuxIDs().test (auxid)) {
520  return m_storeIO->getIOData( auxid );
521  }
522 
523  // Do we have a parent that has it?
524  const SG::IAuxStoreIO* parentIO = m_parentIO;
525  if( ( parentIO == nullptr ) && m_parentLink.isValid() ) {
526  parentIO =
527  dynamic_cast< const SG::IAuxStoreIO* >( m_parentLink.cptr() );
528  }
529  if( parentIO ) {
530  return parentIO->getIOData( auxid );
531  }
532 
533  // If not, then where did this variable come from?!?
534  std::cerr << "ERROR xAOD::ShallowAuxContainer::getIOData Unknown "
535  << "variable ("
537  << ") requested" << std::endl;
538  return nullptr;
539  }
540 
541  const std::type_info* ShallowAuxContainer::getIOType( auxid_t auxid ) const {
542 
543  guard_t guard (m_mutex);
544  // Do we have it?
545  if( m_storeIO && m_store->getAuxIDs().test (auxid)) {
546  return m_storeIO->getIOType( auxid );
547  }
548 
549  // Do we have a parent that has it?
550  const SG::IAuxStoreIO* parentIO = m_parentIO;
551  if( ( parentIO == nullptr ) && m_parentLink.isValid() ) {
552  parentIO =
553  dynamic_cast< const SG::IAuxStoreIO* >( m_parentLink.cptr() );
554  }
555  if( parentIO ) {
556  return parentIO->getIOType( auxid );
557  }
558 
559  // If not, then where did this variable come from?!?
560  std::cerr << "ERROR xAOD::ShallowAuxContainer::getIOType Unknown "
561  << "variable ("
563  << ") requested" << std::endl;
564  return nullptr;
565  }
566 
569 
570  if( m_shallowIO ) {
571  if( m_storeIO ) {
572  return m_store->getAuxIDs();
573  } else {
574  static const auxid_set_t dummy (0);
575  return dummy;
576  }
577  } else {
578  return getAuxIDs();
579  }
580  }
581 
584 
585  if( m_shallowIO ) {
586  if( m_storeIO ) {
588  } else {
589  return auxid_set_t();
590  }
591  } else {
593  }
594  }
595 
596 
597  //
599 
600  const char* ShallowAuxContainer::name() const {
601 
602  return m_name.c_str();
603  }
604 
605  void ShallowAuxContainer::setName( const char* name ) {
606 
607  m_name = name;
608  return;
609  }
610 
613  if( m_parentLink.isValid() ) {
614  ids.insert (m_parentLink->getAuxIDs());
615  }
616 
617  auxid_set_t decors = m_store->getDecorIDs();
618  if( m_parentLink.isValid() ) {
619  ids.insert (m_parentLink->getDecorIDs());
620  }
621 
622  m_decorids = std::move(decors);
623  std::atomic_thread_fence( std::memory_order_seq_cst );
624  m_auxids = std::move(ids);
625 
626  m_auxidsValid = true;
627  }
628 
629 } // namespace xAOD
SG::AuxTypeRegistry::getFactory
const IAuxTypeVectorFactory * getFactory(const std::type_info &ti, const std::type_info &ti_alloc)
Return the vector factory for a given vector element type.
Definition: AuxTypeRegistry.cxx:1111
SGTest::store
TestStore store
Definition: TestStore.cxx:23
xAOD::name
name
Definition: TriggerMenuJson_v1.cxx:29
xAOD::ShallowAuxContainer::operator=
ShallowAuxContainer & operator=(const ShallowAuxContainer &rhs)
Assignment operator.
Definition: ShallowAuxContainer.cxx:90
SG::IConstAuxStore::getData
virtual const void * getData(SG::auxid_t auxid) const =0
Return the data vector for one aux data item.
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
CxxUtils::ConcurrentBitset::count
bit_t count() const
Count the number of 1 bits in the set.
xAOD::ShallowAuxContainer::lock
virtual void lock() override
Lock the container.
Definition: ShallowAuxContainer.cxx:349
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::ShallowAuxContainer::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: ShallowAuxContainer.cxx:541
L1CaloPhase1Monitoring.standalone
standalone
Definition: L1CaloPhase1Monitoring.py:139
SG::AuxTypeRegistry::instance
static AuxTypeRegistry & instance()
Return the singleton registry instance.
Definition: AuxTypeRegistry.cxx:640
AuxVectorInterface.h
Make an AuxVectorData object from either a raw vector or an aux store.
xAOD::ShallowAuxContainer::getDynamicAuxIDs
virtual const auxid_set_t & getDynamicAuxIDs() const override
Get the types(names) of variables created dynamically.
Definition: ShallowAuxContainer.cxx:568
xAOD::ShallowAuxContainer::insertMove
virtual bool insertMove(size_t pos, IAuxStore &other, const SG::auxid_set_t &ignore) override
Insert contents of another store via move.
Definition: ShallowAuxContainer.cxx:498
xAOD::ShallowAuxContainer::parent
const DataLink< SG::IConstAuxStore > & parent() const
Get the parent store.
Definition: ShallowAuxContainer.cxx:122
xAOD::ShallowAuxContainer::ShallowAuxContainer
ShallowAuxContainer(bool standalone=false)
Default constructor.
Definition: ShallowAuxContainer.cxx:32
SG::AuxTypeRegistry::getName
std::string getName(SG::auxid_t auxid) const
Return the name of an aux data item.
Definition: AuxTypeRegistry.cxx:882
SG::ExcStoreLocked
Exception — Attempted to modify auxiliary data in a locked store.
Definition: Control/AthContainers/AthContainers/exceptions.h:183
xAOD::ShallowAuxContainer::getVector
virtual const SG::IAuxTypeVector * getVector(SG::auxid_t auxid) const override final
Return vector interface for one aux data item.
Definition: ShallowAuxContainer.cxx:201
CSV_InDetExporter.new
new
Definition: CSV_InDetExporter.py:145
exceptions.h
Exceptions that can be thrown from AthContainers.
xAOD::ShallowAuxContainer::reserve
virtual void reserve(size_t size) override
Reserve a given size for the arrays.
Definition: ShallowAuxContainer.cxx:484
xAOD::ShallowAuxContainer
Class creating a shallow copy of an existing auxiliary container.
Definition: ShallowAuxContainer.h:50
xAOD::ShallowAuxContainer::guard_t
AthContainers_detail::lock_guard< mutex_t > guard_t
Definition: ShallowAuxContainer.h:198
SG::AuxTypeRegistry::getAllocType
const std::type_info * getAllocType(SG::auxid_t auxid) const
Return the type of the vector allocator.
Definition: AuxTypeRegistry.cxx:965
athena.value
value
Definition: athena.py:124
xAOD::ShallowAuxContainer::name
const char * name() const
Get the name of the container instance.
Definition: ShallowAuxContainer.cxx:600
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
xAOD::ShallowAuxContainer::lockDecoration
virtual void lockDecoration(SG::auxid_t auxid) override
Lock a decoration.
Definition: ShallowAuxContainer.cxx:358
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
xAOD::ShallowAuxContainer::m_selection
AuxSelection m_selection
Dynamic attributes selection implementation.
Definition: ShallowAuxContainer.h:178
ShallowAuxContainer.h
m_name
std::string m_name
Definition: ColumnarPhysliteTest.cxx:64
xAOD::ShallowAuxContainer::m_shallowIO
bool m_shallowIO
Flag for whether to do "shallow IO" or not.
Definition: ShallowAuxContainer.h:194
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::ShallowAuxContainer::setParent
void setParent(const DataLink< SG::IConstAuxStore > &link)
Set the parent store.
Definition: ShallowAuxContainer.cxx:128
xAOD::ShallowAuxContainer::size
virtual size_t size() const override
Get the size of the container.
Definition: ShallowAuxContainer.cxx:365
ReweightUtils.message
message
Definition: ReweightUtils.py:15
SG::IConstAuxStore::size
virtual size_t size() const =0
Return the number of elements in the store.
xAOD::ShallowAuxContainer::m_ownsStore
bool m_ownsStore
Flag deciding if the object owns the dynamic store or not.
Definition: ShallowAuxContainer.h:185
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
SG::IAuxStoreIO
Interface providing I/O for a generic auxiliary store.
Definition: IAuxStoreIO.h:44
SG::AuxTypeRegistry
Handle mappings between names and auxid_t.
Definition: AuxTypeRegistry.h:61
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
xAOD::ShallowAuxContainer::setShallowIO
void setShallowIO(bool value)
Set whether only the overriden parameters should be written out.
Definition: ShallowAuxContainer.cxx:142
xAOD::ShallowAuxContainer::getDecoration
virtual void * getDecoration(auxid_t auxid, size_t size, size_t capacity) override
Return the data vector for one aux data decoration item.
Definition: ShallowAuxContainer.cxx:263
xAOD::ShallowAuxContainer::m_name
std::string m_name
Name of the container in memory. Set externally.
Definition: ShallowAuxContainer.h:208
SG::auxid_t
size_t auxid_t
Identifier for a particular aux data item.
Definition: AuxTypes.h:27
SG::AuxTypeRegistry::getType
const std::type_info * getType(SG::auxid_t auxid) const
Return the type of an aux data item.
Definition: AuxTypeRegistry.cxx:909
xAOD::ShallowAuxContainer::m_parentLink
DataLink< SG::IConstAuxStore > m_parentLink
Link to the parent object.
Definition: ShallowAuxContainer.h:190
CxxUtils::ConcurrentBitset::size
bit_t size() const
Count the number of 1 bits in the set.
SG::IConstAuxStore::clearDecorations
virtual bool clearDecorations()=0
Clear all decorations.
xAOD::ShallowAuxContainer::m_mutex
mutex_t m_mutex
Definition: ShallowAuxContainer.h:199
xAOD::ShallowAuxContainer::getDecorIDs
virtual const auxid_set_t & getDecorIDs() const override
Get the types(names) of decorations handled by this container.
Definition: ShallowAuxContainer.cxx:242
SG::IAuxTypeVectorFactory
Interface for factory objects that create vectors.
Definition: IAuxTypeVectorFactory.h:50
xAOD::ShallowAuxContainer::m_storeIO
SG::IAuxStoreIO * m_storeIO
The IO interface to the internal auxiliary store.
Definition: ShallowAuxContainer.h:183
CalibDbCompareRT.dummy
dummy
Definition: CalibDbCompareRT.py:59
test_pyathena.parent
parent
Definition: test_pyathena.py:15
xAOD::ShallowAuxContainer::getStore
virtual SG::IAuxStore * getStore() override
Get the currently used internal store object.
Definition: ShallowAuxContainer.cxx:154
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::ShallowAuxContainer::shallowIO
bool shallowIO() const
Check whether only the overriden parameters will be written out or not.
Definition: ShallowAuxContainer.cxx:137
SG::IAuxTypeVectorFactory::copy
virtual void copy(SG::auxid_t auxid, AuxVectorData &dst, size_t dst_index, const AuxVectorData &src, size_t src_index, size_t n) const =0
Copy elements between vectors.
xAOD::ShallowAuxContainer::getIOData
virtual const void * getIOData(auxid_t auxid) const override
Get a pointer to the data being stored for one aux data item.
Definition: ShallowAuxContainer.cxx:515
xAOD::ShallowAuxContainer::shift
virtual void shift(size_t pos, ptrdiff_t offs) override
Shift the contents of the stored arrays.
Definition: ShallowAuxContainer.cxx:491
xAOD::ShallowAuxContainer::getWritableAuxIDs
virtual const auxid_set_t & getWritableAuxIDs() const override
Return a set of writable data identifiers.
Definition: ShallowAuxContainer.cxx:467
xAOD::ShallowAuxContainer::getAuxIDs
virtual const auxid_set_t & getAuxIDs() const override
Get the types(names) of variables handled by this container.
Definition: ShallowAuxContainer.cxx:232
python.subdetectors.mmg.ids
ids
Definition: mmg.py:8
xAOD::ShallowAuxContainer::isDecoration
virtual bool isDecoration(auxid_t auxid) const override
Test if a variable is a decoration.
Definition: ShallowAuxContainer.cxx:251
xAOD::ShallowAuxContainer::m_parentIO
const SG::IAuxStoreIO * m_parentIO
Optional pointer to the IO interface of the parent object.
Definition: ShallowAuxContainer.h:192
xAOD::ShallowAuxContainer::m_locked
bool m_locked
Flag keeping track of whether this object is locked or not.
Definition: ShallowAuxContainer.h:187
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::ShallowAuxContainer::setName
void setName(const char *name)
Set the name of the container instance.
Definition: ShallowAuxContainer.cxx:605
SG::IAuxStore::getWritableAuxIDs
virtual const SG::auxid_set_t & getWritableAuxIDs() const =0
Return a set of identifiers for writable data items in this store.
SG::IAuxStore
Interface for non-const operations on an auxiliary store.
Definition: IAuxStore.h:48
python.PyAthena.v
v
Definition: PyAthena.py:154
SG::AuxVectorInterface
Make an AuxVectorData object from either a raw array or an aux store.
Definition: AuxVectorInterface.h:33
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.
IAuxTypeVectorFactory.h
Interface for factory objects that create vectors.
SG::IAuxTypeVector
Abstract interface for manipulating vectors of arbitrary types.
Definition: IAuxTypeVector.h:42
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.
SG::auxid_set_t
A set of aux data identifiers.
Definition: AuxTypes.h:47
xAOD::ShallowAuxContainer::auxid_set_t
SG::auxid_set_t auxid_set_t
The aux ID set type definition.
Definition: ShallowAuxContainer.h:56
xAOD::ShallowAuxContainer::m_store
SG::IAuxStore * m_store
Internal dynamic auxiliary store object.
Definition: ShallowAuxContainer.h:181
SG::IConstAuxStore::isDecoration
virtual bool isDecoration(auxid_t auxid) const =0
Test if a particular variable is tagged as a decoration.
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
xAOD::ShallowAuxContainer::setStore
virtual void setStore(SG::IAuxStore *store) override
Set a different internal store object.
Definition: ShallowAuxContainer.cxx:164
xAOD::ShallowAuxContainer::auxid_t
SG::auxid_t auxid_t
The aux ID type definition.
Definition: ShallowAuxContainer.h:54
AuxStoreInternal.h
An auxiliary data store that holds data internally.
xAOD::ShallowAuxContainer::getData
virtual const void * getData(auxid_t auxid) const override
Get a pointer to a given array.
Definition: ShallowAuxContainer.cxx:192
xAOD::ShallowAuxContainer::getSelectedAuxIDs
virtual auxid_set_t getSelectedAuxIDs() const override
Get the IDs of the selected dynamic Aux variables (for writing)
Definition: ShallowAuxContainer.cxx:583
xAOD::ShallowAuxContainer::~ShallowAuxContainer
~ShallowAuxContainer()
Destructor.
Definition: ShallowAuxContainer.cxx:82
xAOD::ShallowAuxContainer::resize
virtual bool resize(size_t size) override
Resize the arrays to a given size.
Definition: ShallowAuxContainer.cxx:474
xAOD::ShallowAuxContainer::remakeAuxIDs
void remakeAuxIDs() const
Definition: ShallowAuxContainer.cxx:611
SG::IConstAuxStore::getAuxIDs
virtual const SG::auxid_set_t & getAuxIDs() const =0
Return a set of identifiers for existing data items in this store.
CxxUtils::ConcurrentBitset::test
bool test(bit_t bit) const
Test to see if a bit is set.
xAOD::ShallowAuxContainer::clearDecorations
virtual bool clearDecorations() override
Clear all decorations.
Definition: ShallowAuxContainer.cxx:379