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_store( parent.m_store ), m_storeIO( parent.m_storeIO ),
47  m_ownsStore( false ), m_locked( parent.m_locked ),
48  m_parentLink( parent.m_parentLink ),
49  m_parentIO( parent.m_parentIO ), m_shallowIO( parent.m_shallowIO ),
50  m_auxids (),
51  m_auxidsValid (false)
52  {
53  // Keep the source unmutable during copy
54  guard_t guard( parent.m_mutex );
55  m_selection = parent.m_selection;
56  m_name = parent.m_name;
57  }
58 
65  bool standalone )
66  : m_selection(),
67  m_store( new SG::AuxStoreInternal( standalone ) ),
68  m_storeIO( nullptr ), m_ownsStore( true ), m_locked( false ),
69  m_parentLink( parent ), m_parentIO( nullptr ), m_shallowIO( true ),
70  m_auxids (),
71  m_auxidsValid (false),
72  m_name( "UNKNOWN" ) {
73 
74  m_storeIO = dynamic_cast< SG::IAuxStoreIO* >( m_store );
75  m_parentIO = dynamic_cast< const SG::IAuxStoreIO* >( m_parentLink.cptr() );
76  }
77 
79 
80  if( m_ownsStore && m_store ) {
81  delete m_store;
82  }
83  }
84 
87 
88  // Check if anything needs to be done:
89  if( this == &rhs ) {
90  return *this;
91  }
92 
93  // Keep the source unmutable during copy
94  std::scoped_lock lck{m_mutex, rhs.m_mutex};
95 
96  // Clean up if necessary:
97  if( m_ownsStore && m_store ) {
98  delete m_store;
99  m_store = nullptr;
100  }
101 
102  m_selection = rhs.m_selection;
103  m_ownsStore = false;
104  m_store = rhs.m_store;
105  m_storeIO = rhs.m_storeIO;
106  m_locked = rhs.m_locked;
108  m_parentIO = rhs.m_parentIO;
109  m_shallowIO = rhs.m_shallowIO;
110  m_name = rhs.m_name;
111  m_auxids = rhs.m_auxids;
112  m_auxidsValid= rhs.m_auxidsValid;
113 
114  // Return this object:
115  return *this;
116  }
117 
119 
120  return m_parentLink;
121  }
122 
125 
126  guard_t guard (m_mutex);
127  m_parentLink = link;
128  m_parentIO = dynamic_cast< const SG::IAuxStoreIO* >( m_parentLink.cptr() );
129  m_auxidsValid = false;
130  return;
131  }
132 
134 
135  return m_shallowIO;
136  }
137 
139 
140  guard_t guard (m_mutex);
141  m_shallowIO = value;
142  return;
143  }
144 
146  //
147  // Implementation of the SG::IAuxStoreHolder interface
148  //
149 
151  {
152  return m_store;
153  }
154 
156  {
157  return m_store;
158  }
159 
161 
162  // Check if anything needs to be done:
163  guard_t guard (m_mutex);
164  if( store == m_store ) return;
165 
166  if( m_ownsStore && m_store ) {
167  delete m_store;
168  m_store = nullptr;
169  }
170 
171  // Do the assignment:
172  m_store = store;
173  m_storeIO = dynamic_cast< SG::IAuxStoreIO* >( m_store );
174  m_ownsStore = true;
175  m_auxidsValid = false;
176 
177  return;
178  }
179 
180  //
182 
184  //
185  // Implementation of the SG::IConstAuxStore interface
186  //
187 
188  const void* ShallowAuxContainer::getData( auxid_t auxid ) const {
189 
190  const SG::IAuxTypeVector* v = getVector( auxid );
191  if( v ) {
192  return v->toPtr();
193  }
194  return nullptr;
195  }
196 
198 
199  guard_t guard( m_mutex );
200 
201  // Check if we have this variable ourselves. I use getData(...)
202  // instead of getAuxIDs(), as a dynamic store may not have connected
203  // to all the variables yet that it has available...
204  size_t nids = m_store->getAuxIDs().size();
205  const SG::IAuxTypeVector* result = m_store->getVector( auxid );
206  if( result != nullptr && result->toPtr() != nullptr ) {
207  if( nids != m_store->getAuxIDs().size() ) {
208  remakeAuxIDs();
209  }
210  return result;
211  }
212 
213  // If not, then leave it up to the parent object do deal with this:
214  if( m_parentLink.isValid() ) {
215  nids = m_parentLink->getAuxIDs().size();
216  result = m_parentLink->getVector( auxid );
217  if( result && ( nids != m_parentLink->getAuxIDs().size() ) ) {
218  remakeAuxIDs();
219  }
220  return result;
221  }
222 
223  // Apparently the variable wasn't found:
224  return nullptr;
225  }
226 
229 
230  guard_t guard( m_mutex );
231  if (!m_auxidsValid) {
232  remakeAuxIDs();
233  }
234  return m_auxids;
235  }
236 
239 
240  guard_t guard( m_mutex );
241  if (!m_auxidsValid) {
242  remakeAuxIDs();
243  }
244  return m_decorids;
245  }
246 
248  {
249  guard_t guard( m_mutex );
250  if (m_parentLink.isValid()) {
251  if (m_parentLink->isDecoration (auxid)) {
252  return true;
253  }
254  }
255  return m_store->isDecoration (auxid);
256  }
257 
260  size_t size,
261  size_t capacity ) {
262 
263  guard_t guard( m_mutex );
264 
265  // Check if we already have this variable by any chance.
266  const void* cptr = m_store->getData( auxid );
267 
268  // If the parent has such a variable, then we need to check one more
269  // thing. If it's a decoration on the parent, then we should be allowed
270  // to override it in this (possibly locked) shallow copy. But let's leave
271  // the logic of this up to the parent.
272  if( m_locked && m_parentLink.isValid() &&
273  ( m_parentLink->getAuxIDs().count( auxid ) > 0 ) )
274  {
275  if (!m_parentLink->isDecoration (auxid)) {
276  throw SG::ExcStoreLocked (auxid);
277  }
278  }
279 
280  // If we got this far without any exception, then let the internal store
281  // try to provide the decoration for us:
282  const size_t nids = m_store->getAuxIDs().size();
283  void* result = m_store->getDecoration( auxid, size, capacity );
284  if( result && ( nids != m_store->getAuxIDs().size() ) ) {
285  remakeAuxIDs();
286  }
287 
288  // If we already had this variable before, then don't try to overwrite it
289  // with the parent's payload, and finish here already.
290  if( cptr != nullptr ) {
291  return result;
292  }
293 
294  // If the parent doesn't have this variable, then we're done.
295  if( ! m_parentLink.isValid() ) {
296  return result;
297  }
298  const void* pptr = m_parentLink->getData( auxid );
299  if( pptr == nullptr ) {
300  return result;
301  }
302 
303  // If the variable does exist in the parent, then copy it over to this
304  // store before returning.
305 
306  // Get the registry.
308 
309  // Get the type of this variable.
310  const std::type_info* type = reg.getType( auxid );
311  if( type == nullptr ) {
312  std::ostringstream message;
313  message << "Couldn't find the type of auxiliary ID " << auxid;
314  throw std::runtime_error( message.str() );
315  }
316 
317  // And the allocator type for this variable.
318  const std::type_info* allocType = reg.getAllocType( auxid );
319  if( allocType == nullptr ) {
320  std::ostringstream message;
321  message << "Couldn't find the allocator type of auxiliary ID " << auxid;
322  throw std::runtime_error( message.str() );
323  }
324 
325  // Get the vector factory of this variable.
326  const SG::IAuxTypeVectorFactory* factory =
328  if( factory == nullptr ) {
329  std::ostringstream message;
330  message << "Couldn't find a factory for type " << type->name();
331  throw std::runtime_error( message.str() );
332  }
333 
334  // Copy each element of the parent's decoration.
335  factory->copy( auxid,
336  SG::AuxVectorInterface( *this ), 0,
338 
339  // Now we're done.
340  return result;
341  }
342 
343 
346  {
347  guard_t guard (m_mutex);
348  m_locked = true;
349  m_store->lock();
350  }
351 
352 
355  {
356  guard_t guard (m_mutex);
357  m_store->lockDecoration (auxid);
358  m_auxidsValid = false;
359  }
360 
361  size_t ShallowAuxContainer::size() const {
362 
363  guard_t guard( m_mutex );
364  size_t sz = m_store->size();
365  if( sz > 0 ) {
366  return sz;
367  }
368  if( m_parentLink.isValid() ) {
369  return m_parentLink->size();
370  }
371  return 0;
372  }
373 
376  {
377  guard_t guard (m_mutex);
378  bool ret = m_store->clearDecorations();
379  if (ret) {
380  remakeAuxIDs();
381  }
382  return ret;
383  }
384 
385 
386  //
388 
390  //
391  // Implementation of the SG::IAuxStore interface
392  //
393 
395  size_t capacity ) {
396 
397  guard_t guard (m_mutex);
398 
399  // Check if we already have this variable by any chance.
400  const void* cptr = m_store->getData( auxid );
401 
402  // Create the variable in the dynamic store:
403  void* ptr = m_store->getData( auxid, size, capacity );
404 
405  remakeAuxIDs();
406 
407  // If in some weird way we already had this variable before, then don't
408  // try to overwrite it with the parent's payload, and finish here already.
409  if( cptr != nullptr ) {
410  return ptr;
411  }
412 
413  // If the parent doesn't have this variable, then we're done already:
414  if( ! m_parentLink.isValid() ) {
415  return ptr;
416  }
417  const void* pptr = m_parentLink->getData( auxid );
418  if( ! pptr ) {
419  return ptr;
420  }
421 
422  // If the variable does exist in the parent, then copy it over to this
423  // store before returning.
424 
425  // Get the registry:
427 
428  // Get the type of this variable:
429  const std::type_info* type = reg.getType( auxid );
430  if( type == nullptr ) {
431  std::ostringstream message;
432  message << "Couldn't find the type of auxiliary ID " << auxid;
433  throw std::runtime_error( message.str() );
434  }
435 
436  // And the allocator type for this variable.
437  const std::type_info* allocType = reg.getAllocType( auxid );
438  if( allocType == nullptr ) {
439  std::ostringstream message;
440  message << "Couldn't find the allocator type of auxiliary ID " << auxid;
441  throw std::runtime_error( message.str() );
442  }
443 
444  // First let's get the vector factory of this variable:
445  const SG::IAuxTypeVectorFactory* factory =
447  if( factory == nullptr ) {
448  std::ostringstream message;
449  message << "Couldn't find a factory for type " << type->name();
450  throw std::runtime_error( message.str() );
451  }
452 
453  // Copy each element of the parent's decoration:
454  factory->copy( auxid,
455  SG::AuxVectorInterface( *this ), 0,
457 
458  // Now we're done:
459  return ptr;
460  }
461 
464 
465  // Only the variables in the dynamic store are writable. Maybe not
466  // even all of those...
467  return m_store->getWritableAuxIDs();
468  }
469 
471  {
472  if (size == this->size()) {
473  return false;
474  }
475  // Nope, not allowed...
476  throw std::runtime_error( "Trying to call resize on a shallow copy "
477  "container" );
478  }
479 
480  void ShallowAuxContainer::reserve( size_t /*size*/ ) {
481 
482  // Nope, not allowed...
483  throw std::runtime_error( "Trying to call reserve on a shallow copy "
484  "container" );
485  }
486 
487  void ShallowAuxContainer::shift( size_t /*pos*/, ptrdiff_t /*offs*/ ) {
488 
489  // Nope, not allowed...
490  throw std::runtime_error( "Trying to call shift on a shallow copy "
491  "container" );
492  }
493 
494  bool ShallowAuxContainer::insertMove( size_t /*pos*/,
495  IAuxStore& /*other*/,
496  const SG::auxid_set_t& /*ignore*/) {
497 
498  // Nope, not allowed...
499  throw std::runtime_error( "Trying to call insertMove on a shallow copy "
500  "container" );
501  }
502 
503  //
505 
507  //
508  // Implementation of the SG::IAuxStoreIO interface
509  //
510 
511  const void* ShallowAuxContainer::getIOData( auxid_t auxid ) const {
512 
513  guard_t guard (m_mutex);
514  // Do we have it?
515  if( m_storeIO && m_store->getAuxIDs().test (auxid)) {
516  return m_storeIO->getIOData( auxid );
517  }
518 
519  // Do we have a parent that has it?
520  const SG::IAuxStoreIO* parentIO = m_parentIO;
521  if( ( parentIO == nullptr ) && m_parentLink.isValid() ) {
522  parentIO =
523  dynamic_cast< const SG::IAuxStoreIO* >( m_parentLink.cptr() );
524  }
525  if( parentIO ) {
526  return parentIO->getIOData( auxid );
527  }
528 
529  // If not, then where did this variable come from?!?
530  std::cerr << "ERROR xAOD::ShallowAuxContainer::getIOData Unknown "
531  << "variable ("
533  << ") requested" << std::endl;
534  return nullptr;
535  }
536 
537  const std::type_info* ShallowAuxContainer::getIOType( auxid_t auxid ) const {
538 
539  guard_t guard (m_mutex);
540  // Do we have it?
541  if( m_storeIO && m_store->getAuxIDs().test (auxid)) {
542  return m_storeIO->getIOType( auxid );
543  }
544 
545  // Do we have a parent that has it?
546  const SG::IAuxStoreIO* parentIO = m_parentIO;
547  if( ( parentIO == nullptr ) && m_parentLink.isValid() ) {
548  parentIO =
549  dynamic_cast< const SG::IAuxStoreIO* >( m_parentLink.cptr() );
550  }
551  if( parentIO ) {
552  return parentIO->getIOType( auxid );
553  }
554 
555  // If not, then where did this variable come from?!?
556  std::cerr << "ERROR xAOD::ShallowAuxContainer::getIOType Unknown "
557  << "variable ("
559  << ") requested" << std::endl;
560  return nullptr;
561  }
562 
565 
566  if( m_shallowIO ) {
567  if( m_storeIO ) {
568  return m_store->getAuxIDs();
569  } else {
570  static const auxid_set_t dummy (0);
571  return dummy;
572  }
573  } else {
574  return getAuxIDs();
575  }
576  }
577 
580 
581  if( m_shallowIO ) {
582  if( m_storeIO ) {
584  } else {
585  return auxid_set_t();
586  }
587  } else {
589  }
590  }
591 
592 
593  //
595 
596  const char* ShallowAuxContainer::name() const {
597 
598  return m_name.c_str();
599  }
600 
601  void ShallowAuxContainer::setName( const char* name ) {
602 
603  m_name = name;
604  return;
605  }
606 
609  if( m_parentLink.isValid() ) {
610  ids.insert (m_parentLink->getAuxIDs());
611  }
612 
613  auxid_set_t decors = m_store->getDecorIDs();
614  if( m_parentLink.isValid() ) {
615  ids.insert (m_parentLink->getDecorIDs());
616  }
617 
618  m_decorids = std::move(decors);
619  std::atomic_thread_fence( std::memory_order_seq_cst );
620  m_auxids = std::move(ids);
621 
622  m_auxidsValid = true;
623  }
624 
625 } // 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:1110
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:86
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:345
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:537
L1CaloPhase1Monitoring.standalone
standalone
Definition: L1CaloPhase1Monitoring.py:139
SG::AuxTypeRegistry::instance
static AuxTypeRegistry & instance()
Return the singleton registry instance.
Definition: AuxTypeRegistry.cxx:639
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:564
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:494
xAOD::ShallowAuxContainer::parent
const DataLink< SG::IConstAuxStore > & parent() const
Get the parent store.
Definition: ShallowAuxContainer.cxx:118
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:881
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:197
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:480
xAOD::ShallowAuxContainer
Class creating a shallow copy of an existing auxiliary container.
Definition: ShallowAuxContainer.h:54
xAOD::ShallowAuxContainer::guard_t
AthContainers_detail::lock_guard< mutex_t > guard_t
Definition: ShallowAuxContainer.h:202
SG::AuxTypeRegistry::getAllocType
const std::type_info * getAllocType(SG::auxid_t auxid) const
Return the type of the vector allocator.
Definition: AuxTypeRegistry.cxx:964
athena.value
value
Definition: athena.py:124
xAOD::ShallowAuxContainer::name
const char * name() const
Get the name of the container instance.
Definition: ShallowAuxContainer.cxx:596
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:354
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
xAOD::ShallowAuxContainer::m_selection
AuxSelection m_selection
Dynamic attributes selection implementation.
Definition: ShallowAuxContainer.h:182
ShallowAuxContainer.h
m_name
std::string m_name
Definition: ColumnarPhysliteTest.cxx:62
xAOD::ShallowAuxContainer::m_shallowIO
bool m_shallowIO
Flag for whether to do "shallow IO" or not.
Definition: ShallowAuxContainer.h:198
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:124
xAOD::ShallowAuxContainer::size
virtual size_t size() const override
Get the size of the container.
Definition: ShallowAuxContainer.cxx:361
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:189
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:138
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:259
xAOD::ShallowAuxContainer::m_name
std::string m_name
Name of the container in memory. Set externally.
Definition: ShallowAuxContainer.h:212
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:908
xAOD::ShallowAuxContainer::m_parentLink
DataLink< SG::IConstAuxStore > m_parentLink
Link to the parent object.
Definition: ShallowAuxContainer.h:194
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:203
xAOD::ShallowAuxContainer::getDecorIDs
virtual const auxid_set_t & getDecorIDs() const override
Get the types(names) of decorations handled by this container.
Definition: ShallowAuxContainer.cxx:238
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:187
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:150
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:133
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:511
xAOD::ShallowAuxContainer::shift
virtual void shift(size_t pos, ptrdiff_t offs) override
Shift the contents of the stored arrays.
Definition: ShallowAuxContainer.cxx:487
xAOD::ShallowAuxContainer::getWritableAuxIDs
virtual const auxid_set_t & getWritableAuxIDs() const override
Return a set of writable data identifiers.
Definition: ShallowAuxContainer.cxx:463
xAOD::ShallowAuxContainer::getAuxIDs
virtual const auxid_set_t & getAuxIDs() const override
Get the types(names) of variables handled by this container.
Definition: ShallowAuxContainer.cxx:228
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:247
xAOD::ShallowAuxContainer::m_parentIO
const SG::IAuxStoreIO * m_parentIO
Optional pointer to the IO interface of the parent object.
Definition: ShallowAuxContainer.h:196
xAOD::ShallowAuxContainer::m_locked
bool m_locked
Flag keeping track of whether this object is locked or not.
Definition: ShallowAuxContainer.h:191
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:601
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:60
xAOD::ShallowAuxContainer::m_store
SG::IAuxStore * m_store
Internal dynamic auxiliary store object.
Definition: ShallowAuxContainer.h:185
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:160
xAOD::ShallowAuxContainer::auxid_t
SG::auxid_t auxid_t
The aux ID type definition.
Definition: ShallowAuxContainer.h:58
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:188
xAOD::ShallowAuxContainer::getSelectedAuxIDs
virtual auxid_set_t getSelectedAuxIDs() const override
Get the IDs of the selected dynamic Aux variables (for writing)
Definition: ShallowAuxContainer.cxx:579
xAOD::ShallowAuxContainer::~ShallowAuxContainer
~ShallowAuxContainer()
Destructor.
Definition: ShallowAuxContainer.cxx:78
xAOD::ShallowAuxContainer::resize
virtual bool resize(size_t size) override
Resize the arrays to a given size.
Definition: ShallowAuxContainer.cxx:470
xAOD::ShallowAuxContainer::remakeAuxIDs
void remakeAuxIDs() const
Definition: ShallowAuxContainer.cxx:607
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:375