Loading [MathJax]/jax/output/SVG/config.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Classes | Public Types | Public Member Functions | Static Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
xAOD::RAuxStore Class Referenceabstract

"ROOT @c RNTuple implementation" of IAuxStore More...

#include <RAuxStore.h>

Inheritance diagram for xAOD::RAuxStore:
Collaboration diagram for xAOD::RAuxStore:

Classes

struct  impl
 

Public Types

using RNTupleReader = ROOT::Experimental::RNTupleReader
 The RNTuple reader type. More...
 
using RNTupleWriter = ROOT::Experimental::RNTupleWriter
 The RNTuple writer type. More...
 
using REntry = ROOT::Experimental::REntry
 The RNTuple entry type. More...
 
enum  EStructMode { EStructMode::kUndefinedStore = 0, EStructMode::kContainerStore = 1, EStructMode::kObjectStore = 2 }
 "Structural" modes of the object More...
 

Public Member Functions

 RAuxStore (std::string_view prefix="", bool topStore=true, EStructMode mode=EStructMode::kUndefinedStore)
 Constructor. More...
 
virtual ~RAuxStore ()
 Destructor. More...
 
virtual void setPrefix (std::string_view prefix) override
 Set the object name prefix. More...
 
StatusCode readFrom (RNTupleReader &reader)
 Connect the object to an input RNTuple. More...
 
StatusCode writeTo (RNTupleWriter &writer)
 Add the variables of the store to an output RNTuple. More...
 
StatusCode getEntry (std::int64_t entry, int getall=0)
 Get entry from the input RNTuple. More...
 
StatusCode commitTo (REntry &entry)
 Commit a new entry to the output RNTuple. More...
 
EStructMode structMode () const
 Get what structure mode the object was constructed with. More...
 
void setStructMode (EStructMode mode)
 Set the structure mode of the object to a new value. More...
 
const std::string & prefix () const
 Get the currently configured object name prefix. More...
 
bool isTopStore () const
 Check if the object is a "top store", or not. More...
 
void setTopStore (bool value=true)
 Set whether the object should behave as a "top store" or not. More...
 
virtual void * getData (auxid_t auxid, size_t size, size_t capacity)=0
 Return the data vector for one aux data item. More...
 
virtual const void * getData (SG::auxid_t auxid) const=0
 Pick up the const version from the base class. More...
 
virtual void * getDecoration (auxid_t auxid, size_t size, size_t capacity)=0
 Return the data vector for one aux data decoration item. More...
 
virtual const IAuxTypeVector * linkedVector (SG::auxid_t) const
 Return interface for a linked variable. More...
 
virtual bool resize (size_t sz)=0
 Change the size of all aux data vectors. More...
 
virtual void reserve (size_t sz)=0
 Change the capacity of all aux data vectors. More...
 
virtual void shift (size_t pos, ptrdiff_t offs)=0
 Shift the elements of the container. More...
 
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. More...
 
virtual bool setOption (auxid_t, const AuxDataOption &)
 Set an option for a given auxiliary variable. More...
 

Static Public Attributes

static constexpr bool supportsThinning = true
 Mark that this type supports thinning operations. More...
 

Protected Types

using mutex_t = AthContainers_detail::mutex
 Mutex type for multithread synchronization. More...
 
using guard_t = AthContainers_detail::lock_guard< mutex_t >
 Guard type for multithreaded synchronisation. More...
 

Protected Member Functions

bool isAuxIDSelected (SG::auxid_t auxid) const
 Check if an auxiliary variable is selected for ouput writing. More...
 

Protected Attributes

Members m_data
 Member variables of the base class. More...
 

Private Attributes

std::unique_ptr< implm_impl
 Pointer to the internal object. More...
 
AuxSelection m_selection
 Object helping to select which auxiliary variables to write. More...
 
bool m_locked = false
 Is this container locked? More...
 
mutex_t m_mutex1
 Mutex objects used for multithreaded synchronisation. More...
 
mutex_t m_mutex2
 

Functions implementing functionality for @c AuxStoreBase

virtual void reset () override
 Tell the object that all branches will need to be re-read. More...
 
virtual bool hasEntryFor (SG::auxid_t auxid) const override
 Check if a given variable is available from the input. More...
 
virtual StatusCode getEntryFor (SG::auxid_t auxid) override
 Load a single variable from the input. More...
 
virtual bool hasOutput () const override
 Check if an output is being written by the object. More...
 
virtual StatusCode setupInputData (SG::auxid_t auxid) override
 Connect a variable to the input. More...
 
virtual StatusCode setupOutputData (SG::auxid_t auxid) override
 Connect a variable to the output. More...
 
virtual const void * getInputObject (SG::auxid_t auxid) const override
 Get a pointer to an input object, as it is in memory, for getIOData() More...
 
virtual const std::type_info * getInputType (SG::auxid_t auxid) const override
 Get the type of an input object, for getIOType() More...
 

Detailed Description

"ROOT @c RNTuple implementation" of IAuxStore

Author
Mads Lildholdt Hansen mlha2.nosp@m.0@st.nosp@m.udent.nosp@m..aau.nosp@m..dk
Nikolaj Kofod Krogh nkrog.nosp@m.h20@.nosp@m.stude.nosp@m.nt.a.nosp@m.au.dk
Attila Krasznahorkay Attil.nosp@m.a.Kr.nosp@m.aszna.nosp@m.hork.nosp@m.ay@ce.nosp@m.rn.c.nosp@m.h

Definition at line 31 of file RAuxStore.h.

Member Typedef Documentation

◆ guard_t

using xAOD::details::AuxStoreBase::guard_t = AthContainers_detail::lock_guard<mutex_t>
protectedinherited

Guard type for multithreaded synchronisation.

Definition at line 206 of file AuxStoreBase.h.

◆ mutex_t

using xAOD::details::AuxStoreBase::mutex_t = AthContainers_detail::mutex
protectedinherited

Mutex type for multithread synchronization.

Definition at line 204 of file AuxStoreBase.h.

◆ REntry

using xAOD::RAuxStore::REntry = ROOT::Experimental::REntry

The RNTuple entry type.

Definition at line 39 of file RAuxStore.h.

◆ RNTupleReader

using xAOD::RAuxStore::RNTupleReader = ROOT::Experimental::RNTupleReader

The RNTuple reader type.

Definition at line 35 of file RAuxStore.h.

◆ RNTupleWriter

using xAOD::RAuxStore::RNTupleWriter = ROOT::Experimental::RNTupleWriter

The RNTuple writer type.

Definition at line 37 of file RAuxStore.h.

Member Enumeration Documentation

◆ EStructMode

"Structural" modes of the object

Enumerator
kUndefinedStore 

The structure mode is not defined.

kContainerStore 

The object describes an entire container.

kObjectStore 

The object describes a single object.

Definition at line 30 of file AuxStoreBase.h.

30  {
31  kUndefinedStore = 0,
32  kContainerStore = 1,
33  kObjectStore = 2
34  };

Constructor & Destructor Documentation

◆ RAuxStore()

xAOD::RAuxStore::RAuxStore ( std::string_view  prefix = "",
bool  topStore = true,
EStructMode  mode = EStructMode::kUndefinedStore 
)

Constructor.

Definition at line 620 of file RAuxStore.cxx.

621  : details::AuxStoreBase(topStore, mode),
622  m_impl{std::make_unique<impl>(m_data)} {
623 
624  setPrefix(prefix);
625 }

◆ ~RAuxStore()

xAOD::RAuxStore::~RAuxStore ( )
virtualdefault

Destructor.

Member Function Documentation

◆ clearDecorations()

bool xAOD::details::AuxStoreBase::clearDecorations ( )
overridevirtualinherited

Remove the decorations added so far.

Only works for transient decorations.

Implements SG::IConstAuxStore.

Definition at line 207 of file AuxStoreBase.cxx.

207  {
208 
209  // Guard against multi-threaded execution:
210  guard_t guard(m_mutex1);
211 
212  // Clear the transient decorations:
213  bool anycleared = false;
214  if (m_data.m_transientStore) {
215  SG::auxid_set_t old_id_set = m_data.m_transientStore->getAuxIDs();
216 
217  // Clear the decorations from the transient store:
218  anycleared = m_data.m_transientStore->clearDecorations();
219 
220  // Now remove ids that were cleared.
221  if (anycleared) {
222  old_id_set -= m_data.m_transientStore->getAuxIDs();
223  // old_id_set is now the set of ids that were cleared.
224  m_data.m_auxIDs -= old_id_set;
226  }
227  }
228 
229  // The decorations which are going into the output file, are here to stay.
230  // Removing their IDs from the internal set would just cause more problems
231  // in my mind than just leaving them be.
232 
233  return anycleared;
234 }

◆ commitTo()

StatusCode xAOD::RAuxStore::commitTo ( REntry entry)

Commit a new entry to the output RNTuple.

Definition at line 740 of file RAuxStore.cxx.

740  {
741 
742  assert(m_impl);
743 
744  // Loop through all of the output variables.
745  for (SG::auxid_t id : getSelectedAuxIDs()) {
746  // Now connect the output entry to the variable.
747  const std::string fieldName =
750  void* fieldPtr = const_cast<void*>(getIOData(id));
751  if (fieldPtr) {
752  entry.BindRawPtr(fieldName, fieldPtr);
753  } else {
754  entry.EmplaceNewValue(fieldName);
755  }
756  }
757 
758  // Return gracefully.
759  return StatusCode::SUCCESS;
760 }

◆ getAuxIDs()

