19#include "AthLinks/DataLinkBase.h"
20#ifndef XAOD_STANDALONE
40 return reg.getClassName(
id) +
"::" + reg.getName(
id);
70 std::vector<SG::auxid_t> ids (auxids.
begin(), auxids.
end());
75 << reg.getClassName(
id) <<
"::" << reg.getName(
id) <<
" "
76 <<
"[" << reg.getTypeName(
id);
85 if (decors.
test (
id)) {
195void convert (std::ostream& os,
const T&
x)
201void convert (std::ostream& os,
const char x)
203 os << static_cast<int > (
x);
207void convert (std::ostream& os,
const unsigned char x)
209 os << static_cast<unsigned > (
x);
213void convert (std::ostream& os,
const float x)
219void convert (std::ostream& os,
const double x)
225void convert (std::ostream& os,
const SG::JaggedVecEltBase&
x,
size_t i)
227 os << std::format (
"[{},{}]",
x.begin(i),
x.end());
231void convert (std::ostream& os,
const DataLinkBase&
x)
233#ifdef XAOD_STANDALONE
234 os << std::format (
"DataLink[{}]",
x.persKey());
236 os << std::format (
"DataLink[{}/{}]",
x.proxy() ?
x.proxy()->clID() : CLID_NULL,
x.dataID());
241void convert (std::ostream& os,
const SG::PackedLinkBase&
x)
243 os << std::format (
"PackedLink[{}/{}]",
x.collection(),
x.index());
248void convert (std::ostream& os,
const std::vector<T>&
x)
254 for (
decltype(
auto) elt :
x) {
277bool operator< (
const AuxVarSort&
a,
const AuxVarSort& b )
279 return a.name <
b.name;
298 std::ostringstream os;
301 const std::type_info* ti =
r.getType(auxid);
302#define CONVERT(T) if (ti == &typeid(T)) convert (os, *reinterpret_cast<const T*>(p)); else
303#define CONVERT1(T) CONVERT(T) CONVERT(std::vector<T>)
320 std::string tiname = AthContainers_detail::typeinfoName(*ti);
321 if (tiname.starts_with (
"SG::JaggedVecElt<")) {
324 else if (tiname.starts_with (
"DataLink<")) {
325 convert (os, *
reinterpret_cast<const DataLinkBase*
>(p));
327 else if (tiname.starts_with (
"SG::PackedLink<")) {
330 else if (tiname.starts_with (
"std::vector<SG::PackedLink<")) {
331 convert (os, *
reinterpret_cast<const std::vector<SG::PackedLinkBase>*
>(p));
334 os <<
"<??? " << tiname <<
">";
349 if (i >= store.size())
return;
352 std::vector<AuxVarSort> vars (ids.begin(), ids.end());
354 for (
const AuxVarSort& v : vars) {
355 if (reg.isLinked (v.id))
continue;
356 const void* pbeg = store.getData (v.id);
357 size_t eltsz = reg.getEltSize (v.id);
358 const char* p =
reinterpret_cast<const char*
>(pbeg) + eltsz*i;
365 os <<
"(missing linkedVector)\n";
369 const char* lbeg =
reinterpret_cast<const char*
>(lv->
toPtr());
370 size_t leltsz = reg.getEltSize (linked_id);
373 for (
size_t j = 0; j <
sz; j++) {
378 const char* p =
reinterpret_cast<const char*
>(lbeg) + leltsz*j;
415 size_t sz = store.size();
416 for (
size_t i = 0; i <
sz; i++) {
417 std::cout <<
"=== Element " << i <<
"\n";
Handle mappings between names and auxid_t.
std::vector< size_t > vec
Helper functions intended to be called from the debugger.
bool operator<(const DataVector< T > &a, const DataVector< T > &b)
Vector ordering relation.
Interface for const operations on an auxiliary store.
Definition of JaggedVecElt.
Definition of PackedLink type.
const_iterator end() const
Return an end iterator.
bool test(bit_t bit) const
Test to see if a bit is set.
const_iterator begin() const
Return a begin iterator.
Type-independent part of DataLink; holds the persistent state.
Base class for elements of a container that can have aux data.
const SG::auxid_set_t & getAuxIDs() const
Return a set of identifiers for existing data items for this object.
const SG::auxid_set_t & getDecorIDs() const
Return a set of identifiers for decorations for this object.
const SG::AuxVectorData * container() const
Return the container holding this element.
size_t index() const
Return the index of this element within its container.
Handle mappings between names and auxid_t.
static AuxTypeRegistry & instance()
Return the singleton registry instance.
Manage lookup of vectors of auxiliary data.
Abstract interface for manipulating vectors of arbitrary types.
virtual void * toPtr()=0
Return a pointer to the start of the vector's data.
virtual size_t size() const =0
Return the size of the vector.
Interface for const operations on an auxiliary store.
Describe one element of a jagged vector (base class).
A set of aux data identifiers.
Helper for emitting error messages.
std::string strformat(const char *fmt,...)
return a std::string according to a format fmt and varargs
AuxVarFlags
Additional flags to qualify an auxiliary variable.
@ Atomic
Mark that this variable should only be accessed atomically.
@ Linked
Mark that this variable is linked to another one.
static const auxid_t null_auxid
To signal no aux data item.
size_t auxid_t
Identifier for a particular aux data item.
void dump_aux_vars(std::ostream &os, const SG::IConstAuxStore &store, size_t i)
Dump aux variables from a store for a single element.
void print_aux_vars(const SG::auxid_set_t &auxids, const SG::auxid_set_t &decors, std::ostream &os)
Print the list of aux variables in a set.
std::string aux_var_name(SG::auxid_t id)
Return the name corresponding to a given aux id.
std::string aux_var_as_string(SG::auxid_t auxid, const void *p, size_t i)
Convert an aux variable to a string.
void print_aux_var_name(SG::auxid_t id)
Print the name corresponding to a given aux id.
std::unique_ptr< MVAUtils::BDT > convert(TMVA::MethodBDT *bdt, bool isRegression=true, bool useYesNoLeaf=false)
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
A packed version of ElementLink.