19#include "AthLinks/DataLinkBase.h"
20#ifndef XAOD_STANDALONE
40 return reg.getClassName(
id) +
"::" + reg.getName(
id);
67 std::vector<SG::auxid_t> ids (auxids.
begin(), auxids.
end());
71 std::cout <<
id <<
" "
72 << reg.getClassName(
id) <<
"::" << reg.getName(
id) <<
" "
73 <<
"[" << reg.getTypeName(
id);
77 std::cout <<
" (atomic)";
80 std::cout <<
" (linked)";
82 if (decors.
test (
id)) {
83 std::cout <<
" (decor)";
160void convert (std::ostream& os,
const T&
x)
166void convert (std::ostream& os,
const char x)
168 os << static_cast<int > (
x);
172void convert (std::ostream& os,
const unsigned char x)
174 os << static_cast<unsigned > (
x);
178void convert (std::ostream& os,
const float x)
184void convert (std::ostream& os,
const double x)
190void convert (std::ostream& os,
const SG::JaggedVecEltBase&
x,
size_t i)
192 os << std::format (
"[{},{}]",
x.begin(i),
x.end());
196void convert (std::ostream& os,
const DataLinkBase&
x)
198#ifdef XAOD_STANDALONE
199 os << std::format (
"DataLink[{}]",
x.persKey());
201 os << std::format (
"DataLink[{}/{}]",
x.proxy() ?
x.proxy()->clID() : CLID_NULL,
x.dataID());
206void convert (std::ostream& os,
const SG::PackedLinkBase&
x)
208 os << std::format (
"PackedLink[{}/{}]",
x.collection(),
x.index());
213void convert (std::ostream& os,
const std::vector<T>&
x)
219 for (
decltype(
auto) elt :
x) {
242bool operator< (
const AuxVarSort&
a,
const AuxVarSort& b )
244 return a.name <
b.name;
263 std::ostringstream os;
266 const std::type_info* ti =
r.getType(auxid);
267#define CONVERT(T) if (ti == &typeid(T)) convert (os, *reinterpret_cast<const T*>(p)); else
268#define CONVERT1(T) CONVERT(T) CONVERT(std::vector<T>)
285 std::string tiname = AthContainers_detail::typeinfoName(*ti);
286 if (tiname.starts_with (
"SG::JaggedVecElt<")) {
289 else if (tiname.starts_with (
"DataLink<")) {
290 convert (os, *
reinterpret_cast<const DataLinkBase*
>(p));
292 else if (tiname.starts_with (
"SG::PackedLink<")) {
295 else if (tiname.starts_with (
"std::vector<SG::PackedLink<")) {
296 convert (os, *
reinterpret_cast<const std::vector<SG::PackedLinkBase>*
>(p));
299 os <<
"<??? " << tiname <<
">";
314 if (i >= store.size())
return;
317 std::vector<AuxVarSort> vars (ids.begin(), ids.end());
319 for (
const AuxVarSort& v : vars) {
320 if (reg.isLinked (v.id))
continue;
321 const void* pbeg = store.getData (v.id);
322 size_t eltsz = reg.getEltSize (v.id);
323 const char* p =
reinterpret_cast<const char*
>(pbeg) + eltsz*i;
330 os <<
"(missing linkedVector)\n";
334 const char* lbeg =
reinterpret_cast<const char*
>(lv->
toPtr());
335 size_t leltsz = reg.getEltSize (linked_id);
338 for (
size_t j = 0; j <
sz; j++) {
343 const char* p =
reinterpret_cast<const char*
>(lbeg) + leltsz*j;
380 size_t sz = store.size();
381 for (
size_t i = 0; i <
sz; i++) {
382 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 print_aux_vars(const SG::auxid_set_t &auxids, const SG::auxid_set_t &decors=SG::auxid_set_t())
Print the list of aux variables in a set.
void dump_aux_vars(std::ostream &os, const SG::IConstAuxStore &store, size_t i)
Dump aux variables from a store for a single element.
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.