const SG::auxid_set_t & xAOD::details::AuxStoreBase::getAuxIDs ( ) const
overridevirtualinherited

Get the types(names) of variables handled by this container.

Implements SG::IConstAuxStore.

Definition at line 99 of file AuxStoreBase.cxx.

99  {
100 
101  return m_data.m_auxIDs;
102 }

◆ getData() [1/4]

virtual void* SG::IAuxStore::getData ( auxid_t  auxid,
size_t  size,
size_t  capacity 
)
pure virtualinherited

Return the data vector for one aux data item.

Parameters
auxidThe identifier of the desired aux data item.
sizeThe current size of the container (in case the data item does not already exist).
capacityThe current capacity of the container (in case the data item does not already exist).

Each aux data item is stored as a vector, with one entry per entry in the owning container. This returns a pointer to the start of the vector.

If the data item does not exist, it should be created and initialized to default values. size and capacity give the size for the new aux data item vector.

If the container is locked, throw an exception.

Implemented in SG::AuxStoreInternal, APRTest::AuxStore, RootAuxDynStore, xAOD::AuxContainerBase, xAOD::ShallowAuxContainer, xAOD::AuxInfoBase, and xAOD::ByteStreamAuxContainer_v1.

◆ getData() [2/4]

const void * xAOD::details::AuxStoreBase::getData ( SG::auxid_t  auxid) const
overridevirtualinherited

Get a pointer to a given array.

Implements SG::IConstAuxStore.

Definition at line 54 of file AuxStoreBase.cxx.

54  {
55 
56  const SG::IAuxTypeVector* v = getVector(auxid);
57  if (v) {
58  return v->toPtr();
59  }
60  return nullptr;
61 }

◆ getData() [3/4]

virtual const void* SG::IConstAuxStore::getData
inherited

Pick up the const version from the base class.

◆ getData() [4/4]

void * xAOD::details::AuxStoreBase::getData ( SG::auxid_t  auxid,
std::size_t  size,
std::size_t  capacity 
)
overridevirtualinherited

Get a pointer to a given array, creating the array if necessary.

Definition at line 299 of file AuxStoreBase.cxx.

