|
ATLAS Offline Software
|
◆ aux_var_as_string()
std::string SGdebug::aux_var_as_string |
( |
SG::auxid_t |
auxid, |
|
|
const void * |
p, |
|
|
size_t |
i |
|
) |
| |
Convert an aux variable to a string.
- Parameters
-
auxid | The id of the variable. |
p | Pointer to the location of the variable. |
i | Index of the element being dumped. |
Definition at line 245 of file Control/AthContainers/Root/debug.cxx.
251 std::ostringstream
os;
254 const std::type_info* ti =
r.getType(auxid);
255 #define CONVERT(T) if (ti == &typeid(T)) convert (os, *reinterpret_cast<const T*>(p)); else
256 #define CONVERT1(T) CONVERT(T) CONVERT(std::vector<T>)
274 if (tiname.starts_with (
"SG::JaggedVecElt<")) {
277 else if (tiname.starts_with (
"DataLink<")) {
280 else if (tiname.starts_with (
"SG::PackedLink<")) {
283 else if (tiname.starts_with (
"std::vector<SG::PackedLink<")) {
284 convert (
os, *
reinterpret_cast<const std::vector<SG::PackedLinkBase>*
>(
p));
287 os <<
"<??? " << tiname <<
">";
◆ aux_var_name()
◆ dump_aux_vars() [1/11]
◆ dump_aux_vars() [2/11]
◆ dump_aux_vars() [3/11]
◆ dump_aux_vars() [4/11]
Dump aux variables from a vector for a single element.
- Parameters
-
vec | The vector from which to dump. |
i | The index of the element to dump. |
Definition at line 391 of file Control/AthContainers/Root/debug.cxx.
◆ dump_aux_vars() [5/11]
◆ dump_aux_vars() [6/11]
Dump aux variables from a vector for a single element.
- Parameters
-
vec | The vector from which to dump. |
i | The index of the element to dump. |
Definition at line 404 of file Control/AthContainers/Root/debug.cxx.
◆ dump_aux_vars() [7/11]
Dump aux variables from a store for all elements.
- Parameters
-
store | The store from which to dump. |
Definition at line 366 of file Control/AthContainers/Root/debug.cxx.
369 for (
size_t i = 0;
i <
sz;
i++) {
370 std::cout <<
"=== Element " <<
i <<
"\n";
◆ dump_aux_vars() [8/11]
Dump aux variables from a store for a single element (to cout).
- Parameters
-
store | The store from which to dump. |
i | The index of the element to dump. |
Definition at line 345 of file Control/AthContainers/Root/debug.cxx.
◆ dump_aux_vars() [9/11]
◆ dump_aux_vars() [10/11]
Dump aux variables from a store for a single element.
- Parameters
-
store | The store from which to dump. |
i | The index of the element to dump. |
Definition at line 356 of file Control/AthContainers/Root/debug.cxx.
◆ dump_aux_vars() [11/11]
Dump aux variables from a store for a single element.
- Parameters
-
os | The stream to which to write. |
store | The store from which to dump. |
i | The index of the element to dump. |
Definition at line 300 of file Control/AthContainers/Root/debug.cxx.
302 if (
i >=
store.size())
return;
305 std::vector<AuxVarSort> vars (
ids.begin(),
ids.end());
307 for (
const AuxVarSort&
v : vars) {
309 const void* pbeg =
store.getData (
v.id);
311 const char*
p =
reinterpret_cast<const char*
>(pbeg) + eltsz*
i;
314 if (linked_id != SG::null_auxid) {
318 os <<
"(missing linkedVector)\n";
322 const char* lbeg =
reinterpret_cast<const char*
>(lv->
toPtr());
326 for (
size_t j = 0; j <
sz; j++) {
331 const char*
p =
reinterpret_cast<const char*
>(lbeg) + leltsz*j;
◆ print_aux_var_name()
◆ print_aux_vars() [1/7]
◆ print_aux_vars() [2/7]
◆ print_aux_vars() [3/7]
Print the list of aux variables in a set.
- Parameters
-
Definition at line 63 of file Control/AthContainers/Root/debug.cxx.
67 std::vector<SG::auxid_t>
ids (auxids.
begin(), auxids.
end());
71 std::cout <<
id <<
" "
77 std::cout <<
" (atomic)";
80 std::cout <<
" (linked)";
82 if (decors.
test (
id)) {
83 std::cout <<
" (decor)";
◆ print_aux_vars() [4/7]
◆ print_aux_vars() [5/7]
◆ print_aux_vars() [6/7]
◆ print_aux_vars() [7/7]
static AuxTypeRegistry & instance()
Return the singleton registry instance.
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 typeinfoName(const std::type_info &ti)
Convert a type_info to a demangled string.
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.
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.
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.
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.
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
A packed version of ElementLink.
Abstract interface for manipulating vectors of arbitrary types.
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.
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.
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.
bool test(bit_t bit) const
Test to see if a bit is set.