|
ATLAS Offline Software
|
Go to the documentation of this file.
19 #include "AthLinks/DataLinkBase.h"
63 std::vector<SG::auxid_t>
ids (auxids.
begin(), auxids.
end());
64 std::sort (
ids.begin(),
ids.end());
67 std::cout <<
id <<
" "
73 std::cout <<
" (atomic)";
76 std::cout <<
" (linked)";
159 void convert (std::ostream&
os,
const float x)
165 void convert (std::ostream&
os,
const double x)
179 #ifdef XAOD_STANDALONE
182 os <<
std::format (
"DataLink[{}/{}]",
x.proxy() ?
x.proxy()->clID() : CLID_NULL,
x.dataID());
194 void convert (std::ostream&
os,
const std::vector<T>&
x)
200 for (decltype(
auto) elt :
x) {
223 bool operator< (
const AuxVarSort&
a,
const AuxVarSort&
b )
225 return a.name <
b.name;
244 std::ostringstream
os;
247 const std::type_info* ti =
r.getType(auxid);
248 #define CONVERT(T) if (ti == &typeid(T)) convert (os, *reinterpret_cast<const T*>(p)); else
249 #define CONVERT1(T) CONVERT(T) CONVERT(std::vector<T>)
266 std::string tiname = AthContainers_detail::typeinfoName(*ti);
267 if (tiname.starts_with (
"SG::JaggedVecElt<")) {
270 else if (tiname.starts_with (
"DataLink<")) {
273 else if (tiname.starts_with (
"SG::PackedLink<")) {
276 else if (tiname.starts_with (
"std::vector<SG::PackedLink<")) {
277 convert (
os, *
reinterpret_cast<const std::vector<SG::PackedLinkBase>*
>(
p));
280 os <<
"<??? " << tiname <<
">";
295 if (
i >=
store.size())
return;
298 std::vector<AuxVarSort> vars (
ids.begin(),
ids.end());
299 std::sort (vars.begin(), vars.end());
300 for (
const AuxVarSort&
v : vars) {
302 const void* pbeg =
store.getData (
v.id);
304 const char*
p =
reinterpret_cast<const char*
>(pbeg) + eltsz*
i;
307 if (linked_id != SG::null_auxid) {
311 os <<
"(missing linkedVector)\n";
315 const char* lbeg =
reinterpret_cast<const char*
>(lv->
toPtr());
319 for (
size_t j = 0; j <
sz; j++) {
324 const char*
p =
reinterpret_cast<const char*
>(lbeg) + leltsz*j;
362 for (
size_t i = 0;
i <
sz;
i++) {
363 std::cout <<
"=== Element " <<
i <<
"\n";
bool operator<(const DataVector< T > &a, const DataVector< T > &b)
Vector ordering relation.
static AuxTypeRegistry & instance()
Return the singleton registry instance.
Base class for elements of a container that can have aux data.
std::string getName(SG::auxid_t auxid) const
Return the name of an aux data item.
const_iterator end() const
Return an end iterator.
std::vector< size_t > vec
void print_aux_vars(const SG::auxid_set_t &auxids)
Print the list of aux variables in a set.
Handle mappings between names and auxid_t.
Describe one element of a jagged vector (base class).
@ Linked
Mark that this variable is linked to another one.
size_t auxid_t
Identifier for a particular aux data item.
std::string getTypeName(SG::auxid_t auxid) const
Return the type name of an aux data item.
Flags getFlags(SG::auxid_t auxid) const
Return flags associated with an auxiliary variable.
Definition of PackedLink type.
SG::auxid_t linkedVariable(SG::auxid_t auxid) const
Return the auxid if the linked variable, if there is one.
size_t getEltSize(SG::auxid_t auxid) const
Return size of an element in the STL vector.
Helper for emitting error messages.
const SG::auxid_set_t & getAuxIDs() const
Return a set of identifiers for existing data items for this object.
size_t index() const
Return the index of this element within its container.
AuxVarFlags
Additional flags to qualify an auxiliary variable.
std::string getClassName(SG::auxid_t auxid) const
Return the class name associated with an aux data item (may be blank).
const_iterator begin() const
Return a begin iterator.
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 strformat(const char *fmt,...)
return a std::string according to a format fmt and varargs
bool isLinked(SG::auxid_t auxid) const
Test whether this is a linked variable.
std::unique_ptr< MVAUtils::BDT > convert(TMVA::MethodBDT *bdt, bool isRegression=true, bool useYesNoLeaf=false)
@ Atomic
Mark that this variable should only be accessed atomically.
Definition of JaggedVecElt.
A packed version of ElementLink.
Abstract interface for manipulating vectors of arbitrary types.
Handle mappings between names and auxid_t.
A set of aux data identifiers.
void print_aux_var_name(SG::auxid_t id)
Print the name corresponding to a given aux id.
Manage lookup of vectors of auxiliary data.
const SG::AuxVectorData * container() const
Return the container holding this element.
Interface for const operations on an auxiliary store.
Interface for const operations on an auxiliary store.
virtual size_t size() const =0
Return the size of the vector.
std::string aux_var_name(SG::auxid_t id)
Return the name corresponding to a given aux id.
Type-independent part of DataLink; holds the persistent state.
std::string aux_var_as_string(SG::auxid_t auxid, const void *p, size_t i)
Convert an aux variable to a string.
virtual void * toPtr()=0
Return a pointer to the start of the vector's data.
Helper functions intended to be called from the debugger.