300  {
301 
302  // Guard against multi-threaded execution:
303  guard_t guard(m_mutex2);
304 
305  // Remember the size:
306  m_data.m_size = size;
307 
308  // Check if we want to write this variable to the output:
309  if (!(isAuxIDSelected(auxid) && hasOutput())) {
310  // Create the store only when necessary:
311  if (!m_data.m_transientStore) {
312  m_data.m_transientStore = std::make_unique<SG::AuxStoreInternal>(
314  if (m_locked) {
315  m_data.m_transientStore->lock();
316  }
317  }
318  // Let the transient store create the variable:
319  std::size_t nids = m_data.m_transientStore->getAuxIDs().size();
320  void* result = m_data.m_transientStore->getData(auxid, size, capacity);
321  if (result && (nids != m_data.m_transientStore->getAuxIDs().size())) {
322  m_data.m_auxIDs.insert(auxid);
323  }
324  // Return the address in the transient memory:
325  return result;
326  }
327 
328  // If the variable exists already, and this is a locked store, then
329  // we are in trouble.
330  if (m_locked && (auxid < m_data.m_vecs.size()) && m_data.m_vecs[auxid]) {
331  if (!((auxid < m_data.m_isDecoration.size()) &&
332  m_data.m_isDecoration[auxid])) {
333  throw SG::ExcStoreLocked(auxid);
334  }
335  }
336 
337  // Connect this auxiliary variable just to the output:
338  if (setupOutputData(auxid).isFailure()) {
339  ::Error("xAOD::AuxStoreBase::getData",
340  XAOD_MESSAGE("Failed to set up variable %s"),
341  SG::AuxTypeRegistry::instance().getName(auxid).c_str());
342  return nullptr;
343  }
344 
345  // Check whether things make sense:
346  if ((m_data.m_structMode == EStructMode::kObjectStore) && (size != 1)) {
347  ::Error("xAOD::AuxStoreBase::getData",
348  XAOD_MESSAGE("Branch creation requested with:"));
349  ::Error("xAOD::AuxStoreBase::getData", XAOD_MESSAGE(" name = %s"),
350  SG::AuxTypeRegistry::instance().getName(auxid).c_str());
351  ::Error("xAOD::AuxStoreBase::getData", XAOD_MESSAGE(" size = %i"),
352  static_cast<int>(size));
353  ::Error("xAOD::AuxStoreBase::getData",
354  XAOD_MESSAGE(" m_structMode = EStructMode::kObjectStore"));
355  return nullptr;
356  }
357 
358  // Make sure the variable is of the right size:
359  m_data.m_vecs[auxid]->reserve(capacity);
360  m_data.m_vecs[auxid]->resize(size);
361 
362  // Return the object:
363  return m_data.m_vecs[auxid]->toPtr();
364 }

◆ getDecoration() [1/2]

virtual void* SG::IConstAuxStore::getDecoration ( auxid_t  auxid,
size_t  size,
size_t  capacity 
)
pure virtualinherited

Return the data vector for one aux data decoration item.

Parameters
auxidThe identifier of the desired aux data item.
sizeThe current size of the container (in case the data item does not already exist).
capacityThe current capacity of the container (in case the data item does not already exist).

Each aux data item is stored as a vector, with one entry per entry in the owning container. This returns a pointer to the start of the vector.

If the data item does not exist, it then it will be created and initialized with default values. If the container is locked, then the new item will be marked as a decoration. size and capacity give the size for the new aux data item vector.

If the data item already exists, then we return it if either the container is not locked or the item is marked as a decoration. Otherwise we throw an exception.

Implemented in xAOD::EventAuxInfo_v1, xAOD::EventInfoAuxContainer_v1, xAOD::EventAuxInfo_v2, xAOD::EventAuxInfo_v3, RootAuxDynStore, SG::AuxStoreInternal, xAOD::AuxContainerBase, xAOD::ShallowAuxContainer, xAOD::AuxInfoBase, SG::AuxStoreConstMem, and xAOD::ByteStreamAuxContainer_v1.

◆ getDecoration() [2/2]

void * xAOD::details::AuxStoreBase::getDecoration ( SG::auxid_t  auxid,
std::size_t  size,
std::size_t  capacity 
)
overridevirtualinherited

Get a pointer to a given array, creating the array if necessary.

Definition at line 109 of file AuxStoreBase.cxx.

110  {
111 
112  // Guard against multi-threaded execution:
113  guard_t guard(m_mutex1);
114 
115  // Remember the requested size:
116  m_data.m_size = size;
117 
118  // If this is a locked object, deal with it correctly:
119  if (m_locked) {
120  // If the variable exists already and it's a decoration, then let's
121  // give it back.
122  if ((auxid < m_data.m_vecs.size()) && m_data.m_vecs[auxid] &&
123  (auxid < m_data.m_isDecoration.size() &&
124  m_data.m_isDecoration[auxid])) {
125  // Things look okay...
126  m_data.m_vecs[auxid]->reserve(capacity);
127  m_data.m_vecs[auxid]->resize(size);
128  return m_data.m_vecs[auxid]->toPtr();
129  }
130  // If it's in the transient store already, return it from there.
131  // Since in a locked store *everything* is a decoration in the
132  // transient store.
133  if (m_data.m_transientStore &&
134  m_data.m_transientStore->getAuxIDs().test(auxid)) {
135  return m_data.m_transientStore->getDecoration(auxid, size, capacity);
136  }
137  // If we know this auxiliary ID, but it was not found as a decoration
138  // by the previous checks, then we're in trouble.
139  if (m_data.m_auxIDs.test(auxid)) {
140  throw SG::ExcStoreLocked(auxid);
141  }
142  }
143 
144  // Check if we want to write this variable to the output:
145  if (!(isAuxIDSelected(auxid) && hasOutput())) {
146 
147  // Create the store only when necessary:
148  if (!m_data.m_transientStore) {
149  m_data.m_transientStore = std::make_unique<SG::AuxStoreInternal>(
151  if (m_locked) {
152  m_data.m_transientStore->lock();
153  }
154  }
155  // Let the transient store create the decoration:
156  const std::size_t nids = m_data.m_transientStore->getAuxIDs().size();
157  void* result =
158  m_data.m_transientStore->getDecoration(auxid, size, capacity);
159  if (result && (nids != m_data.m_transientStore->getAuxIDs().size())) {
160  m_data.m_auxIDs.insert(auxid);
161  if (m_data.m_transientStore->isDecoration(auxid)) {
162  m_data.m_decorIDs.insert(auxid);
163  }
164  }
165  // Return the memory address from the transient store:
166  return result;
167  }
168 
169  // Doesn't exist yet. So let's make it:
170  void* result = getData(auxid, size, capacity);
171  if (m_locked) {
172  // If the container is locked, remember that this is a decoration:
173  if (m_data.m_isDecoration.size() <= auxid) {
174  m_data.m_isDecoration.resize(auxid + 1);
175  }
176  m_data.m_isDecoration[auxid] = true;
177  m_data.m_decorIDs.insert(auxid);
178  }
179 
180  // Return the pointer made by getData(...):
181  return result;
182 }

◆ getDecorIDs()

const SG::auxid_set_t & xAOD::details::AuxStoreBase::getDecorIDs ( ) const
overridevirtualinherited

Get the types(names) of decorations handled by this container.

Implements SG::IConstAuxStore.

Definition at line 104 of file AuxStoreBase.cxx.

104  {
105 
106  return m_data.m_decorIDs;
107 }

◆ getDynamicAuxIDs()

const SG::auxid_set_t & xAOD::details::AuxStoreBase::getDynamicAuxIDs ( ) const
overridevirtualinherited

Get the types(names) of variables created dynamically.

Implements SG::IAuxStoreIO.

Definition at line 608 of file AuxStoreBase.cxx.

608  {
609 
610  // All the auxiliary decorations handled by this object are considered
611  // dynamic:
612  return getAuxIDs();
613 }

◆ getEntry()

StatusCode xAOD::RAuxStore::getEntry ( std::int64_t  entry,
int  getall = 0 
)

Get entry from the input RNTuple.

Definition at line 691 of file RAuxStore.cxx.

691  {
692 
693  assert(m_impl);
694 
695  // Guard against multi-threaded execution:
696  guard_t guard(m_impl->m_mutex);
697 
698  m_impl->m_entry = entry;
699 
700  // Reset the transient store. TEvent::fill() calls this function with
701  // getall==99. When that is happening, we need to keep the transient
702  // store still around. Since the user may want to interact with the
703  // object after it was written out. (And since TEvent::fill() asks for
704  // the transient decorations after calling getEntry(...).)
705  if (m_data.m_transientStore && (getall != 99)) {
706  // Remove the transient auxiliary IDs from the internal list:
707  m_data.m_auxIDs -= m_data.m_transientStore->getAuxIDs();
708  m_data.m_decorIDs -= m_data.m_transientStore->getDecorIDs();
709  // Delete the object:
710  m_data.m_transientStore.reset();
711  }
712 
713  // Now remove the IDs of the decorations that are getting persistified:
714  if (getall != 99) {
715  for (SG::auxid_t auxid = 0; auxid < m_data.m_isDecoration.size(); ++auxid) {
716  if (!m_data.m_isDecoration[auxid]) {
717  continue;
718  }
719  m_data.m_auxIDs.erase(auxid);
720  m_data.m_decorIDs.erase(auxid);
721  }
722  }
723 
724  // If we don't need everything loaded, return now:
725  if (!getall) {
726  return StatusCode::SUCCESS;
727  }
728 
729  // Get all the variables at once:
730  for (auto& field : m_impl->m_fields) {
731  if (field) {
732  RETURN_CHECK("xAOD::RAuxStore::getEntry", field->getEntry(entry));
733  }
734  }
735 
736  // Return gracefully.
737  return StatusCode::SUCCESS;
738 }

◆ getEntryFor()

StatusCode xAOD::RAuxStore::getEntryFor ( SG::auxid_t  auxid)
overrideprivatevirtual

Load a single variable from the input.

Implements xAOD::details::AuxStoreBase.

Definition at line 780 of file RAuxStore.cxx.

780  {
781 
782  assert(m_impl);
783  assert(m_impl->m_fields.size() > auxid);
784  assert(m_impl->m_fields[auxid]);
785  RETURN_CHECK("xAOD::RAuxStore::getEntryFor",
786  m_impl->m_fields[auxid]->getEntry(m_impl->m_entry));
787  return StatusCode::SUCCESS;
788 }

◆ getInputObject()

const void * xAOD::RAuxStore::getInputObject ( SG::auxid_t  auxid) const
overrideprivatevirtual

Get a pointer to an input object, as it is in memory, for getIOData()

Implements xAOD::details::AuxStoreBase.

Definition at line 1147 of file RAuxStore.cxx.

1147  {
1148 
1149  assert(m_impl);
1150  assert(m_impl->m_fields.size() > auxid);
1151  assert(m_impl->m_fields[auxid]);
1152  return m_impl->m_fields[auxid]->objectPtr();
1153 }

◆ getInputType()

const std::type_info * xAOD::RAuxStore::getInputType ( SG::auxid_t  auxid) const
overrideprivatevirtual

Get the type of an input object, for getIOType()

Implements xAOD::details::AuxStoreBase.

Definition at line 1155 of file RAuxStore.cxx.

1155  {
1156 
1157  assert(m_impl);
1158  assert(m_impl->m_fields.size() > auxid);
1159  assert(m_impl->m_fields[auxid]);
1160  return m_impl->m_fields[auxid]->typeInfo();
1161 }

◆ getIOData()

const void * xAOD::details::AuxStoreBase::getIOData ( SG::auxid_t  auxid) const
overridevirtualinherited

Get a pointer to the data being stored for one aux data item.

Implements SG::IAuxStoreIO.

Definition at line 510 of file AuxStoreBase.cxx.

510  {
511 
512  // Guard against multi-threaded execution:
513  guard_t guard(m_mutex1);
514 
515  auto this_nc ATLAS_THREAD_SAFE =
516  const_cast<AuxStoreBase*>(this); // locked above
517 
518  // If the variable is coming from the input, and is connected to already.
519  if (hasEntryFor(auxid)) {
520  if (!this_nc->getEntryFor(auxid).isSuccess()) {
521  ::Error("xAOD::AuxStoreBase::getIOData",
522  XAOD_MESSAGE("Couldn't read in variable %s"),
523  SG::AuxTypeRegistry::instance().getName(auxid).c_str());
524  return nullptr;
525  }
526  return getInputObject(auxid);
527  }
528 
529  // Check if it's in the transient store:
530  if (m_data.m_transientStore &&
531  m_data.m_transientStore->getAuxIDs().test(auxid)) {
532  return m_data.m_transientStore->getIOData(auxid);
533  }
534 
535  // If not, try connecting to it now:
536  if (!this_nc->setupInputData(auxid).isSuccess()) {
537  // This is not actually an error condition anymore. We can end up here
538  // when we decorate constant objects coming from the input file, but
539  // on one event we can't set any decorations. For instance when the
540  // input container is empty. In that case the object will still list
541  // the auxiliary ID belonging to that decoration as being available,
542  // but it really isn't.
543  //
544  // Later on it might be needed to tweak the logic of all of this, but
545  // for now just silently returning 0 seems to do the right thing.
546  return nullptr;
547  }
548 
549  // Now we should know this variable:
550  if (!hasEntryFor(auxid)) {
551  ::Fatal("xAOD::AuxStoreBase::getIOData",
552  XAOD_MESSAGE("Internal logic error detected"));
553  return nullptr;
554  }
555 
556  // Make sure that the right payload is in memory:
557  if (!this_nc->getEntryFor(auxid).isSuccess()) {
558  ::Error("xAOD::AuxStoreBase::getIOData",
559  XAOD_MESSAGE("Couldn't read in variable %s"),
560  SG::AuxTypeRegistry::instance().getName(auxid).c_str());
561  return nullptr;
562  }
563 
564  // Return the pointer.
565  return getInputObject(auxid);
566 }

◆ getIOType()

const std::type_info * xAOD::details::AuxStoreBase::getIOType ( SG::auxid_t  auxid) const
overridevirtualinherited

Return the type of the data to be stored for one aux data item.

Implements SG::IAuxStoreIO.

Definition at line 569 of file AuxStoreBase.cxx.

569  {
570 
571  // Guard against multi-threaded execution:
572  guard_t guard(m_mutex1);
573 
574  // If the variable is connected to already:
575  if (hasEntryFor(auxid)) {
576  return getInputType(auxid);
577  }
578 
579  // Check if it's in the transient store:
580  if (m_data.m_transientStore &&
581  m_data.m_transientStore->getAuxIDs().test(auxid)) {
582  return m_data.m_transientStore->getIOType(auxid);
583  }
584 
585  // If not, try connecting to it now:
586  auto this_nc ATLAS_THREAD_SAFE =
587  const_cast<AuxStoreBase*>(this); // locked above
588  if (!this_nc->setupInputData(auxid).isSuccess()) {
589  ::Error("xAOD::AuxStoreBase::getIOType",
590  XAOD_MESSAGE("Couldn't connect to auxiliary variable "
591  "%i %s"),
592  static_cast<int>(auxid),
593  SG::AuxTypeRegistry::instance().getName(auxid).c_str());
594  return nullptr;
595  }
596 
597  // Now we should know this variable:
598  if (!hasEntryFor(auxid)) {
599  ::Fatal("xAOD::AuxStoreBase::getIOType",
600  XAOD_MESSAGE("Internal logic error detected"));
601  return nullptr;
602  }
603 
604  // Return the type info:
605  return getInputType(auxid);
606 }

◆ getSelectedAuxIDs()

SG::auxid_set_t xAOD::details::AuxStoreBase::getSelectedAuxIDs ( ) const
overridevirtualinherited

Get the IDs of the selected aux variables.

Reimplemented from SG::IAuxStoreIO.

Definition at line 623 of file AuxStoreBase.cxx.

623  {
624 
625  // Guard against multi-threaded execution:
626  guard_t guard(m_mutex1);
627  // Leave the calculation up to the internal object:
629 }

◆ getVector()

const SG::IAuxTypeVector * xAOD::details::AuxStoreBase::getVector ( SG::auxid_t  auxid) const
overridevirtualinherited

Return vector interface for one aux data item.

Implements SG::IConstAuxStore.

Definition at line 63 of file AuxStoreBase.cxx.

63  {
64 
65  // Guard against multi-threaded execution:
66  guard_t guard(m_mutex1);
67 
68  // Check if the transient store already handles this variable:
70  (m_data.m_transientStore->getAuxIDs().test(auxid))) {
71  return m_data.m_transientStore->getVector(auxid);
72  }
73 
74  // Access the object through a non-const pointer. This is "safe" because
75  // of the mutex lock above.
76  auto this_nc ATLAS_THREAD_SAFE = const_cast<AuxStoreBase*>(this);
77 
78  // Connect this auxiliary variable both to the input and output
79  // if needed:
80  if ((auxid >= m_data.m_vecs.size()) || (!m_data.m_vecs[auxid])) {
81  if ((!this_nc->setupInputData(auxid).isSuccess()) ||
82  (!this_nc->setupOutputData(auxid).isSuccess())) {
83  return nullptr;
84  }
85  }
86 
87  // Make sure the variable is up to date:
88  if (this_nc->getEntryFor(auxid).isSuccess() == false) {
89  ::Error("xAOD::AuxStoreBase::getVector",
90  XAOD_MESSAGE("Couldn't read in variable %s"),
91  SG::AuxTypeRegistry::instance().getName(auxid).c_str());
92  return nullptr;
93  }
94 
95  // Return the pointer to the object:
96  return m_data.m_vecs[auxid].get();
97 }

◆ getWritableAuxIDs()

const SG::auxid_set_t & xAOD::details::AuxStoreBase::getWritableAuxIDs ( ) const
overridevirtualinherited

Return a set of writable data identifiers.

Implements SG::IAuxStore.

Definition at line 366 of file AuxStoreBase.cxx.

366  {
367 
368  return getAuxIDs();
369 }

◆ hasEntryFor()

bool xAOD::RAuxStore::hasEntryFor ( SG::auxid_t  auxid) const
overrideprivatevirtual

Check if a given variable is available from the input.

Implements xAOD::details::AuxStoreBase.

Definition at line 774 of file RAuxStore.cxx.

774  {
775 
776  assert(m_impl);
777  return ((m_impl->m_fields.size() > auxid) && m_impl->m_fields[auxid]);
778 }

◆ hasOutput()

bool xAOD::RAuxStore::hasOutput ( ) const
overrideprivatevirtual

Check if an output is being written by the object.

Implements xAOD::details::AuxStoreBase.

Definition at line 790 of file RAuxStore.cxx.

790  {
791 
792  assert(m_impl);
793  return (m_impl->m_outTuple != nullptr);
794 }

◆ insertMove() [1/2]

virtual bool SG::IAuxStore::insertMove ( size_t  pos,
IAuxStore other,
const SG::auxid_set_t ignore = SG::auxid_set_t() 
)
pure virtualinherited

Move all elements from other to this store.

Parameters
posThe starting index of the insertion.
otherStore from which to do the move.
ignoreSet of variables that should not be added to the store.

Let len be the size of other. The store will be increased in size by len elements, with the elements at pos being copied to pos+len. Then, for each auxiliary variable, the entire contents of that variable for other will be moved to this store at index pos. This will be done via move semantics if possible; otherwise, it will be done with a copy. Variables present in this store but not in other will have the corresponding elements default-initialized. Variables in other but not in this store will be added unless they are in ignore.

Returns true if it is known that none of the vectors' memory moved, false otherwise.

Implemented in SG::AuxStoreInternal.

◆ insertMove() [2/2]

bool xAOD::details::AuxStoreBase::insertMove ( std::size_t  pos,
SG::IAuxStore other,
const SG::auxid_set_t ignore 
)
overridevirtualinherited

Insert contents of another store via move.

Definition at line 460 of file AuxStoreBase.cxx.

461  {
462  // Guard against multi-threaded execution:
463  guard_t guard(m_mutex1);
464 
465  // A sanity check:
467  ::Error("xAOD::AuxStoreBase::insertMove",
468  XAOD_MESSAGE("Should not have been called for single-object "
469  "store"));
470  return false;
471  }
472 
473  bool nomove = true;
474  std::size_t other_size = other.size();
475 
476  SG::auxid_set_t ignore = ignore_in;
477 
478  for (SG::auxid_t id : m_data.m_auxIDs) {
479  SG::IAuxTypeVector* v_dst = nullptr;
480  if (id < m_data.m_vecs.size()) {
481  v_dst = m_data.m_vecs[id].get();
482  }
483  if (v_dst && !v_dst->isLinked()) {
484  ignore.insert(id);
485  if (other.getData(id)) {
486  void* src_ptr = other.getData(id, other_size, other_size);
487  if (src_ptr) {
488  if (!v_dst->insertMove(pos, src_ptr, 0, other_size, other)) {
489  nomove = false;
490  }
491  }
492  } else {
493  const void* orig = v_dst->toPtr();
494  v_dst->shift(pos, other_size);
495  if (orig != v_dst->toPtr()) {
496  nomove = false;
497  }
498  }
499  }
500  }
501 
502  if (m_data.m_transientStore) {
503  if (!m_data.m_transientStore->insertMove(pos, other, ignore))
504  nomove = false;
505  }
506 
507  return nomove;
508 }

