|
ATLAS Offline Software
|
Go to the documentation of this file.
19 #include "AthLinks/DataLinkBase.h"
64 std::vector<SG::auxid_t>
ids (auxids.
begin(), auxids.
end());
65 std::sort (
ids.begin(),
ids.end());
68 std::cout <<
id <<
" "
74 std::cout <<
" (atomic)";
77 std::cout <<
" (linked)";
79 if (decors.
test (
id)) {
80 std::cout <<
" (decor)";
163 void convert (std::ostream&
os,
const float x)
169 void convert (std::ostream&
os,
const double x)
183 #ifdef XAOD_STANDALONE
186 os <<
std::format (
"DataLink[{}/{}]",
x.proxy() ?
x.proxy()->clID() : CLID_NULL,
x.dataID());
198 void convert (std::ostream&
os,
const std::vector<T>&
x)
204 for (decltype(
auto) elt :
x) {
227 bool operator< (
const AuxVarSort&
a,
const AuxVarSort&
b )
229 return a.name <
b.name;
248 std::ostringstream
os;
251 const std::type_info* ti =
r.getType(auxid);
252 #define CONVERT(T) if (ti == &typeid(T)) convert (os, *reinterpret_cast<const T*>(p)); else
253 #define CONVERT1(T) CONVERT(T) CONVERT(std::vector<T>)
270 std::string tiname = AthContainers_detail::typeinfoName(*ti);
271 if (tiname.starts_with (
"SG::JaggedVecElt<")) {
274 else if (tiname.starts_with (
"DataLink<")) {
277 else if (tiname.starts_with (
"SG::PackedLink<")) {
280 else if (tiname.starts_with (
"std::vector<SG::PackedLink<")) {
281 convert (
os, *
reinterpret_cast<const std::vector<SG::PackedLinkBase>*
>(
p));
284 os <<
"<??? " << tiname <<
">";
299 if (
i >=
store.size())
return;
302 std::vector<AuxVarSort> vars (
ids.begin(),
ids.end());
303 std::sort (vars.begin(), vars.end());
304 for (
const AuxVarSort&
v : vars) {
306 const void* pbeg =
store.getData (
v.id);
308 const char*
p =
reinterpret_cast<const char*
>(pbeg) + eltsz*
i;
311 if (linked_id != SG::null_auxid) {
315 os <<
"(missing linkedVector)\n";
319 const char* lbeg =
reinterpret_cast<const char*
>(lv->
toPtr());
323 for (
size_t j = 0; j <
sz; j++) {
328 const char*
p =
reinterpret_cast<const char*
>(lbeg) + leltsz*j;
366 for (
size_t i = 0;
i <
sz;
i++) {
367 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
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.
const SG::auxid_set_t & getDecorIDs() const
Return a set of identifiers for decorations for this object.
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_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 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.
bool test(bit_t bit) const
Test to see if a bit is set.