1 #ifndef art_Framework_Principal_SummedValue_h 2 #define art_Framework_Principal_SummedValue_h 47 #include "cetlib_except/demangle.h" 59 "art error: SummedValue<T>'s only support types that can be aggregated.\n" 60 " Please contact artists@fnal.gov.\n");
75 T
const&
value()
const;
86 auto const& newRS = h.provenance()->rangeOfValidity();
103 "SummedValue<T>::update"}
104 <<
"\nThe following ranges corresponding to the type:\n" 105 <<
" '" << cet::demangle_symbol(
typeid(T).name()) <<
"'" 106 <<
"\ncannot be aggregated\n" 108 << newRS <<
"\nPlease contact artists@fnal.gov.\n";
120 template <
typename T>
121 template <
typename H>
125 std::string
const& errMsg{
"Attempt to update " +
126 cet::demangle_symbol(
typeid(*this).name()) +
127 " from an invalid handle."};
132 template <
typename T>
133 template <
typename H>
137 std::string
const& errMsg{
"Attempt to update " +
138 cet::demangle_symbol(
typeid(*this).name()) +
139 " from an invalid handle.\n"};
144 template <
typename T>
149 std::swap(*
this,
tmp);
152 template <
typename T>
159 template <
typename T>
166 template <
typename T>
173 template <
class T,
class U>
180 template <
class T,
class U>
187 template <
class T,
class U>
RangeSet rangeOfValidity_
void throw_if_invalid(std::string const &)
std::enable_if_t< detail::is_handle< H >::value > update(H const &h)
RangeSet & merge(RangeSet const &other)
std::enable_if_t< detail::are_handles< T, U >::value, bool > disjoint_ranges(T const &a, U const &b)
RangeSet const & rangeOfValidity() const
void update_impl(H const &h, T const &t)
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
std::string value(boost::any const &)
std::enable_if_t< detail::are_handles< T, U >::value, bool > overlapping_ranges(T const &a, U const &b)
static RangeSet invalid()
std::enable_if_t< detail::are_handles< T, U >::value, bool > same_ranges(T const &a, U const &b)
static void aggregate(T &, T const &)