◆ isAuxIDSelected()

bool xAOD::details::AuxStoreBase::isAuxIDSelected ( SG::auxid_t  auxid) const
protectedinherited

Check if an auxiliary variable is selected for ouput writing.

This is a tricky one.

The function can't just rely on getSelectedAuxIDs, as the aux ID received here may be a new ID that the object doesn't yet know about. So we have no other choice but to check this ID explicitly.

@apram auxid The auxiliary ID that should be checked

Returns
true if the variable needs to be written out, false if not

Definition at line 639 of file AuxStoreBase.cxx.

639  {
640 
641  // A temporary object:
642  SG::auxid_set_t auxids;
643  auxids.insert(auxid);
644 
645  // Check if the auxid is returned as a selected ID:
646  return m_selection.getSelectedAuxIDs(auxids).size();
647 }

◆ isDecoration()

bool xAOD::details::AuxStoreBase::isDecoration ( SG::auxid_t  auxid) const
overridevirtualinherited

Test if a variable is a decoration.

Implements SG::IConstAuxStore.

Definition at line 184 of file AuxStoreBase.cxx.

184  {
185  if (m_locked) {
186  if (auxid < m_data.m_isDecoration.size() && m_data.m_isDecoration[auxid]) {
187  return true;
188  }
189  if (m_data.m_transientStore) {
190  return m_data.m_transientStore->isDecoration(auxid);
191  }
192  }
193  return false;
194 }

◆ isTopStore()

bool xAOD::details::AuxStoreBase::isTopStore ( ) const
inherited

Check if the object is a "top store", or not.

Definition at line 43 of file AuxStoreBase.cxx.

43  {
44 
45  return m_data.m_topStore;
46 }

◆ linkedVector() [1/3]

const SG::IAuxTypeVector * xAOD::details::AuxStoreBase::linkedVector ( SG::auxid_t  auxid) const
overridevirtualinherited

Return (const) interface for a linked variable.

Reimplemented from SG::IConstAuxStore.

Definition at line 272 of file AuxStoreBase.cxx.

272  {
274  SG::auxid_t linked_id = r.linkedVariable(auxid);
275  guard_t guard(m_mutex1);
276  if (linked_id < m_data.m_vecs.size()) {
277  return m_data.m_vecs[linked_id].get();
278  }
279  if (m_data.m_transientStore) {
281  ->linkedVector(auxid);
282  }
283  return nullptr;
284 }

◆ linkedVector() [2/3]

SG::IAuxTypeVector * xAOD::details::AuxStoreBase::linkedVector ( SG::auxid_t  auxid)
overridevirtualinherited

Return (non-const) interface for a linked variable.

Reimplemented from SG::IAuxStore.

Definition at line 286 of file AuxStoreBase.cxx.

286  {
288  SG::auxid_t linked_id = r.linkedVariable(auxid);
289  guard_t guard(m_mutex1);
290  if (linked_id < m_data.m_vecs.size()) {
291  return m_data.m_vecs[linked_id].get();
292  }
293  if (m_data.m_transientStore) {
294  return m_data.m_transientStore->linkedVector(auxid);
295  }
296  return nullptr;
297 }

◆ linkedVector() [3/3]

virtual const IAuxTypeVector* SG::IConstAuxStore::linkedVector
inlineinherited

Return interface for a linked variable.

Parameters
auxidThe ID of the parent variable.

If auxid has a linked variable, then return the IAuxTypeVector describing it. Otherwise, return nullptr. May return nullptr unconditionally if this store does not support linked variables.

Definition at line 189 of file IConstAuxStore.h.

190  { return nullptr; }

◆ lock()

void xAOD::details::AuxStoreBase::lock ( )
overridevirtualinherited

Lock the object, and don't let decorations be added.

Implements SG::IConstAuxStore.

Definition at line 196 of file AuxStoreBase.cxx.

196  {
197 
198  // Guard against multi-threaded execution:
199  guard_t guard(m_mutex1);
200 
201  m_locked = true;
202  if (m_data.m_transientStore) {
203  m_data.m_transientStore->lock();
204  }
205 }

◆ lockDecoration()

void xAOD::details::AuxStoreBase::lockDecoration ( SG::auxid_t  auxid)
overridevirtualinherited

Lock a decoration.

Implements SG::IConstAuxStore.

Definition at line 237 of file AuxStoreBase.cxx.

237  {
238  if (m_data.m_transientStore) {
239  m_data.m_transientStore->lockDecoration(auxid);
240  }
241  m_data.m_decorIDs.erase(auxid);
242 }

◆ prefix()

const std::string & xAOD::details::AuxStoreBase::prefix ( ) const
inherited

Get the currently configured object name prefix.

Definition at line 38 of file AuxStoreBase.cxx.

38  {
39 
40  return m_data.m_prefix;
41 }

◆ readFrom()

StatusCode xAOD::RAuxStore::readFrom ( RNTupleReader reader)

Connect the object to an input RNTuple.

This function is called by the infrastructure to connect the object to an input RNTuple whenever a new input file is opened.

