|
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 238 of file Control/AthContainers/Root/debug.cxx.
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 <<
">";
◆ 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 384 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 397 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 359 of file Control/AthContainers/Root/debug.cxx.
362 for (
size_t i = 0;
i <
sz;
i++) {
363 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 338 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 349 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 293 of file Control/AthContainers/Root/debug.cxx.
295 if (
i >=
store.size())
return;
298 std::vector<AuxVarSort> vars (
ids.begin(),
ids.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;
◆ 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 60 of file Control/AthContainers/Root/debug.cxx.
63 std::vector<SG::auxid_t>
ids (auxids.
begin(), auxids.
end());
67 std::cout <<
id <<
" "
73 std::cout <<
" (atomic)";
76 std::cout <<
" (linked)";
◆ 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
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.
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.
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.
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.