ATLAS Offline Software
ByteStreamAuxContainer_v1.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 
8 // EDM include(s):
12 
13 // Local include(s):
15 
16 namespace xAOD {
17 
19  : SG::IAuxStore(),
20  m_int(), m_float(), m_vecInt(), m_vecFloat(),
21  m_staticVecs(), m_dynamicVecs(),
22  m_locked( false ),
23  m_name( "UNKNOWN" ) {
24 
25  }
26 
29  : SG::IAuxStore( parent ),
30  m_int( parent.m_int ), m_float( parent.m_float ),
31  m_vecInt( parent.m_vecInt ), m_vecFloat( parent.m_vecFloat ),
32  // The auxiliary IDs are copied:
33  m_auxids( parent.m_auxids ),
34  // But the internal pointers are not:
35  m_staticVecs(),
36  m_dynamicVecs(), m_locked( false ),
37  m_name( parent.m_name ) {
38 
39  }
40 
42 
43  // Clean up the helper objects:
44  std::vector< SG::IAuxTypeVector* >::iterator itr = m_dynamicVecs.begin();
46  for( ; itr != end; ++itr ) {
47  if( *itr ) delete *itr;
48  }
49  itr = m_staticVecs.begin();
50  end = m_staticVecs.end();
51  for( ; itr != end; ++itr ) {
52  if( *itr ) delete *itr;
53  }
54  }
55 
59 
60  if (this != &rhs) {
61  // Copy the persistent variables:
62  m_int = rhs.m_int;
63  m_float = rhs.m_float;
64  m_vecInt = rhs.m_vecInt;
65  m_vecFloat = rhs.m_vecFloat;
66 
67  // Also copy the list of auxiliary IDs handled:
68  m_auxids = rhs.m_auxids;
69 
70  // The static variables should be left alone. Those should still
71  // point to the correct places in memory. But the dynamic variables
72  // need to be cleared out. Those will be re-created when/if needed.
73  for( auto* ptr : m_dynamicVecs ) {
74  delete ptr;
75  }
76  m_dynamicVecs.clear();
77 
78  // Copy the container's name:
79  m_name = rhs.m_name;
80  }
81 
82  return *this;
83  }
84 
85  const void* ByteStreamAuxContainer_v1::getData( auxid_t auxid ) const {
86 
87  const SG::IAuxTypeVector* v = getVector( auxid );
88  if( v ) {
89  return v->toPtr();
90  }
91  return nullptr;
92  }
93 
95 
96  guard_t guard (m_mutex);
97 
98  // If it's a static auxiliary property:
99  if( ( auxid < m_staticVecs.size() ) && ( m_staticVecs[ auxid ] ) ) {
100  // We're done already:
101  return m_staticVecs[ auxid ];
102  }
103  // If it's a dynamic one:
104  else if( ( auxid < m_dynamicVecs.size() ) &&
105  ( m_dynamicVecs[ auxid ] ) ) {
106  // We're done already:
107  return m_dynamicVecs[ auxid ];
108  }
109 
110  // Try to retrieve the dynamic variable:
111  // quiet on because this method may be called from isAccessible
112  // and that shouldn't generate any output.
113  return getVector1 (auxid, 0, 0, true, false);
114  }
115 
118 
119  // Return the full list of IDs:
120  return getWritableAuxIDs();
121  }
122 
125 
126  // Return the full list of IDs:
127  return m_decorations;
128  }
129 
132  size_t size,
133  size_t capacity)
134  {
135  guard_t guard (m_mutex);
136 
137  // Does this variable already exist?
138  void* ret = nullptr;
139  if( ( auxid < m_staticVecs.size() ) && ( m_staticVecs[ auxid ] ) ) {
140  ret = m_staticVecs[ auxid ]->toPtr();
141  }
142  // If it's a dynamic one:
143  else if( ( auxid < m_dynamicVecs.size() ) &&
144  ( m_dynamicVecs[ auxid ] ) ) {
145  ret = m_dynamicVecs[ auxid ]->toPtr();
146  }
147 
148  if (!ret) {
149  SG::IAuxTypeVector* v = getVector1 (auxid, 0, 0, true, true);
150  if( v ) {
151  ret = v->toPtr();
152  }
153  }
154 
155  if (ret) {
156  // Raise exception if locked and not a decoration.
157  if (m_locked) {
158  if ( ! m_decorations.test (auxid) ) {
159  throw SG::ExcStoreLocked (auxid);
160  }
161  }
162  return ret;
163  }
164 
165  // Make a new variable.
166  SG::IAuxTypeVector* v = getVector1 (auxid, size, capacity, false, true);
167  if( v ) {
168  ret = v->toPtr();
169  }
170 
171  // If locked, mark as a decoration.
172  if (m_locked) {
173  m_decorations.insert (auxid);
174  }
175 
176  return ret;
177  }
178 
179 
182  {
183  guard_t guard (m_mutex);
184  return m_locked && m_decorations.test (auxid);
185  }
186 
187 
189  {
190  guard_t guard (m_mutex);
191  m_locked = true;
192  }
193 
195  {
196  guard_t guard (m_mutex);
197 
199 
200  bool anycleared = false;
201  for (auxid_t auxid : m_decorations) {
202  if (m_dynamicVecs[auxid]) {
203  delete m_dynamicVecs[auxid];
204  m_dynamicVecs[auxid] = nullptr;
205  m_auxids.erase( auxid );
206  anycleared = true;
207 
208  const std::string name = r.getName( auxid );
209  const std::type_info* ti = r.getType( auxid );
210  if (ti == &typeid(int))
211  m_int.erase (name);
212  else if (ti == &typeid(float))
213  m_float.erase (name);
214  else if (ti == &typeid(std::vector<int>))
215  m_vecInt.erase (name);
216  else if (ti == &typeid(std::vector<float>))
217  m_vecFloat.erase (name);
218  }
219  }
221 
222  return anycleared;
223  }
224 
225 
228  {
229  guard_t guard (m_mutex);
230  m_decorations.reset (auxid);
231  }
232 
233 
235  {
236  for (SG::auxid_t i : m_auxids) {
237  if (i < m_staticVecs.size() && m_staticVecs[i]) {
238  size_t sz = m_staticVecs[i]->size();
239  if (sz > 0)
240  return sz;
241  }
242  if (i < m_dynamicVecs.size() && m_dynamicVecs[i]) {
243  size_t sz = m_dynamicVecs[i]->size();
244  if (sz > 0)
245  return sz;
246  }
247  }
248 
249  return 0;
250  }
251 
253  {
254  guard_t guard (m_mutex);
255  return size_noLock();
256  }
257 
258 
260  size_t capacity ) {
261 
262  guard_t guard (m_mutex);
263 
264  // Check if we have such a static variable:
265  if( ( auxid < m_staticVecs.size() ) && ( m_staticVecs[ auxid ] ) ) {
266  // Set it to the right size:
267  m_staticVecs[ auxid ]->reserve( capacity );
268  m_staticVecs[ auxid ]->resize( size );
269  // We're done already:
270  return m_staticVecs[ auxid ]->toPtr();
271  }
272  // Check if we already know about this dynamic variable:
273  else if( ( auxid < m_dynamicVecs.size() ) &&
274  ( m_dynamicVecs[ auxid ] ) ) {
275  // Set it to the right size:
276  m_dynamicVecs[ auxid ]->reserve( capacity );
277  m_dynamicVecs[ auxid ]->resize( size );
278  // We're done already:
279  return m_dynamicVecs[ auxid ]->toPtr();
280  }
281 
282  SG::IAuxTypeVector* v = getVector1 (auxid, size, capacity, false, false);
283  if( v ) {
284  return v->toPtr();
285  }
286  return nullptr;
287  }
288 
291 
292  return m_auxids;
293  }
294 
296 
297  guard_t guard (m_mutex);
298 
299  if (m_locked)
300  throw SG::ExcStoreLocked ("resize");
301 
302  bool nomoves = true;
303  for (SG::IAuxTypeVector* v : m_dynamicVecs) {
304  if(v) {
305  if (!v->resize( size ))
306  nomoves = false;
307  }
308  }
309 
311  if(v) {
312  if (!v->resize( size ))
313  nomoves = false;
314  }
315  }
316 
317  return nomoves;
318  }
319 
321 
322  guard_t guard (m_mutex);
323 
324  if (m_locked)
325  throw SG::ExcStoreLocked ("reserve");
326 
327  std::vector< SG::IAuxTypeVector* >::iterator itr = m_dynamicVecs.begin();
329  for( ; itr != end; ++itr ) {
330  if( *itr ) ( *itr )->reserve( size );
331  }
332  itr = m_staticVecs.begin();
333  end = m_staticVecs.end();
334  for( ; itr != end; ++itr ) {
335  if( *itr ) ( *itr )->reserve( size );
336  }
337 
338  return;
339  }
340 
341  void ByteStreamAuxContainer_v1::shift( size_t pos, ptrdiff_t offs ) {
342 
343  guard_t guard (m_mutex);
344 
345  if (m_locked)
346  throw SG::ExcStoreLocked ("shift");
347 
348  std::vector< SG::IAuxTypeVector* >::iterator itr = m_dynamicVecs.begin();
350  for( ; itr != end; ++itr ) {
351  if( *itr ) ( *itr )->shift( pos, offs );
352  }
353  itr = m_staticVecs.begin();
354  end = m_staticVecs.end();
355  for( ; itr != end; ++itr ) {
356  if( *itr ) ( *itr )->shift( pos, offs );
357  }
358 
359  return;
360  }
361 
363  IAuxStore& other,
364  const SG::auxid_set_t& ignore_in) {
365 
366  guard_t guard( m_mutex );
367 
368  // This operation is not allowed on a locked container:
369  if( m_locked ) {
370  throw SG::ExcStoreLocked( "insertMove" );
371  }
372 
373  bool nomove = true;
374  size_t other_size = other.size();
375 
376  SG::auxid_set_t ignore = ignore_in;
377 
378  // Do the operation on the static variables:
379  for (SG::auxid_t id : m_auxids) {
380  SG::IAuxTypeVector* v_dst = nullptr;
381  if (id < m_dynamicVecs.size())
382  v_dst = m_dynamicVecs[id];
383  if (!v_dst && id < m_staticVecs.size())
384  v_dst = m_staticVecs[id];
385  if (v_dst) {
386  ignore.insert (id);
387  if (other.getData (id)) {
388  void* src_ptr = other.getData (id, other_size, other_size);
389  if (src_ptr) {
390  if (!v_dst->insertMove (pos, src_ptr, 0, other_size,
391  other))
392  nomove = false;
393  }
394  }
395  else {
396  const void* orig = v_dst->toPtr();
397  v_dst->shift (pos, other_size);
398  if (orig != v_dst->toPtr())
399  nomove = false;
400  }
401  }
402  }
403 
404  // Add any new variables not present in the original container.
405  for (SG::auxid_t id : other.getAuxIDs()) {
406  if (!m_auxids.test(id) &&
407  !ignore.test(id))
408  {
409  if (other.getData (id)) {
410  void* src_ptr = other.getData (id, other_size, other_size);
411  if (src_ptr) {
412  size_t sz = size_noLock();
413  getVector1 (id, sz, sz, true, false);
414  m_dynamicVecs[id]->resize (sz - other_size);
415  m_dynamicVecs[id]->insertMove (pos, src_ptr, 0, other_size,
416  other);
417  nomove = false;
418  }
419  }
420  }
421  }
422 
423  return nomove;
424  }
425 
426 
428 
429  guard_t guard (m_mutex);
430 
431  for (SG::IAuxTypeVector* p : m_dynamicVecs)
432  delete p;
433  m_dynamicVecs.clear();
434 
436 #define ADD_IDS(VAR, TYP) \
437  do { typedef std::map< std::string, std::vector< TYP > > CONT; \
438  for (CONT::value_type& p : VAR) \
439  m_auxids.insert (r.getAuxID< TYP > (p.first, "", SG::AuxVarFlags::SkipNameCheck)); } while(0)
440  ADD_IDS(m_int, int);
441  ADD_IDS(m_float, float);
442  ADD_IDS(m_vecInt, std::vector<int>);
443  ADD_IDS(m_vecFloat, std::vector<float>);
444 #undef ADD_IDS
445 
446  return;
447  }
448 
449  const char* ByteStreamAuxContainer_v1::name() const {
450 
451  return m_name.c_str();
452  }
453 
455 
456  m_name = name;
457  return;
458  }
459 
462  template< typename T >
465  std::map< std::string,
466  std::vector< T > >& pers,
467  size_t size, size_t capacity,
468  bool quiet,
469  bool forDecor) const {
470 
471  // Private method --- should hold lock before calling this.
472 
473  // Look up the name of the variable:
475  const std::string name = r.getName( auxid );
476 
477  // Try to find the variable:
478  typename std::map< std::string, std::vector< T > >::iterator itr =
479  pers.find( name );
480  if( itr == pers.end() ) {
481  // Variable isn't there. Fail if capacity==0.
482  if (capacity == 0) {
483  if (!quiet) {
484  std::cerr << "ERROR xAOD::ByteStreamAuxContainer_v1::getData (const) "
485  << "Variable with unknown name (" << name << ") requested"
486  << std::endl;
487  }
488  return nullptr;
489  }
490 
491  if (m_locked && !forDecor)
492  throw SG::ExcStoreLocked ("getData");
493 
494  if (r.isLinked(auxid)) {
495  std::cerr << "ERROR xAOD::ByteStreamAuxContainer_v1 doesn't implement linked variables"
496  << std::endl;
497  return nullptr;
498  }
499 
500  // Create the variable.
501  itr = pers.insert (std::make_pair (name, std::vector<T>())).first;
502  }
503 
504  // Get hold of the variable.
505  std::vector< T >& var = itr->second;
506 
507  // Make sure that the internal vector is big enough:
508  if( m_dynamicVecs.size() <= auxid ) {
509  m_dynamicVecs.resize( auxid + 1 );
510  }
511 
512  // Just an internal check...
513  if( m_dynamicVecs[ auxid ] ) {
514  std::cerr << "ERROR xAOD::ByteStreamAuxContainer_v1::getData "
515  << "Internal inconsistency detected!" << std::endl;
516  return m_dynamicVecs[ auxid ];
517  }
518 
519  // Register the variable:
520  m_dynamicVecs[ auxid ] = new AuxPersVector< T >( auxid, var, false, nullptr );
521 
522  if (capacity > 0) {
523  // Set it to the right size:
524  m_dynamicVecs[ auxid ]->reserve( capacity );
525  m_dynamicVecs[ auxid ]->resize( size );
526  }
527 
528  // Remember that we are now handling this variable:
529  m_auxids.insert( auxid );
530 
531  // Return the pointer to the array:
532  return m_dynamicVecs[ auxid ];
533  }
534 
537  size_t size, size_t capacity,
538  bool quiet,
539  bool forDecor) const {
540 
541  // Private method --- should hold lock before calling this.
542 
543  if( *( SG::AuxTypeRegistry::instance().getType( auxid ) ) ==
544  typeid( int ) ) {
545 
546  return getVector1( auxid, m_int, size, capacity, quiet, forDecor );
547  }
548  else if( *( SG::AuxTypeRegistry::instance().getType( auxid ) ) ==
549  typeid( float ) ) {
550 
551  return getVector1( auxid, m_float, size, capacity, quiet, forDecor );
552  }
553  else if( *( SG::AuxTypeRegistry::instance().getType( auxid ) ) ==
554  typeid( std::vector< int > ) ) {
555 
556  return getVector1( auxid, m_vecInt, size, capacity, quiet, forDecor );
557  }
558  else if( *( SG::AuxTypeRegistry::instance().getType( auxid ) ) ==
559  typeid( std::vector< float > ) ) {
560 
561  return getVector1( auxid, m_vecFloat, size, capacity, quiet, forDecor );
562  }
563 
564  // The object can't handle this variable type...
565  std::cerr << "ERROR xAOD::ByteStreamAuxContainer_v1::getData "
566  << "Unknown variable type ("
567  << SG::AuxTypeRegistry::instance().getType( auxid )->name()
568  << ") requested" << std::endl;
569 
570  return nullptr;
571  }
572 
573 } // namespace xAOD
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
SG::IAuxTypeVector::shift
virtual bool shift(size_t pos, ptrdiff_t offs)=0
Shift the elements of the vector.
beamspotman.r
def r
Definition: beamspotman.py:676
beamspotnt.var
var
Definition: bin/beamspotnt.py:1394
xAOD::ByteStreamAuxContainer_v1::lock
virtual void lock() override
Lock the container.
Definition: ByteStreamAuxContainer_v1.cxx:188
xAOD::name
name
Definition: TriggerMenuJson_v1.cxx:29
xAOD::ByteStreamAuxContainer_v1::resize
virtual bool resize(size_t size) override
Resize the arrays to a given size.
Definition: ByteStreamAuxContainer_v1.cxx:295
fitman.sz
sz
Definition: fitman.py:527
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
SG::AuxTypeRegistry::instance
static AuxTypeRegistry & instance()
Return the singleton registry instance.
Definition: AuxTypeRegistry.cxx:639
quiet
bool quiet
Definition: TrigGlobEffCorrValidation.cxx:190
xAOD::ByteStreamAuxContainer_v1::lockDecoration
virtual void lockDecoration(SG::auxid_t auxid) override
Lock a decoration.
Definition: ByteStreamAuxContainer_v1.cxx:227
SG::ExcStoreLocked
Exception — Attempted to modify auxiliary data in a locked store.
Definition: Control/AthContainers/AthContainers/exceptions.h:183
xAOD::ByteStreamAuxContainer_v1::getDecorIDs
virtual const auxid_set_t & getDecorIDs() const override
Get the types(names) of decorations handled by this container.
Definition: ByteStreamAuxContainer_v1.cxx:124
exceptions.h
Exceptions that can be thrown from AthContainers.
xAOD::ByteStreamAuxContainer_v1::getVector
virtual const SG::IAuxTypeVector * getVector(auxid_t auxid) const override final
Return vector interface for one aux data item.
Definition: ByteStreamAuxContainer_v1.cxx:94
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
xAOD::ByteStreamAuxContainer_v1::m_staticVecs
std::vector< SG::IAuxTypeVector * > m_staticVecs
Internal list of static managed variables.
Definition: ByteStreamAuxContainer_v1.h:185
AuxPersVector.h
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
CxxUtils::ConcurrentBitset::clear
ConcurrentBitset & clear()
Clear all bits in the set.
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
SG::AuxTypeRegistry
Handle mappings between names and auxid_t.
Definition: AuxTypeRegistry.h:61
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
xAOD::ByteStreamAuxContainer_v1::operator=
ByteStreamAuxContainer_v1 & operator=(const ByteStreamAuxContainer_v1 &rhs)
Assignment operator.
Definition: ByteStreamAuxContainer_v1.cxx:58
DiTauMassTools::ignore
void ignore(T &&)
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:58
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
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
xAOD::ByteStreamAuxContainer_v1::auxid_t
SG::auxid_t auxid_t
The aux ID type definition from IConstAuxStore.
Definition: ByteStreamAuxContainer_v1.h:48
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.
CxxUtils::ConcurrentBitset::reset
ConcurrentBitset & reset(bit_t bit)
Turn off one bit.
xAOD::ByteStreamAuxContainer_v1::reserve
virtual void reserve(size_t size) override
Reserve a given size for the arrays.
Definition: ByteStreamAuxContainer_v1.cxx:320
test_pyathena.parent
parent
Definition: test_pyathena.py:15
xAOD::ByteStreamAuxContainer_v1::reset
void reset()
Function resetting the internal (cached) state of the object.
Definition: ByteStreamAuxContainer_v1.cxx:427
xAOD::ByteStreamAuxContainer_v1::m_locked
bool m_locked
Has the container been locked?
Definition: ByteStreamAuxContainer_v1.h:189
xAOD::AuxPersVector
Class managing concrete vector variables.
Definition: AuxPersVector.h:28
xAOD::ByteStreamAuxContainer_v1::ByteStreamAuxContainer_v1
ByteStreamAuxContainer_v1()
Default constructor.
Definition: ByteStreamAuxContainer_v1.cxx:18
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:227
xAOD::ByteStreamAuxContainer_v1::~ByteStreamAuxContainer_v1
virtual ~ByteStreamAuxContainer_v1()
Destructor.
Definition: ByteStreamAuxContainer_v1.cxx:41
xAOD::ByteStreamAuxContainer_v1::getWritableAuxIDs
virtual const auxid_set_t & getWritableAuxIDs() const override
Return a set of writable data identifiers.
Definition: ByteStreamAuxContainer_v1.cxx:290
xAOD::ByteStreamAuxContainer_v1::guard_t
AthContainers_detail::lock_guard< mutex_t > guard_t
Definition: ByteStreamAuxContainer_v1.h:195
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
xAOD::ByteStreamAuxContainer_v1::m_mutex
mutex_t m_mutex
Definition: ByteStreamAuxContainer_v1.h:196
xAOD::ByteStreamAuxContainer_v1::getAuxIDs
virtual const auxid_set_t & getAuxIDs() const override
Get the types(names) of variables handled by this container.
Definition: ByteStreamAuxContainer_v1.cxx:117
xAOD::ByteStreamAuxContainer_v1::name
const char * name() const
Get the name of the container instance.
Definition: ByteStreamAuxContainer_v1.cxx:449
xAOD::ByteStreamAuxContainer_v1::size
virtual size_t size() const override
Get the size of the container.
Definition: ByteStreamAuxContainer_v1.cxx:252
python.PyAthena.v
v
Definition: PyAthena.py:154
xAOD::ByteStreamAuxContainer_v1::clearDecorations
virtual bool clearDecorations() override
Clear all decorations.
Definition: ByteStreamAuxContainer_v1.cxx:194
xAOD::ByteStreamAuxContainer_v1::setName
void setName(const char *name)
Set the name of the container instance.
Definition: ByteStreamAuxContainer_v1.cxx:454
SG::IAuxTypeVector
Abstract interface for manipulating vectors of arbitrary types.
Definition: IAuxTypeVector.h:42
AuxTypeRegistry.h
Handle mappings between names and auxid_t.
ByteStreamAuxContainer_v1.h
SG::auxid_set_t
A set of aux data identifiers.
Definition: AuxTypes.h:47
xAOD::ByteStreamAuxContainer_v1::isDecoration
virtual bool isDecoration(auxid_t auxid) const override
Test if a variable is a decoration.
Definition: ByteStreamAuxContainer_v1.cxx:181
xAOD::ByteStreamAuxContainer_v1::m_decorations
SG::auxid_set_t m_decorations
Record which variables are decorations.
Definition: ByteStreamAuxContainer_v1.h:191
xAOD::JetConstituentVector::iterator
Definition: JetConstituentVector.h:121
xAOD::ByteStreamAuxContainer_v1::size_noLock
size_t size_noLock() const
Internal method: return size without taking out the lock.
Definition: ByteStreamAuxContainer_v1.cxx:234
xAOD::ByteStreamAuxContainer_v1::getData
virtual const void * getData(auxid_t auxid) const override
Get a pointer to a given array.
Definition: ByteStreamAuxContainer_v1.cxx:85
xAOD::ByteStreamAuxContainer_v1::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: ByteStreamAuxContainer_v1.cxx:131
xAOD::ByteStreamAuxContainer_v1
Base class for dynamic auxiliary stores saved into ByteStream.
Definition: ByteStreamAuxContainer_v1.h:44
xAOD::ByteStreamAuxContainer_v1::insertMove
virtual bool insertMove(size_t pos, IAuxStore &other, const SG::auxid_set_t &ignore) override
Insert contents of another store via move.
Definition: ByteStreamAuxContainer_v1.cxx:362
Ringer::getType
T getType(const char *cStr)
Return Ringer enumeration of type T identifying string type:
xAOD::ByteStreamAuxContainer_v1::shift
virtual void shift(size_t pos, ptrdiff_t offs) override
Shift the contents of the stored arrays.
Definition: ByteStreamAuxContainer_v1.cxx:341
ADD_IDS
#define ADD_IDS(VAR, TYP)
SG::IAuxTypeVector::toPtr
virtual void * toPtr()=0
Return a pointer to the start of the vector's data.
CxxUtils::ConcurrentBitset::test
bool test(bit_t bit) const
Test to see if a bit is set.
xAOD::ByteStreamAuxContainer_v1::getVector1
SG::IAuxTypeVector * getVector1(auxid_t auxid, std::map< std::string, std::vector< T > > &pers, size_t size, size_t capacity, bool quiet, bool forDecor) const
Function retrieving a simple dynamic variable.
Definition: ByteStreamAuxContainer_v1.cxx:464
xAOD::ByteStreamAuxContainer_v1::m_name
std::string m_name
Name of the container in memory. Set externally.
Definition: ByteStreamAuxContainer_v1.h:201