Parameters
readerThe reader object set up by a parent object
Returns
StatusCode::SUCCESS if the function was successful, something else otherwise

Definition at line 643 of file RAuxStore.cxx.

643  {
644 
645  assert(m_impl);
646 
647  // Make sure that everything will be re-read after this:
648  reset();
649 
650  // We will need to check again which branches are available:
651  m_impl->m_missingFields.clear();
652 
653  // Remember the tree:
654  m_impl->m_inTuple = &reader;
655 
656  // Catalogue all the branches:
657  RETURN_CHECK("xAOD::RAuxStore::readFrom", m_impl->scanInputTuple());
658 
659  // Return gracefully.
660  return StatusCode::SUCCESS;
661 }

◆ reserve() [1/2]

virtual void SG::IAuxStore::reserve ( size_t  sz)
pure virtualinherited

Change the capacity of all aux data vectors.

Parameters
szThe new capacity.

This should be called when the capacity of the container changes (by reserve). This should change the capacity for the vectors for all aux data items.

Implemented in SG::AuxStoreInternal, xAOD::AuxContainerBase, xAOD::ShallowAuxContainer, xAOD::AuxInfoBase, and xAOD::ByteStreamAuxContainer_v1.

◆ reserve() [2/2]

void xAOD::details::AuxStoreBase::reserve ( std::size_t  size)
overridevirtualinherited

Reserve a given size for the arrays.

Definition at line 404 of file AuxStoreBase.cxx.

404  {
405 
406  // Guard against multi-threaded execution:
407  guard_t guard(m_mutex1);
408 
409  // A sanity check:
410  if ((m_data.m_structMode == EStructMode::kObjectStore) && (size != 1)) {
411  ::Error("xAOD::AuxStoreBase::reserve",
412  XAOD_MESSAGE("size = %i for single-object store"),
413  static_cast<int>(size));
414  return;
415  }
416 
417  for (auto& v : m_data.m_vecs) {
418  if (v && !v->isLinked()) {
419  v->reserve(size);
420  }
421  }
422 
423  if (m_data.m_transientStore) {
424  m_data.m_transientStore->reserve(size);
425  }
426 }

◆ reset()

void xAOD::RAuxStore::reset ( )
overridevirtual

Tell the object that all branches will need to be re-read.

Implements xAOD::details::AuxStoreBase.

Definition at line 762 of file RAuxStore.cxx.

762  {
763 
764  assert(m_impl);
765 
766  for (auto& field : m_impl->m_fields) {
767  if (field) {
768  field->reset();
769  }
770  }
771  m_impl->m_inputScanned = false;
772 }

◆ resize() [1/2]

virtual bool SG::IAuxStore::resize ( size_t  sz)
pure virtualinherited

Change the size of all aux data vectors.

Parameters
szThe new size.

This should be called when the size of the container changes. This should resize the vectors for all aux data items.

If the size of the container grows, the new elements should be default-initialized; if it shrinks, destructors should be run as appropriate.

Should return true if it is known that none of the data pointers changed (and thus the cache does not need to be cleared), false otherwise.

Implemented in SG::AuxStoreInternal, xAOD::AuxContainerBase, xAOD::ShallowAuxContainer, xAOD::AuxInfoBase, and xAOD::ByteStreamAuxContainer_v1.

◆ resize() [2/2]

bool xAOD::details::AuxStoreBase::resize ( std::size_t  size)
overridevirtualinherited

Resize the arrays to a given size.

Definition at line 371 of file AuxStoreBase.cxx.

371  {
372 
373  // Guard against multi-threaded execution:
374  guard_t guard(m_mutex1);
375 
376  // A sanity check:
377  if ((m_data.m_structMode == EStructMode::kObjectStore) && (size != 1)) {
378  ::Error("xAOD::AuxStoreBase::resize",
379  XAOD_MESSAGE("size = %i for single-object store"),
380  static_cast<int>(size));
381  return false;
382  }
383 
384  // Remember the new size:
385  m_data.m_size = size;
386 
387  bool nomoves = true;
388  for (auto& v : m_data.m_vecs) {
389  if (v && !v->isLinked()) {
390  if (!v->resize(size)) {
391  nomoves = false;
392  }
393  }
394  }
395  if (m_data.m_transientStore) {
396  if (!m_data.m_transientStore->resize(size)) {
397  nomoves = false;
398  }
399  }
400 
401  return nomoves;
402 }

◆ selectAux()

void xAOD::details::AuxStoreBase::selectAux ( const std::set< std::string > &  attributes)
virtualinherited

Select dynamic auxiliary attributes for writing.

Definition at line 616 of file AuxStoreBase.cxx.

616  {
617 
618  guard_t guard(m_mutex1);
620 }

◆ setOption()

virtual bool SG::IAuxStore::setOption ( auxid_t  ,
const AuxDataOption  
)
inlinevirtualinherited

Set an option for a given auxiliary variable.

Parameters
auxidThe identifier of the desired aux data item.
optionThe option to set.

The interpretation of the option depends on the particular representation of the variable.

Returns true if the option setting was successful; false otherwise.

Reimplemented in xAOD::AuxContainerBase, xAOD::AuxInfoBase, and SG::AuxStoreInternal.

Definition at line 173 of file IAuxStore.h.

174  { return false; }

◆ setPrefix()

void xAOD::RAuxStore::setPrefix ( std::string_view  prefix)
overridevirtual

Set the object name prefix.

Implements xAOD::details::AuxStoreBase.

Definition at line 629 of file RAuxStore.cxx.

629  {
630 
633  reset();
634 }

◆ setStructMode()

void xAOD::details::AuxStoreBase::setStructMode ( EStructMode  mode)
inherited

Set the structure mode of the object to a new value.

Definition at line 32 of file AuxStoreBase.cxx.

32  {
33 
35  reset();
36 }

◆ setTopStore()

void xAOD::details::AuxStoreBase::setTopStore ( bool  value = true)
inherited

Set whether the object should behave as a "top store" or not.

Definition at line 48 of file AuxStoreBase.cxx.

48  {
49 
51  reset();
52 }

◆ setupInputData()

StatusCode xAOD::RAuxStore::setupInputData ( SG::auxid_t  auxid)
overrideprivatevirtual

Connect a variable to the input.

This internal function takes care of connecting to an individual (sub-)field in the input file for a given auxiliary variable.

Parameters
auxidThe ID of the variable to connect to
Returns
StatusCode::SUCCESS if the function was successful, something else otherwise

Implements xAOD::details::AuxStoreBase.

Definition at line 803 of file RAuxStore.cxx.

