8 #ifndef UTIL_DUMPASSOCIATIONS_H
9 #define UTIL_DUMPASSOCIATIONS_H 1
13 #include <type_traits>
16 #include "cetlib_except/demangle.h"
17 #include "canvas/Persistency/Common/Assns.h"
31 template <
typename Stream,
typename Left,
typename Right,
typename Data>
33 (
Stream&& out, art::Assns<Left, Right, Data>
const& assns)
35 out <<
"Association between '" << cet::demangle_symbol(
typeid(Left).
name())
36 <<
"' and '" << cet::demangle_symbol(
typeid(Right).
name()) <<
"'";
37 if (std::is_same<Data, void>()) {
38 out <<
" with '" << cet::demangle_symbol(
typeid(
Data).
name())
41 if (assns.size() > 0) {
42 out <<
" contains " << assns.size() <<
" relations";
53 #endif // UTIL_DUMPASSOCIATIONS_H
void DumpAssociationsIntro(Stream &&out, art::Assns< Left, Right, Data > const &assns)
Dumps a short introduction about specified association.