803  {
804 
805  // Return right away if we already know that the field is missing.
806  if ((auxid < m_impl->m_missingFields.size()) &&
807  m_impl->m_missingFields[auxid]) {
808  return StatusCode::RECOVERABLE;
809  }
810 
811  // We may call this function without an input being used. That's not an
812  // error either.
813  if (m_impl->m_inTuple == nullptr) {
814  return StatusCode::RECOVERABLE;
815  }
816 
817  // Make sure the internal storage is large enough:
818  if (m_data.m_vecs.size() <= auxid) {
819  m_data.m_vecs.resize(auxid + 1);
820  }
821  if (m_impl->m_fields.size() <= auxid) {
822  m_impl->m_fields.resize(auxid + 1);
823  }
824 
825  // Check if we need to do anything. Remember, output-only variables don't
826  // have an associated RFieldHandle. To tell the caller that no input is
827  // actually available for the variable (only an output), use a different
828  // return value.
829  if (m_data.m_vecs[auxid]) {
830  return (m_impl->m_fields[auxid] ? StatusCode::SUCCESS
831  : StatusCode::RECOVERABLE);
832  }
833 
834  // Convenience access to the registry.
836 
837  // Get the property name:
838  const std::string statFieldName =
839  std::format("{}{}", m_data.m_prefix, r.getName(auxid));
840  const std::string dynFieldName =
841  std::format("{}{}", m_data.m_dynPrefix, r.getName(auxid));
842 
843  // Check if the field exists:
844  std::string fieldName = statFieldName;
845  ROOT::DescriptorId_t fieldId;
846  if ((fieldId = m_impl->m_inTuple->GetDescriptor().FindFieldId(
847  statFieldName)) == std::numeric_limits<unsigned long>::max()) {
848  if ((fieldId = m_impl->m_inTuple->GetDescriptor().FindFieldId(
849  dynFieldName)) == std::numeric_limits<unsigned long>::max()) {
850  // Remember that the field is missing.
851  if (m_impl->m_missingFields.size() <= auxid) {
852  m_impl->m_missingFields.resize(auxid + 1);
853  }
854  m_impl->m_missingFields[auxid] = true;
855  // The field doesn't exist, but this is not an error per se.
856  // The user may just be calling isAvailable(...) on the variable.
857  return StatusCode::RECOVERABLE;
858  }
859  // We have a dynamic field:
860  fieldName = dynFieldName;
861  }
862 
863  // Get the object describing this field.
864  const ROOT::RFieldDescriptor& fieldDesc =
865  m_impl->m_inTuple->GetDescriptor().GetFieldDescriptor(fieldId);
866 
867  // Check if it's a "primitive field":
868  const bool primitiveField = Utils::isPrimitiveType(fieldDesc.GetTypeName());
869  // Check if it's a "container field":
870  const bool containerField =
871  (primitiveField ? false : isContainerField(fieldDesc, auxid));
872 
873  // Set the structure mode if it has not been defined externally:
877  }
878 
879  // Check that the branch type makes sense:
880  if ((containerField &&
882  !r.isLinked(auxid)) ||
883  ((!containerField) &&
885  ::Error("xAOD::RAuxStore::setupInputData",
886  XAOD_MESSAGE("Field type and requested structure mode "
887  "differ for field: %s"),
888  fieldName.c_str());
889  return StatusCode::FAILURE;
890  }
891 
892  // Get the property type:
893  const std::type_info* fieldType = nullptr;
894  if (details::isRegisteredType(auxid)) {
895  // Get the type from the auxiliary type registry:
896  fieldType = (containerField ? r.getVecType(auxid) : r.getType(auxid));
897  } else {
898  // Get the type from the input field itself:
899  TClass* clDummy = ::TClass::GetClass(fieldDesc.GetTypeName().c_str());
900  fieldType = (clDummy ? clDummy->GetTypeInfo()
901  : &(Utils::getTypeInfo(fieldDesc.GetTypeName())));
902  }
903  if (!fieldType) {
904  ::Error("xAOD::RAuxStore::setupInputData",
905  XAOD_MESSAGE("Can't read/copy variable %s (%s)"), fieldName.c_str(),
906  fieldDesc.GetTypeName().c_str());
907  return StatusCode::RECOVERABLE;
908  }
909  const TString fieldTypeName = Utils::getTypeName(*fieldType).c_str();
910 
911  // Check if we have the needed dictionary for an object field:
912  ::TClass* fieldClass = nullptr;
913  if (!primitiveField) {
914  // Get the property's class:
915  fieldClass = ::TClass::GetClass(*fieldType, true, true);
916  if (!fieldClass) {
917  fieldClass = ::TClass::GetClass(fieldTypeName);
918  }
919  if (!fieldClass) {
920  ::Error("xAOD::RAuxStore::setupInputData",
921  XAOD_MESSAGE("No dictionary available for class \"%s\""),
922  fieldTypeName.Data());
923  return StatusCode::FAILURE;
924  }
925  }
926 
927  // Create the smart object holding this vector:
928  if (details::isRegisteredType(auxid)) {
929  m_data.m_vecs[auxid] = r.makeVector(auxid, (size_t)0, (size_t)0);
930  if (!containerField) {
931  m_data.m_vecs[auxid]->resize(1);
932  }
933  if (fieldClass &&
934  strncmp(fieldClass->GetName(), "SG::PackedContainer<", 20) == 0) {
935  std::unique_ptr<SG::IAuxTypeVector> packed =
936  m_data.m_vecs[auxid]->toPacked();
937  std::swap(m_data.m_vecs[auxid], packed);
938  }
939  } else {
940  ::Error("xAOD::RAuxStore::setupInputData",
941  XAOD_MESSAGE("Couldn't create in-memory vector for "
942  "variable %s (%i)"),
943  fieldName.c_str(), static_cast<int>(auxid));
944  return StatusCode::FAILURE;
945  }
946 
947  // Access/create the field, and create a field handle object.
948  void* objectPtr = (containerField ? m_data.m_vecs[auxid]->toVector()
949  : m_data.m_vecs[auxid]->toPtr());
950  m_impl->m_fields[auxid] = std::make_unique<RFieldHandle>(
951  m_impl->m_inTuple->GetView<void>(fieldName.c_str(), objectPtr), auxid,
952  m_data.m_prefix, objectPtr, fieldType);
953 
954  // Get the current entry.
955  RETURN_CHECK("xAOD::RAuxStore::setupInputData",
956  m_impl->m_fields[auxid]->getEntry(m_impl->m_entry));
957 
958  // Remember which variable got created:
959  m_data.m_auxIDs.insert(auxid);
960 
961  // Check if we just replaced a generic object:
962  if (details::isRegisteredType(auxid)) {
963  // The name of the variable we just created:
964  const std::string auxname = r.getName(auxid);
965  // Check if there's another variable with this name already:
966  for (SG::auxid_t i = 0; i < m_data.m_vecs.size(); ++i) {
967  // Check if we have this aux ID:
968  if (!m_data.m_vecs[i]) {
969  continue;
970  }
971  // Ingore the object that we *just* created:
972  if (i == auxid) {
973  continue;
974  }
975  // The name of the variable:
976  const std::string testname = r.getName(i);
977  // Check if it has the same name:
978  if (testname != auxname) {
979  continue;
980  }
981  // Check that the other one is a non-registered type:
983  ::Error("xAOD::RAuxStore::setupInputData",
984  XAOD_MESSAGE("Internal logic error!"));
985  continue;
986  }
987  // Okay, we do need to remove this object:
988  m_data.m_vecs[i].reset();
989  m_impl->m_fields[i].reset();
991  }
992  }
993 
994  SG::auxid_t linked_auxid = r.linkedVariable(auxid);
995  if (linked_auxid != SG::null_auxid) {
996  return setupInputData(linked_auxid);
997  }
998 
999  // Return gracefully:
1000  return StatusCode::SUCCESS;
1001 }

◆ setupOutputData()

StatusCode xAOD::RAuxStore::setupOutputData ( SG::auxid_t  auxid)
overrideprivatevirtual

Connect a variable to the output.

This function is used internally to create an output field with the contents of a single auxiliary variable.

Parameters
auxidThe ID of the variable to create an output field for
Returns
StatusCode::SUCCESS if the function was successful, something else otherwise

Implements xAOD::details::AuxStoreBase.

Definition at line 1010 of file RAuxStore.cxx.

1010  {
1011 
1012  assert(m_impl);
1013 
1014  // Check whether we need to do anything.
1015  if (!m_impl->m_outTuple) {
1016  return StatusCode::SUCCESS;
1017  }
1018 
1019  // Check if the variable needs to be written out.
1020  if (!isAuxIDSelected(auxid)) {
1021  return StatusCode::SUCCESS;
1022  }
1023 
1024  // Make sure that containers are large enough:
1025  if (m_data.m_vecs.size() <= auxid) {
1026  m_data.m_vecs.resize(auxid + 1);
1027  }
1028  if (m_impl->m_fieldsWritten.size() <= auxid) {
1029  m_impl->m_fieldsWritten.resize(auxid + 1);
1030  }
1031 
1032  // Check if this auxiliary variable is already in the output:
1033  if (m_impl->m_fieldsWritten[auxid]) {
1034  return StatusCode::SUCCESS;
1035  }
1036 
1037  // After this point, we either succeed with setting up the writing of this
1038  // variable, or the code fails completely. So let's set this flag already,
1039  // as unfortunately we can recursively end up here using the code below.
1040  m_impl->m_fieldsWritten[auxid] = true;
1041 
1042  // The registry:
1044 
1045  // Check if the variable was put into the transient store as a
1046  // decoration, and now needs to be put into the output file:
1047  if ((!m_data.m_vecs[auxid]) && m_data.m_transientStore &&
1048  (m_data.m_transientStore->getAuxIDs().test(auxid))) {
1049 
1050  // Get the variable from the transient store:
1051  const void* pptr = m_data.m_transientStore->getData(auxid);
1052  if (!pptr) {
1053  ::Fatal("xAOD::RAuxStore::setupOutputData",
1054  XAOD_MESSAGE("Internal logic error detected"));
1055  return StatusCode::FAILURE;
1056  }
1057 
1058  // Create the new object:
1059  m_data.m_vecs[auxid] = reg.makeVector(auxid, m_data.m_size, m_data.m_size);
1060  void* ptr = m_data.m_vecs[auxid]->toPtr();
1061  if (!ptr) {
1062  ::Error("xAOD::RAuxStore::setupOutputData",
1063  XAOD_MESSAGE("Couldn't create decoration in memory "
1064  "for writing"));
1065  return StatusCode::FAILURE;
1066  }
1067 
1068  // Get the type of this variable:
1069  const std::type_info* type = reg.getType(auxid);
1070  if (!type) {
1071  ::Error("xAOD::RAuxStore::setupOutputData",
1072  XAOD_MESSAGE("Couldn't get the type of transient "
1073  "variable %i"),
1074  static_cast<int>(auxid));
1075  return StatusCode::FAILURE;
1076  }
1077  // Now get the factory for this variable:
1078  const SG::IAuxTypeVectorFactory* factory = reg.getFactory(auxid);
1079  if (!factory) {
1080  ::Error("xAOD::RAuxStore::setupOutputData",
1081  XAOD_MESSAGE("No factory found for transient variable "
1082  "%i"),
1083  static_cast<int>(auxid));
1084  return StatusCode::FAILURE;
1085  }
1086 
1087  // Mark it as a decoration already, otherwise the copy may fail.
1088  if (m_data.m_isDecoration.size() <= auxid) {
1089  m_data.m_isDecoration.resize(auxid + 1);
1090  }
1091  m_data.m_isDecoration[auxid] = true;
1092 
1093  // Finally, do the copy, and remove the variable from the transient store.
1094  factory->copy(auxid, SG::AuxVectorInterface(*this), 0,
1096  m_data.m_size);
1097  }
1098 
1099  // Check if we know about this variable to be on the input,
1100  // but haven't connected to it yet:
1101  if ((m_data.m_auxIDs.test(auxid)) && (!m_data.m_vecs[auxid]) &&
1102  (!m_impl->m_fields[auxid])) {
1103  RETURN_CHECK("xAOD::RAuxStore::setupOutputData", setupInputData(auxid));
1104  }
1105 
1106  // Check that we know the store's type:
1109  ::Error("xAOD::RAuxStore::setupOutputData",
1110  XAOD_MESSAGE("Structure mode unknown for variable %s"),
1111  reg.getName(auxid).c_str());
1112  return StatusCode::FAILURE;
1113  }
1114 
1115  // Check if the variable exists already in memory:
1116  if (!m_data.m_vecs[auxid]) {
1117  m_data.m_vecs[auxid] = reg.makeVector(auxid, (size_t)0, (size_t)0);
1119  m_data.m_vecs[auxid]->resize(1);
1120  }
1121  }
1122 
1123  // Figure out the type and name of the output field.
1124  const std::string fieldName =
1125  std::format("{}{}", m_data.m_dynPrefix, reg.getName(auxid));
1126  const std::string typeName = SG::normalizedTypeinfoName(
1128  ? reg.getVecType(auxid)
1129  : reg.getType(auxid)));
1130 
1131  // Update the output ntuple's model.
1132  {
1133  auto field = ROOT::RFieldBase::Create(fieldName, typeName).Unwrap();
1134  auto updater = m_impl->m_outTuple->CreateModelUpdater();
1135  updater->BeginUpdate();
1136  updater->AddField(std::move(field));
1137  updater->CommitUpdate();
1138  }
1139 
1140  // Remember that we now handle this variable.
1141  m_data.m_auxIDs.insert(auxid);
1142 
1143  // We were successful:
1144  return StatusCode::SUCCESS;
1145 }

◆ shift() [1/2]

virtual void SG::IAuxStore::shift ( size_t  pos,
ptrdiff_t  offs 
)
pure virtualinherited

Shift the elements of the container.

Parameters
posThe starting index for the shift.
offsThe (signed) amount of the shift.

This operation shifts the elements in the vectors for all aux data items, to implement an insertion or deletion. offs may be either positive or negative.

If offs is positive, then the container is growing. The container size should be increased by offs, the element at pos moved to pos + offs, and similarly for following elements. The elements between pos and pos + offs should be default-initialized.

If offs is negative, then the container is shrinking. The element at pos should be moved to pos + offs, and similarly for following elements. The container should then be shrunk by -offs elements (running destructors as appropriate).

Implemented in SG::AuxStoreInternal, xAOD::AuxContainerBase, xAOD::ShallowAuxContainer, xAOD::AuxInfoBase, and xAOD::ByteStreamAuxContainer_v1.

◆ shift() [2/2]

void xAOD::details::AuxStoreBase::shift ( std::size_t  pos,
std::ptrdiff_t  offs 
)
overridevirtualinherited

Shift the contents of the stored arrays.

Definition at line 428 of file AuxStoreBase.cxx.

428  {
429 
430  // Guard against multi-threaded execution:
431  guard_t guard(m_mutex1);
432 
433  // A sanity check:
435  ::Error("xAOD::AuxStoreBase::shift",
436  XAOD_MESSAGE("Should not have been called for single-object "
437  "store"));
438  return;
439  }
440 
441  // Adjust the size of the container:
442  if ((static_cast<std::size_t>(std::abs(offs)) > m_data.m_size) &&
443  (offs < 0)) {
444  m_data.m_size = 0;
445  } else {
446  m_data.m_size += offs;
447  }
448 
449  for (auto& v : m_data.m_vecs) {
450  if (v && !v->isLinked()) {
451  v->shift(pos, offs);
452  }
453  }
454 
455  if (m_data.m_transientStore) {
456  m_data.m_transientStore->shift(pos, offs);
457  }
458 }

◆ size()

std::size_t xAOD::details::AuxStoreBase::size ( ) const
overridevirtualinherited

Return the number of elements in the store.

Implements SG::IConstAuxStore.

Definition at line 244 of file AuxStoreBase.cxx.

244  {
245 
246  // First, try to find a managed vector in the store:
247  for (SG::auxid_t id : m_data.m_auxIDs) {
248  // Make sure that we are still within the bounds of our vector:
249  if (id >= m_data.m_vecs.size())
250  break;
251  // Skip non-existent or linked objects:
252  if (!m_data.m_vecs[id] || m_data.m_vecs[id]->isLinked()) {
253  continue;
254  }
255  // Ask the vector for its size:
256  const std::size_t size = m_data.m_vecs[id]->size();
257  // Only accept a non-zero size. Not sure why...
258  if (size > 0) {
259  return size;
260  }
261  }
262 
263  // Check if we have a transient store, and get the size from that:
264  if (m_data.m_transientStore) {
265  return m_data.m_transientStore->size();
266  }
267 
268  // Apparently the store is empty:
269  return 0;
270 }

◆ structMode()

auto xAOD::details::AuxStoreBase::structMode ( ) const
inherited

Get what structure mode the object was constructed with.

Definition at line 27 of file AuxStoreBase.cxx.

27  {
28 
29  return m_data.m_structMode;
30 }

◆ writeTo()

StatusCode xAOD::RAuxStore::writeTo ( RNTupleWriter writer)

Add the variables of the store to an output RNTuple.

This function is called by the infrastructure to connect the object to an output RNTuple.

Parameters
writerThe writer object used for creating an output ntuple
Returns
kTRUE if successful, kFALSE otherwise

Definition at line 669 of file RAuxStore.cxx.

669  {
670 
671  assert(m_impl);
672 
673  // Look for any auxiliary fields that have not been connected to yet.
674  RETURN_CHECK("xAOD::RAuxStore::writeTo", m_impl->scanInputTuple());
675 
676  // Put the object into "output writing" mode.
677  m_impl->m_outTuple = &writer;
678 
679  // Create all the variables that we already know about. Notice that the
680  // code makes a copy of the auxid set on purpose. Because the underlying
681  // AuxSelection object gets modified while doing the for loop.
682  const SG::auxid_set_t selAuxIDs = getSelectedAuxIDs();
683  for (SG::auxid_t id : selAuxIDs) {
684  RETURN_CHECK("xAOD::RAuxStore::writeTo", setupOutputData(id));
685  }
686 
687  // Return gracefully.
688  return StatusCode::SUCCESS;
689 }

Member Data Documentation

◆ m_data

Members xAOD::details::AuxStoreBase::m_data
protectedinherited

Member variables of the base class.

Definition at line 201 of file AuxStoreBase.h.

◆ m_impl

std::unique_ptr<impl> xAOD::RAuxStore::m_impl
private

Pointer to the internal object.

Definition at line 89 of file RAuxStore.h.

◆ m_locked

bool xAOD::details::AuxStoreBase::m_locked = false
privateinherited

Is this container locked?

Definition at line 212 of file AuxStoreBase.h.

◆ m_mutex1

mutex_t xAOD::details::AuxStoreBase::m_mutex1
mutableprivateinherited

Mutex objects used for multithreaded synchronisation.

Definition at line 214 of file AuxStoreBase.h.

◆ m_mutex2

mutex_t xAOD::details::AuxStoreBase::m_mutex2
privateinherited

Definition at line 214 of file AuxStoreBase.h.

◆ m_selection

AuxSelection xAOD::details::AuxStoreBase::m_selection
privateinherited

Object helping to select which auxiliary variables to write.

Definition at line 210 of file AuxStoreBase.h.

◆ supportsThinning

constexpr bool SG::IAuxStore::supportsThinning = true
staticconstexprinherited

Mark that this type supports thinning operations.

See AthContainers/supportsThinning.h and AthenaPoolCnvSvc/T_AthenaPoolCnv.h. Helps guide which pool converter template will be used. If false, the default pool converter will be used rather than the aux store-specific one. Ordinary xAOD type should not touch this, but may be overridden in a derived class to handle certain special cases.

Definition at line 199 of file IAuxStore.h.


The documentation for this class was generated from the following files:
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
xAOD::details::AuxStoreBase::prefix
const std::string & prefix() const
Get the currently configured object name prefix.
Definition: AuxStoreBase.cxx:38
SG::IAuxTypeVector::shift
virtual bool shift(size_t pos, ptrdiff_t offs)=0
Shift the elements of the vector.
SG::IAuxTypeVector::isLinked
bool isLinked() const
Return true if this variable is linked from another one.
Definition: IAuxTypeVector.h:226
beamspotman.r
def r
Definition: beamspotman.py:676
RETURN_CHECK
#define RETURN_CHECK(CONTEXT, EXP)
Helper macro for checking return codes in a compact form in the code.
Definition: ReturnCheck.h:26
get_generator_info.result
result
Definition: get_generator_info.py:21
vtune_athena.format
format
Definition: vtune_athena.py:14
xAOD::details::AuxStoreBase::Members::m_vecs
std::vector< std::unique_ptr< SG::IAuxTypeVector > > m_vecs
Variables handled currently by the object (indexed by auxiliary ID)
Definition: AuxStoreBase.h:191
xAOD::RAuxStore::setPrefix
virtual void setPrefix(std::string_view prefix) override
Set the object name prefix.
Definition: RAuxStore.cxx:629
SG::AuxTypeRegistry::instance
static AuxTypeRegistry & instance()
Return the singleton registry instance.
Definition: AuxTypeRegistry.cxx:639
xAOD::details::AuxStoreBase::getAuxIDs
virtual const SG::auxid_set_t & getAuxIDs() const override
Get the types(names) of variables handled by this container.
Definition: AuxStoreBase.cxx:99
xAOD::details::AuxStoreBase::getInputType
virtual const std::type_info * getInputType(SG::auxid_t auxid) const =0
Get the type of an input object, for getIOType()
SG::normalizedTypeinfoName
std::string normalizedTypeinfoName(const std::type_info &info)
Convert a type_info to a normalized string representation (matching the names used in the root dictio...
Definition: normalizedTypeinfoName.cxx:120
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
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::details::AuxStoreBase::Members::m_auxIDs
SG::auxid_set_t m_auxIDs
Internal list of auxiliary variable IDs handled currently by the object.
Definition: AuxStoreBase.h:186
xAOD::details::AuxStoreBase::guard_t
AthContainers_detail::lock_guard< mutex_t > guard_t
Guard type for multithreaded synchronisation.
Definition: AuxStoreBase.h:206
xAOD::details::AuxStoreBase::Members::m_transientStore
std::unique_ptr< SG::AuxStoreInternal > m_transientStore
Store for the in-memory-only variables.
Definition: AuxStoreBase.h:183
xAOD::Utils::dynFieldPrefix
std::string dynFieldPrefix(const std::string &key)
This function is used to figure out what to name dynamic auxiliary field coming from a container call...
Definition: Control/xAODRootAccess/Root/Utils.cxx:170
xAOD::other
@ other
Definition: TrackingPrimitives.h:510
athena.value
value
Definition: athena.py:124
xAOD::details::AuxStoreBase::Members::m_size
std::size_t m_size
The current size of the container being described.
Definition: AuxStoreBase.h:193
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::details::AuxStoreBase::hasOutput
virtual bool hasOutput() const =0
Check if an output is being written by the object.
xAOD::details::isRegisteredType
bool isRegisteredType(SG::auxid_t auxid)
Check if the auxiliary variable has a registered type.
Definition: isRegisteredType.cxx:11
XAOD_MESSAGE
#define XAOD_MESSAGE(MESSAGE)
Simple macro for printing error/verbose messages.
Definition: Control/xAODRootAccess/xAODRootAccess/tools/Message.h:19
xAOD::Utils::isPrimitiveType
bool isPrimitiveType(std::string_view typeName)
Check if the type name describes a primitive type.
Definition: Control/xAODRootAccess/Root/Utils.cxx:278
ReadOfcFromCool.field
field
Definition: ReadOfcFromCool.py:48
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
xAOD::details::AuxStoreBase::hasEntryFor
virtual bool hasEntryFor(SG::auxid_t auxid) const =0
Check if a given variable is available from the input.
xAOD::details::AuxStoreBase::EStructMode::kObjectStore
@ kObjectStore
The object describes a single object.
xAOD::RAuxStore::setupOutputData
virtual StatusCode setupOutputData(SG::auxid_t auxid) override
Connect a variable to the output.
Definition: RAuxStore.cxx:1010
xAOD::details::AuxStoreBase::EStructMode::kContainerStore
@ kContainerStore
The object describes an entire container.
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
CxxUtils::ConcurrentBitset::clear
ConcurrentBitset & clear()
Clear all bits in the set.
xAOD::details::AuxStoreBase::size
virtual std::size_t size() const override
Return the number of elements in the store.
Definition: AuxStoreBase.cxx:244
dumpTruth.getName
getName
Definition: dumpTruth.py:34
xAOD::details::AuxStoreBase::Members::m_decorIDs
SG::auxid_set_t m_decorIDs
Internal list of auxiliary decoration IDs handled currently by the object.
Definition: AuxStoreBase.h:189
SG::AuxTypeRegistry
Handle mappings between names and auxid_t.
Definition: AuxTypeRegistry.h:61
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
H5Utils::internal::packed
H5::CompType packed(H5::CompType in)
Definition: common.cxx:16
CxxUtils::ConcurrentBitset::size
bit_t size() const
Count the number of 1 bits in the set.
xAOD::details::AuxStoreBase::reset
virtual void reset()=0
Reset all (transient) information in the object.
xAOD::details::AuxStoreBase::m_data
Members m_data
Member variables of the base class.
Definition: AuxStoreBase.h:201
xAOD::Utils::getTypeName
std::string getTypeName(const std::type_info &ti)
This function is necessary in order to create type names that ROOT can understand.
Definition: Control/xAODRootAccess/Root/Utils.cxx:352
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.
SG::IAuxTypeVectorFactory
Interface for factory objects that create vectors.
Definition: IAuxTypeVectorFactory.h:50
taskman.fieldName
fieldName
Definition: taskman.py:492
xAOD::details::AuxStoreBase::m_mutex2
mutex_t m_mutex2
Definition: AuxStoreBase.h:214
xAOD::details::AuxStoreBase::Members::m_prefix
std::string m_prefix
Static prefix for the branch names.
Definition: AuxStoreBase.h:178
xAOD::details::AuxStoreBase::getData
virtual const void * getData(SG::auxid_t auxid) const override
Get a pointer to a given array.
Definition: AuxStoreBase.cxx:54
Preparation.mode
mode
Definition: Preparation.py:107
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.
SG::AuxTypeRegistry::getVecType
const std::type_info * getVecType(SG::auxid_t auxid) const
Return the type of the STL vector used to hold an aux data item.
Definition: AuxTypeRegistry.cxx:936
WriteCalibToCool.swap
swap
Definition: WriteCalibToCool.py:94
xAOD::details::AuxStoreBase::setupOutputData
virtual StatusCode setupOutputData(SG::auxid_t auxid)=0
Connect a variable to the output.
xAOD::details::AuxStoreBase::getSelectedAuxIDs
virtual SG::auxid_set_t getSelectedAuxIDs() const override
Get the IDs of the selected aux variables.
Definition: AuxStoreBase.cxx:623
xAOD::details::AuxStoreBase::getVector
virtual const SG::IAuxTypeVector * getVector(SG::auxid_t auxid) const override
Return vector interface for one aux data item.
Definition: AuxStoreBase.cxx:63
xAOD::details::AuxStoreBase::isAuxIDSelected
bool isAuxIDSelected(SG::auxid_t auxid) const
Check if an auxiliary variable is selected for ouput writing.
Definition: AuxStoreBase.cxx:639
GetAllXsec.entry
list entry
Definition: GetAllXsec.py:132
xAOD::details::AuxStoreBase::AuxStoreBase
AuxStoreBase(bool topStore=true, EStructMode mode=EStructMode::kUndefinedStore)
Constructor.
Definition: AuxStoreBase.cxx:22
SG::AuxTypeRegistry::makeVector
std::unique_ptr< IAuxTypeVector > makeVector(SG::auxid_t auxid, size_t size, size_t capacity) const
Construct a new vector to hold an aux item.
Definition: AuxTypeRegistry.cxx:817
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:227
xAOD::details::AuxStoreBase::Members::m_structMode
EStructMode m_structMode
The "structural" mode of the object.
Definition: AuxStoreBase.h:174
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::RAuxStore::setupInputData
virtual StatusCode setupInputData(SG::auxid_t auxid) override
Connect a variable to the input.
Definition: RAuxStore.cxx:803
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
xAOD::details::AuxStoreBase::getInputObject
virtual const void * getInputObject(SG::auxid_t auxid) const =0
Get a pointer to an input object, as it is in memory, for getIOData()
xAOD::Utils::getTypeInfo
const std::type_info & getTypeInfo(EDataType type)
This function is used when reading a primitive branch from an input file without the user explicitly ...
Definition: Control/xAODRootAccess/Root/Utils.cxx:194
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
xAOD::details::AuxStoreBase::m_locked
bool m_locked
Is this container locked?
Definition: AuxStoreBase.h:212
SG::IAuxTypeVector
Abstract interface for manipulating vectors of arbitrary types.
Definition: IAuxTypeVector.h:42
xAOD::details::AuxStoreBase::getIOData
virtual const void * getIOData(SG::auxid_t auxid) const override
Get a pointer to the data being stored for one aux data item.
Definition: AuxStoreBase.cxx:510
xAOD::RAuxStore::reset
virtual void reset() override
Tell the object that all branches will need to be re-read.
Definition: RAuxStore.cxx:762
xAOD::details::AuxStoreBase::m_mutex1
mutex_t m_mutex1
Mutex objects used for multithreaded synchronisation.
Definition: AuxStoreBase.h:214
xAOD::details::AuxStoreBase::EStructMode::kUndefinedStore
@ kUndefinedStore
The structure mode is not defined.
ReadCalibFromCool.typeName
typeName
Definition: ReadCalibFromCool.py:477
collListGuids.attributes
attributes
Definition: collListGuids.py:46
SG::auxid_set_t
A set of aux data identifiers.
Definition: AuxTypes.h:47
ATLAS_THREAD_SAFE
#define ATLAS_THREAD_SAFE
Definition: checker_macros.h:211
xAOD::AuxSelection::selectAux
virtual void selectAux(const std::set< std::string > &attributes)
Select which variables should be written out.
Definition: AuxSelection.cxx:47
xAOD::RAuxStore::m_impl
std::unique_ptr< impl > m_impl
Pointer to the internal object.
Definition: RAuxStore.h:87
collisions.reader
reader
read the goodrunslist xml file(s)
Definition: collisions.py:22
CxxUtils::ConcurrentBitset::erase
ConcurrentBitset & erase(bit_t bit)
Turn off one bit.
xAOD::details::AuxStoreBase::Members::m_isDecoration
std::vector< bool > m_isDecoration
Per variable lock status (indexed by auxiliary ID)
Definition: AuxStoreBase.h:196
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
example.writer
writer
show summary of content
Definition: example.py:36
xAOD::details::AuxStoreBase::Members::m_dynPrefix
std::string m_dynPrefix
Dynamic prefix for the branch names.
Definition: AuxStoreBase.h:180
xAOD::details::AuxStoreBase::Members::m_topStore
bool m_topStore
Flag stating whether this is a "top store".
Definition: AuxStoreBase.h:176
xAOD::details::AuxStoreBase::m_selection
AuxSelection m_selection
Object helping to select which auxiliary variables to write.
Definition: AuxStoreBase.h:210
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.